hi there here is the code i have at the moment

'servo control prog

'set variables

ch1 var byte
ch2 var byte
s1 var byte
s1 = 150

start:

pulsin portb,1,7000,Ch1
pot portb,2,200,Ch2

if ch1 < s1 then output1
if ch1 > s1 then output1
if ch1 = s1 then output2


output1:

pulsout portb.3,ch1
pause 18
goto start

output2:

pulsout portb.3,ch2
pause 18
goto start

end

i have compiled it and it seams to work. not tried it out on any hardware yet .