Menu

Using a 595 to control a 7-segment LED display

Courtesy/Thanks to: Anything Arduino

Description: This simple sketch and accompanying video shows how to connect an Arduino to a 7-segment LED display using a 74HC595. In the files section you will find the diagram with the binary values for displaying the numbers on the seven segment LED display. Also the sketch

Videos

Video: Using a 74HC595 to connect an Arduino to a 7-segment LED display (Anything Arduino] (ep9)

Comments

You need to be logged in to add a comment.

Added 12/1/2015 12:33:24 AM by kaloxa

int latchPin = 2; //pin 12 on the 595 int dataPin = 3; //pin 14 on the 595 int clockPin = 4; //pin 11 on the 595 void setup() { pinMode(latchPin, OUTPUT); pinMode(dataPin, OUTPUT); pinMode(clockPin, OUTPUT); } void loop() { //0 digitalWrite(latchPin, LOW); shiftOut(dataPin, clockPin, MSBFIRST, 64); digitalWrite(latchPin, HIGH); delay(1000); //1 digitalWrite(latchPin, LOW); shiftOut(dataPin, clockPin, MSBFIRST, 121); digitalWrite(latchPin, HIGH); delay(1000); //2 digitalWrite(latchPin, LOW); shiftOut(dataPin, clockPin, MSBFIRST, 36); digitalWrite(latchPin, HIGH); delay(1000); //3 digitalWrite(latchPin, LOW); shiftOut(dataPin, clockPin, MSBFIRST, 48); digitalWrite(latchPin, HIGH); delay(1000); //4 digitalWrite(latchPin, LOW); shiftOut(dataPin, clockPin, MSBFIRST, 25); digitalWrite(latchPin, HIGH); delay(1000); //5 digitalWrite(latchPin, LOW); shiftOut(dataPin, clockPin, MSBFIRST, 18); digitalWrite(latchPin, HIGH); delay(1000); //6 digitalWrite(latchPin, LOW); shiftOut(dataPin, clockPin, MSBFIRST, 2); digitalWrite(latchPin, HIGH); delay(1000); //7 digitalWrite(latchPin, LOW); shiftOut(dataPin, clockPin, MSBFIRST, 120); digitalWrite(latchPin, HIGH); delay(1000); //8 digitalWrite(latchPin, LOW); shiftOut(dataPin, clockPin, MSBFIRST, 0); digitalWrite(latchPin, HIGH); delay(1000); //9 digitalWrite(latchPin, LOW); shiftOut(dataPin, clockPin, MSBFIRST, 24); digitalWrite(latchPin, HIGH); delay(1000); }

Report Abuse   

Added 5/13/2015 5:08:43 AM by supercoco43

this is ok

Report Abuse   

Editing and adding
You need to be logged in to edit and add files and urls etc.
Categories & Tags
Popular tags for this:


You must be logged in to add tags.

Similar on Ebay
Files
img_2379.jpg The diagram for the binary values to send to the 74hc595 to display the different numbers on a 7-seg
img_2383.jpg Picture showing the setup arduino-595-7segment led display
74ls595_7_seg.pdf Diagram for writing hexadecimal number 0-9 & A-F on a 7 segment display using the 595.
using_a_74595_adruino_7_s .ino file for the 595 control of 7-segment LED display
Parts used
74HC595 8-bit serial-in, serial or parallel-out shift register with output latches; 3-state
Common Anode 7-segment LE 7 segment LED display used to display numbers.
Videos