Hi,
A couple of issues of the bat:
If, by servo, you mean your typical RC servo it's not enough to send it one pulse. If you want it to move you need to send it pulses, usually at around 50Hz repetition rate, for at least as long as it tkaes for the servo to move to the new position but ideally you send it pulses all the time so that it can keep its position. As far as I can see you're only sending a single pulse - I don't think that's going to work.
You have POS declared as a BYTE but you're trying to store a value between 700 and 2300 - that's not going to work.
pauseus X1*10:X1 = pos
A typical RC servo want pulses with a width of 1-2ms. If you assign 2000 to POS (after changing it to a WORD) you're going to get a pulsewidth of 20000us or 20ms - I don't think that's going to work.
If you change POS to a WORD check the documentation of SERIN to see if it can handle WORD variables directly or if you need to give it the high and low byte separately. And, finally, I'm not sure what the purpose of copying POX to X1 but if there's a specific reason for it make sure you change X1 to WORD as well.
/Henrik.
Bookmarks