You are on page 1of 1

#include <p89v51rd2.h> #include "pwm_servos.

h" void PowerOn() { unsigned char inner, outer; IE = 0x00; P1 = 0xFF; /* Motor STOP */ for (outer = 0x00; outer < 0x10; outer++) { /* Delay for a while */ for (inner = 0x00; inner < 0xFF; inner++); } Servos_init(); IE = 0x80; /* Start interrupt */ } void main() { PowerOn(); ServoR_forward(); ServoL_back(); while (1); }

You might also like