Trouble Using PulsePosition Library with Shift Register

Status
Not open for further replies.

Omacitin

Member
[Solved] Trouble Using PulsePosition Library with Shift Register

Hey all,

I'm attempting to use Paul's PulsePosition library to interface with a group of servos, but I haven't been able to get the shift register to output anything useful. The library appears to be working flawlessly, using the sample code he provided.

I wired according to the shift register section on the library's page, double checking the data sheet to make sure it was right.

Here's a picture of the breadboard; I hope stuff is visible.

BB.jpg

Pins 1, 2, and 9 - framePin (yellow)
Pin 7 - Ground
Pin 8 - txPin (red)
Pin 14 - +5v

I tried moving wires around, such as switching the tx and frame pins, unplugging random stuff to see if there was a change in pinouts, etc. No dice. Rewired everything a couple times, too. Oh, and switched out the chip to make sure it wasn't the IC itself.

Here's what I'm getting from the pins in the above configuration:

Sniffer.jpg

Channel 0 is connected to Pins 1, 2, and 9
Channel 1 is connected to Pin 8
Channel 2 is connected to Q0 (Pin 3). All other outputs (4-6, 10-13) are LOW all the time.

Do you guys have any ideas? It's probably something dumb, but I don't know what.

Thanks!
 
Last edited:
your logic analyzer image looks OK for frame pin and Tx pin (pulses). I wonder about "Channel 0 is connected to Pins 1, 2, and 9" -- pin 9 should be high once sketch starts, so tying it to pins 1,2 (which go low during frame) seems suspicious.

Shift reg pin 9 should go to teensy pin 2, so it can pull it high.
 
Last edited:
You're right! I went back and looked at the data sheet and library, and it makes no sense to connect it to the framePin. The instructions on the library weren't connected to the sketch, so I didn't see that pin 2 on the Teensy was being turned on for that reason.

So, pin 9 on the register is now being held high by pin 2 on the Teensy, instead of being connected to pin 2 on the register, and everything is working great.

Thanks!
 
I also had the problem that there was no usable output until I cut the connection between the HC164's "clear" pin and the "Frame" signal. I tied it to 3.3 V instead.

Paul should probably remove that suggestion from the library page.
 
Status
Not open for further replies.
Back
Top