servo not working | Microcontroller › AVR › servo not working This topic has 1 reply, 2 voices, and was last updated 11 years, 7 months ago by AJISH ALFRED. Viewing 2 posts - 1 through 2 (of 2 total) Author Posts August 20, 2012 at 4:11 am #1918 swapnil_sParticipant avr studio 5. #defineF_CPU16000000 #include<avr/io.h> #include<util/delay.h> intmain(void) { DDRD=0xff; TCCR1A=0b10100001; TCCR1B=0b00001010; ICR1=20000; while(1) { OCCR1A=1000; _delay_ms(10); } } I took prescalar =8, Therefore for generating 50hz frequency , ICR1=20000, 1ms= full left= 2.5hz occr1a=1000 1.5ms=middle=3.75hz occr1a=1500 2ms=full right=5hz occr1a=2000 But the servo is not working…!! whatz wrong in the code?? September 12, 2012 at 5:14 pm #8577 AJISH ALFREDParticipant Hi, Please comment your code properly and post again, so that it would be easy for us to help you Author Posts Viewing 2 posts - 1 through 2 (of 2 total) You must be logged in to reply to this topic. Log In Username: Password: Keep me signed in Log In