Home \ Help \ Search \ Login RSS

Welcome, Guest. Please Login

This forum is now READ-ONLY! Please visit http://forum.wiring.co/ for the new forum.

Wiring ForumWiring HardwareTangible computing › simple diagram for shift register?

Page Index Toggle Pages: 1
simple diagram for shift register? (Read 5919 times)
10/27/06 at 15:33:41

mattgilbertnet   Offline
YaBB Newbies
I Love YaBB 2!

Posts: 4
*
 
hey,

can anyone provide a simple diagram for hooking up a shift register, such as the 74HC595, to the wiring board?

thanks,

matt
 
IP Logged
 
Reply #1 - 10/30/06 at 17:16:24

barragan   Offline
YaBB Administrator

Posts: 939
*****
 
Yes, I'll post it later today.
 
IP Logged
 
Reply #2 - 10/31/06 at 14:33:35

mattgilbertnet   Offline
YaBB Newbies
I Love YaBB 2!

Posts: 4
*
 
right on, thanks a lot. looking forward to it.
 
IP Logged
 
Reply #3 - 11/03/06 at 07:23:56

barragan   Offline
YaBB Administrator

Posts: 939
*****
 
Sorry Matt, It's been crazy here, but it is quite simple, you need 3 pins on the Wiring board to drive the shift register lines SER(14), SCK(11), and RCK(12) of the shift register), let's say you use wiring pin 0 to drive the SER (data line) wiring pin 1 for SCK and wiring pin 2 for RCK. That's all you need on the Wiring side. The SCL(10) of the register goes to Vcc. You'll have the shift register outputs on pins 15, 1, 2, 3, 4, 5, 6, 7. I promise a really nice diagram for the weekend.
 
IP Logged
 
Reply #4 - 11/05/06 at 00:14:45

mattgilbertnet   Offline
YaBB Newbies
I Love YaBB 2!

Posts: 4
*
 
thanks for the info. i have one probably silly question though. how do I pulse SCK?
 
IP Logged
 
Reply #5 - 11/06/06 at 21:22:28

barragan   Offline
YaBB Administrator

Posts: 939
*****
 
Here there is a small example to set all the outputs of the shift register to HIGH (255)

int data = 0; // Wiring pin 0 for data
int clock = 1;  // Wiring pin 1 for clock
int strobe = 2;  // Wiring pin 2 for the strobe
 
void loop() {
  digitalWrite(clock, LOW);   // sets clock to LOW
  digitalWrite(strobe, LOW); // pulse strobe
  digitalWrite(strobe, HIGH);
  for(i = 0; i < 8; i++) {
    digitalWrite(data, HIGH);  // sets data to 255 (all 8 bits HIGH)
    digitalWrite(clock, HIGH); // pulse clock
    digitalWrite(clock, LOW);
  }
  digitalWrite(strobe, LOW); // pulse strobe again
  digitalWrite(strobe, HIGH);
}
 
IP Logged
 
Page Index Toggle Pages: 1