Go Down

Topic: 74HC595 and 7 segment display -> Control Library (Read 1 time) previous topic - next topic

alhinde

May 31, 2012, 10:43 pm Last Edit: Jun 01, 2012, 07:05 pm by hikke Reason: 1
i wrote a library for control a 7-segment display(common cathode) with a 74HC595 ic.

Download -> Library
LINK -> Description, Pin connections

Code: [Select]
//Object initialisation
AH_74HC595(int SER_Pin, int RCLK_Pin, int SRCLK_Pin);

//Register functions
void setPin(int index, boolean value);
void setAll(boolean value);
void setValue(byte value);
void shift(boolean value);
void rotate();

// 7-Segment display functions
void showNumber(byte number);
void showSign(char sign);
void setPoint(boolean value);


samwell

Cool!
In case someone's got a common anode 7 segment LED display then there is sample code and a tutorial at:
http://lucidtronix.com/tutorials/41
Sparkfun has big 7segment common anode leds:
https://www.sparkfun.com/products/8546

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!

Arduino
via Egeo 16
Torino, 10131
Italy