Pages: [1]   Go Down
Author Topic: 595 Shift Registers  (Read 469 times)
0 Members and 1 Guest are viewing this topic.
Jerseyville IL,
Offline Offline
Jr. Member
**
Karma: 0
Posts: 64
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Tyler LaVite
tlavite@gmail.com

0
Offline Offline
God Member
*****
Karma: 0
Posts: 731
skcor oniudrA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

http://www.arduino.cc/en/Tutorial/ShiftOut
Logged

Jerseyville IL,
Offline Offline
Jr. Member
**
Karma: 0
Posts: 64
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Tyler LaVite
tlavite@gmail.com

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 597
Posts: 33314
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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);
    delay(1000);
  }
}

This will display very slowly but you will get the idea.
« Last Edit: May 21, 2009, 09:32:37 am by Grumpy_Mike » Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 118
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

http://www.arduino.cc/playground/Main/MAX72XXHardware#WiringLedMatrix
Logged

Pages: [1]   Go Up
Jump to: