hi Darrel

thx alot for ur help. this code was very important to me.

my problem now is that i want to control a robotic arm after i made my pc talk to my pic. the problem is that servo control in pic basic is carried by pulsout , and i should pause for 18 milisecond to complet a period.

pulsout portb.0, period
pause 18
...
etc

it seems that is a wrong way to do it since usbservice must be called every 1ms or so. i tried this method and it didnt work. i also tried to make a for loop like this
for vr = 1 to 18
pause 1
usbservice
next vr

but it didnt work. is there a way to control a servo motor by a slider on my vb software? and how can i avoid pausing in pulsout ?