View Full Version : Read Servo Value?

09-03-2008, 09:50 AM
I have another circuit which is outputting to a servo.

Can I direct that to an IO pin on a BS2 to see the values it's driving to the servo?
Would I use pulsin?

Any help is appreciated!


Mike Green
09-03-2008, 11:02 AM
Yes to both questions. The main problem you will have is synchronizing your measurements with the incoming pulses. It's not a big deal. The issue is that you can't time a pulse if it has already started, so you have to wait for the input to be HIGH, then LOW before starting the PULSIN. The PULSIN will wait for the next pulse to start, then measure its width. If you know (or measure) the time between pulses, you can do something else useful before doing the next PULSIN.