just a simple test with 180f452 on microchip proto board
servo connected to port B.7
a quick test - without any additional hardware
fyi
init:
gosub rstml
loop:
LCDOUT $FE, $80, " test for servo "
if code <100 then code = 100
if code >200 then code = 200
if portB.0 = 0 then ' button right
code = 100
pulsout portB.7, code
high portB.0
else
low portB.0
endif
if portA.4 = 0 then ' button left
code = 200
pulsout portB.7, code
high portB.1
else
low portB.1
endif
high portB.2
pause 25
low portB.2
pause 25
goto loop
rstml:
low PORTB.1
low PORTB.2
low PORTB.3
low PORTB.4
low PORTB.5
low PORTA.0
return
Bookmarks