Program for controlling analog servo motor using PIC18F452
hi
i am using pic 18f452 to control the servo motor Turnigy TG9e.
i am programming it using microcode studio.
i was not able to move the servo motor.
i don't know what was the mistake.
can anyone provide me a basic program in microcode studio for controlling servo motor Turnigy Tg9e using pic 18f452
Re: Program for controlling analog servo motor using PIC18F452
Quote:
Originally Posted by
SolaiKannan
hi
i am using pic 18f452 to control the servo motor Turnigy TG9e.
i am programming it using microcode studio.
i was not able to move the servo motor.
i don't know what was the mistake.
can anyone provide me a basic program in microcode studio for controlling servo motor Turnigy Tg9e using pic 18f452
I think its better you put here the code that you allready have, and if possible schematic also!
Re: Program for controlling analog servo motor using PIC18F452
this is my coding.
define osc 20
OUTPUT PORTB.0
LOOP:
PULSOUT 0,110
PAUSE 1000
PULSOUT 0,120
PAUSE 1000
PULSOUT 0,130
PAUSE 1000
PULSOUT 0,140
PAUSE 1000
PULSOUT 0,150
PAUSE 1000
PULSOUT 0,160
PAUSE 1000
PULSOUT 0,170
PAUSE 1000
PULSOUT 0,180
PAUSE 1000
PULSOUT 0,190
PAUSE 1000
PULSOUT 0,200
PAUSE 1000
GOTO LOOP
END
1 Attachment(s)
Re: Program for controlling analog servo motor using PIC18F452
Attachment 6295
this is my schema .
Re: Program for controlling analog servo motor using PIC18F452
Looks like your motor ground is isolated from ground by capacitors and DC will not flow through those.
Re: Program for controlling analog servo motor using PIC18F452
Hi,
Moreover your servo is powered between +V and +V ... ( yes, I wrote it fine !!!) ... and the reset pin can't do its job ...
your program won't work fine as servo signal ( 1 to 2 ms pulse ) has to be sent every ~ 20 ms ... and not once every second ... :chargrined:
Alain