Go Down

Topic: 74HC595 (Read 771 times) previous topic - next topic


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


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
Code: [Select]

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:
Code: [Select]

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:
Code: [Select]

digitalWrite (SS, LOW);
digitalWrite(SS, HIGH);

Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

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