Hey all--
I know more about software than hardware, but I'm designing a demonstration application for the JStamp, an embedded java processor. The application is a quad servo controller. (I'm referring to the hobby servo's that are used in robotics and modeling.) The JStamp has two dedicated circuits for generating PWM signals continually varying duty cycles.
My plan is to use one of these to drive 4 servos (and theoretically more than that) at once. Each servo requires a +5V pulse train with a 20 ms period and a duty cycle ranging from 5-10%. Therefore, I figure I can output 4 pulses every 20 ms instead of just one, and simply direct one of each of the pulses to each of the 4 servos in turn.
Now like I said, I'm not an EE, so I don't know exactly how to do this. My sense is that I need a demultiplexer. I looked at the data sheet for one that is stocked in my school's lab, and it seems to do what I want, except that it uses active low outputs. So I suppose I would need to use an inverter to get my signal flipped back around the way I need it. Are there demultiplexer chips which preserve the polarity of the original signal? Fewer ICs is better, I wanted to build this on a real small protoboard.
Also, the other issue is how to select an output line from the 4 available on the demux. I could use two output pins from the JStamp to select this line manually, but doing this in software seems cumbersome. I think a cleaner idea would be to use the PWM output to drive a counter. On each negative edge, the counter would increment, and the counter's output would be configured as the address select for the demux. The counter would reset when it got to 4. Is this a clean way to do this?
I'm trying to take propagation times into account to decide if I'm making a blunder here. The demux I'm looking at (an LS155, btw) propagates signals in anywhere from 30-50 ns...definitely fast enough. But I'm worried that if I have to wire up an inverter on my breadboard, that is going to slow things down into the range of a few microseconds, and I'm don't have the experience to know if that is too much delay.