Alligator HZV
  • HOME
  • MECHANICAL DESIGN
  • CIRCUIT DESIGN
    • HZV
    • LUC
  • PSEUDOCODE
    • HZV>
      • EventCheckers
      • CheckValidSM
      • InterpretSM
      • TransmitXbeeSM
      • MotorPIC
      • ServoPIC
      • BalloonMonitor_PIC
    • LUC
  • COMMUNICATION
  • SOFTWARE
    • HZV
    • LUC
  • BOM
  • GALLERY
  • GEMS OF WISDOM
  • TEAM PROFILE

ServoPIC

(On Servo Driving PIC)

Function: Main()
     Initialize Interrupts ,Timer0 for measuring period and dutycycle
        if attack pin has been set high from low, start timer, set attack flag to high
        if attack pin has been set low from high, set attack flag to low
        if timer expires, set attack flag to low
 End

Function: Interrupt ISR()
       if Timer overflows, increment Byte measuring the time
       if the duration for period of the servo is reached, set PWM to high.
       else if PWM has been high for Attack Duty cycle and attack flag is high, lower the PWM pin
       else if PWM has been high for Retract Duty cycle and attack flag is low, lower the PWM pin
       clear Timer overflow flag
End






Powered by Create your own unique website with customizable templates.