Exact match. Not showing close matches.
'[PIC]: Robot Servo control Code wont work?'
2002\01\19@020355 by Prince Anamalech
please help me out with this servo ontrol code for my robot, i will rewrite the code to suit two servos after i get it to work with one. the code compiles but it doesn't work?
here is my single servo control code
;"SmartBot Servo Test Program - Written By Daniel"
;This program control a single servo.
BSF STATUS,RP0 ;Set register bank 1
CLRF TRISA ;Set All PORTA Pins to outputs
Counter EQU 0Ch ;Servo delay counter register
Position EQU 0Dh ;Servo Position register
#DEFINE Servo1 PORTA,0 ;Defines Servo (A.0) I/O Pin on PIC16F84
Servo MOVLW 0 ;Load Counter with # of cycles for
MOVWF Counter ;1 ms Servo Delay
BSF Servo1 ;Activate the Servo output
CALL Delay ;Wait for 1ms to pass
MOVF 90,0 ;Load W with servo posi tion
;00 & FF=extremes, 128=centre
MOVWF Counter ;and store in Counter for next delay
CALL Delay ;Keep servo active for position delay
GOTO Servo ;Create Loop
Delay ;Servo time delay
NOP ;Pad the loop with one cycle
DECFSZ Counter ;Counter=Counter-1
GOTO Delay ;If Counter is not 0, repeat
RETURN ;If 0, return
2002\01\19@055904 by Jinx
2002\01\19@134554 by Dale Botkin
More... (looser matching)
- Last day of these posts
- In 2002 , 2003 only
- New search...