Pages: 1 [2]   Go Down
Author Topic: Help needed with shift registers  (Read 1482 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Jr. Member
**
Karma: 1
Posts: 60
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Offline Offline
Jr. Member
**
Karma: 1
Posts: 60
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

So i got my cube working and all smiley. 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??
« Last Edit: February 19, 2013, 11:27:43 am by WonderTiger » Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17292
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

So i got my cube working and all smiley. 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

Logged

Offline Offline
Jr. Member
**
Karma: 1
Posts: 60
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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).
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 533
Posts: 26934
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

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.

Offline Offline
Jr. Member
**
Karma: 1
Posts: 60
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
« Last Edit: February 20, 2013, 10:28:23 am by WonderTiger » Logged

Offline Offline
Jr. Member
**
Karma: 1
Posts: 60
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 533
Posts: 26934
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Well, 10K is only 0.5mA of pulldown - you could go stronger, like 1K for 5mA of pulldown.  Arduino will drive it high okay.
Logged

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.

Offline Offline
Jr. Member
**
Karma: 1
Posts: 60
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

So I tried 1k, still some very faint flashes on powering up smiley-sad
Logged

Offline Offline
Jr. Member
**
Karma: 1
Posts: 60
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 smiley!
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 533
Posts: 26934
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Cool.
Logged

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.

Offline Offline
Jr. Member
**
Karma: 1
Posts: 60
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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)?
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 533
Posts: 26934
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.

* 74hc595_TI.pdf (914.58 KB - downloaded 2 times.)
Logged

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.

Offline Offline
Jr. Member
**
Karma: 1
Posts: 60
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Pages: 1 [2]   Go Up
Jump to: