In SX Microcontrollers, SX/B Compiler and SX-Key Tool, g_daubach wrote: To handle PWM and pulsing the IR LEDs is not too much workload for one SX. The "trick" is that you need to find the right ISR calling period so that you can generate the pulses for the IR diodes almost as a "side effect". This is why the sample code in my book uses an "odd" timing of calling the ISR every 13µs. 13µs * 2 results in a 26µs which is equivalent to 38.46 kHz and close enough to the filter frequency (38.5 kHz) of the IR sensors. For my samples, I used a 4MHz clock for the SX which results in a relatively low power consumption. On the other hand, this low clock frequency only allows for a resolution of 15 steps between 0 and 100% for the servos in either direction. Using a higher clock, say 8 MHz would double this resolution. IOW, the higher the clock frequency, the better the resolution will be with the sacrifice of more power consumption. You might consider using 5 rechargeable batteries giving you 6 Volts when fully charged. I don't think, a regulator is required - the SX can stand the 6 Volts and will continue operation down to 2.7 Volts when not clocked above 32 MHz, or 3.0 Volts with 50 MHz. I don't know the operating range for the servos, so you should check if they can stand voltages above 5 Volts. Note that power consumption as a function of the clock frequency is somehow exponential. Typical values are 7.5 mA @ 4 MHz, 17 mA @ 20 MHz, 77 mA @ 50 MHz, and 100 mA @ 75 MHz (with external clock). ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=83815#m86536 Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2005 (http://www.dotNetBB.com)