Hi all im trying to control a servo using the timer interrupt. so when the 20ms interrrupt occurs a counter is incremented which sets the servo at a specific position which does happen however, i want it to change position when the second counter increments but this is not working... can any one help?
my code:
stuck with interrupt timer to control a servo
my code:
Code (Text):
- unsigned int count, Adcval;
- unsigned int a =2000;
- //Timer0
- //Prescaler 1:256; TMR0 Preload = 100; Actual Interrupt Time : 19.968 ms
- //Place/Copy this part in declaration...