Go Down

Topic: 595 Shift Registers (Read 634 times) previous topic - next topic


I need some help programing with shift registers... i am driving 3 8x8 LED displays and need some good resources on shift registers and Arduino programing for a compete software beginner.
Tyler LaVite




I have read that entire document and it makes literally not an ounce of sense to me for writing a sketch for controlling 3 matrices with shift registers.
Tyler LaVite


May 21, 2009, 04:30 pm Last Edit: May 21, 2009, 04:32 pm by Grumpy_Mike Reason: 1
Some of the code from: http://arduino.cc/en/Tutorial/ShftOut21

in setup add:-
rowEnable = 1;

then in the main loop add the lines in red
void loop() {
 //count up routine
 for (int j = 0; j < 256; j++) {
   //ground latchPin and hold low for as long as you are transmitting
   digitalWrite(latchPin, 0);
   //count up on RED LEDs
   shiftOut(dataPin, clockPin, j);
   //count down on BLUE LEDs
   shiftOut(dataPin, clockPin, 255-j);
   //enable the row
   shiftOut(dataPin, clockPin, rowEnable);
   rowEnable = rowEnable <<1;
   if(rowEnable >0x80) rowEnable = 1;
   //count up on Green LEDs
   shiftOut(dataPin, clockPin, j);

   //return the latch pin high to signal chip that it
   //no longer needs to listen for information
   digitalWrite(latchPin, 1);

This will display very slowly but you will get the idea.


two 595s can work together something like a MAX7221. You may want to read that documentation first.


Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131