This is a continuation of this old thread. I took too long working on this project, and it won't let me reply to the old thread anymore.
http://forum.allaboutcircuits.com/showthread.php?t=58189
Hello again everybody. I've finally picked this project back up recently, and I'm very close to being done now. I'll post some pictures when I get it all wrapped up (hopefully this week). It works about 99% right now. Here is the pesky 1% issue. When a light is supposed to be on, it is. When a light is supposed to be off, it almost is. It will remain just barely visibly on. It took me a while to even notice it next to the lights that are on. At first I thought it was light reflecting back at the led's, but on closer inspection, I found it really is on. When the output enable is switched off (high, since it's active low on the stpic595), all the lights go completely out as they should. I can't think of what this could be. I have a picture showing how each segment is connected. I don't see anything in the physical circuit that should make it behave this way, but that doesn't mean there isn't something I missed.
So maybe it's a code problem? Here is how I'm talking to it. CLR is always connected to +5v through a resistor. All the communication with the shift register is +5v or 0v signals. G (output enable) is controlled elsewhere in the program, so it can be turning on and off while data is shifting around.
1. Set RCK low
2. Set SER-IN high or low for the bit
3. Set SRCK high
4. Set SRCK low
5. Repeat steps #2-4 7 more times (or more if chaining multiple SRs
6. Set RCK high
There are some slight differences to how the datasheet shows the communication (they only turn on G when data is done transferring, RCK is only pulsed momentarily in their diagram (whereas I leave it high when not sending data), they actually use CLR). I don't think these should matter if I'm understanding it correctly, though. So any ideas?
http://forum.allaboutcircuits.com/showthread.php?t=58189
Hello again everybody. I've finally picked this project back up recently, and I'm very close to being done now. I'll post some pictures when I get it all wrapped up (hopefully this week). It works about 99% right now. Here is the pesky 1% issue. When a light is supposed to be on, it is. When a light is supposed to be off, it almost is. It will remain just barely visibly on. It took me a while to even notice it next to the lights that are on. At first I thought it was light reflecting back at the led's, but on closer inspection, I found it really is on. When the output enable is switched off (high, since it's active low on the stpic595), all the lights go completely out as they should. I can't think of what this could be. I have a picture showing how each segment is connected. I don't see anything in the physical circuit that should make it behave this way, but that doesn't mean there isn't something I missed.
So maybe it's a code problem? Here is how I'm talking to it. CLR is always connected to +5v through a resistor. All the communication with the shift register is +5v or 0v signals. G (output enable) is controlled elsewhere in the program, so it can be turning on and off while data is shifting around.
1. Set RCK low
2. Set SER-IN high or low for the bit
3. Set SRCK high
4. Set SRCK low
5. Repeat steps #2-4 7 more times (or more if chaining multiple SRs
6. Set RCK high
There are some slight differences to how the datasheet shows the communication (they only turn on G when data is done transferring, RCK is only pulsed momentarily in their diagram (whereas I leave it high when not sending data), they actually use CLR). I don't think these should matter if I'm understanding it correctly, though. So any ideas?