Pages: [1]   Go Down
Author Topic: 74HC595 and 7 segment display -> Control Library  (Read 1290 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 1
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

i wrote a library for control a 7-segment display(common cathode) with a 74HC595 ic.

Download -> Library
LINK -> Description, Pin connections

 
Code:
//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);

« Last Edit: June 01, 2012, 12:05:11 pm by hikke » Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 15
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Pages: [1]   Go Up
Jump to: