Go Down

Topic: Help needed with shift registers (Read 1 time) previous topic - next topic

WonderTiger

Then I will use your sequence, after all it looks like the best sequence out of the three i can choose. Thanks again!

WonderTiger

#16
Feb 19, 2013, 05:23 pm Last Edit: Feb 19, 2013, 05:27 pm by WonderTiger Reason: 1
So i got my cube working and all :). Only thing is that i still get a really faint flash on all leds (pretty hard to see because its maybe on for a millisecond or so). I tried lowering my pull down resistor to 3k but i still see the flashes. Maybe someone know why I still get flashes??

retrolefty


So i got my cube working and all :). Only thing is that i still get a really faint flash on all leds (pretty hard to see because its maybe on for a millisecond or so). I tried lowering my pull down resistor to 3k but i still see the flashes. Maybe someone know why I still get flashes??



I suspect it's the way you are managing the latching sequence Vs level enabling, but just a guess. You should enable a level only after all the shifting of data for that level is done and the latch set to output the value, only then should you enable that level for the time duration you have set for your scan timing, then disable that level, do the shifting/latching for the next level and then enable that next level. Lather, rinse, repeat.


Lefty


WonderTiger

The problem is not with latching data out, but the leds are flashing when i connect my arduino to my laptop via usb (so when the arduino gets powered up). So im already using a pull down resistor on the latch I get significant less flashing on powering up. However its not completely gone(like 1ms flash or so).

CrossRoads

Have you considered a pullup on the shift register's OE pin, and have your sketch pull it low when you're ready for  output to begin showing up?
Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

WonderTiger

#20
Feb 20, 2013, 04:23 pm Last Edit: Feb 20, 2013, 04:28 pm by WonderTiger Reason: 1
Im going to try a 10k from OE to 5V and see if that works, ill report back!

Btw, i wrote a piece of code in the void setup to put all latches to low and shift out B00000 (each zero is a LED in off state) to all shift registers

WonderTiger

So I tryed it on a single shift register but no luck, its still flashing when getting powered up. However when I put a 10k resistor on the latch to ground on a single shift register on my breadboard it won't flash at all, but on my cube with 6 registers it will flash when using a 10k pull down resistor.

CrossRoads

Well, 10K is only 0.5mA of pulldown - you could go stronger, like 1K for 5mA of pulldown.  Arduino will drive it high okay.
Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

WonderTiger

So I tried 1k, still some very faint flashes on powering up :(

WonderTiger

Got it fixed, I was so stupid to shift out B00001 instead of B00000 at the void setup(I shift out B00000 to clear out all the shift registers). So I got it fixed :)!

CrossRoads

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

WonderTiger

Ok...Another question. For now I have my Master Reset/Reclear tied to 5v. However I want to control the MR.
Now is it right when I pull the MR to LOW that all the shift registers will be cleared, and the bytes that were in the shift registers are gone(even when I set it to HIGH again)?

CrossRoads

Ok, pull MR high with 10K resistor, have your sketch pull it low when you want to clear the input register.
Outputs will go low on the next rising edge of the output register clock; See the final RCLK on the diagram on page 4.
Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

WonderTiger

Thanks! Thats exactly what I was looking for. This is faster and easier then writing 0's to the shift registers.

Go Up