Pages: [1]   Go Down
Author Topic: 74HC595  (Read 388 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Jr. Member
Karma: 0
Posts: 76
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

hi guys
         how can i output numbers in desending order, (say 20 - 00)  using 74HC595 shift register IC using an arduino uno???????

         this output is needed to run seven segment display

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

Here's a couple of ways to connect one up.

To drive it, you will create an array of fonts, where each byte represents the on/off state of the segments
fontArray[] = {
B00111111, // 0
B00000110, // 1
B01011011, // 2
Bit 0 is segment A
1 is B,
2 is C,
3 is D,
4 is E,
5 is F,
6 is G
F       B
E       C
7 would be decimal point if used
Then when you select number you want to display, you pull the information from the array.
I prefer using SPI to transfer data out, nice & fast:
digitalWrite (SS, LOW);
digitalWrite(SS, HIGH);
If you have 2 digits, then daisy chain OutH/ to SerialDataIn, with SCK & SS going to both chips in parallel
Then just send out 2 bytes:
digitalWrite (SS, LOW);
digitalWrite(SS, HIGH);

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

Pages: [1]   Go Up
Jump to: