Timer atmega16
OCR1AH=11;
OCR1AL=181; //Duty cycle servo1=1000us=1.5ms (0 degree)
OCR1BH=7;
OCR1BL=104; //Duty cycle servo2=1500us=1 ms (-90 degree)
ICR1H=156; //Time period = 20000us=20ms
ICR1L=32;
Cho e hoi cach tinh nhung con so 1.5ms 1ms 20ms. biet chip atmega16 chay tan so 2MHZ
|