Overview
Using 74HC595 shift registers, we can drive any display such as 7-segment or a dot matrix. It saves the controller pins with only three control signals requirements. These control signals are:
- Serial Clock
- Serial Data
- Enable pin
Two extra power supply pins are VCC and GND. Using these three pins we can drive a large amount of shift register as we need, for example 10 8-bit shift register.
 |
A sample images of SN74HC595N from online store.
|
 |
Pins And Logic Diagram Of SN74HC595
|
 |
Timing Diagram
|
I make a single seven segments board driven by a single 74HC595 shift registers. I remove this single seven segments from an HP Print/Scan/Copy machine.
 |
Fully Solder Board
|
 |
Copper Side After I Soldered.
|
This board is made using a simple toner-transfer method. I use my own HP laser printer with my hot plate iron at home.
 |
Schematic Diagram. The SSD is common anode type. |
|
The SSD I used here is common anode type. I added three 1N4148 switching diode to reduce the voltage. Since each 1N4148 has a voltage drop of ~1V, thus three of this could make a voltage drop of ~3V. The SSD needs only ~2V of nominal working voltage.
 |
A screen shot of PCB design
|
 |
High Quality Print Copper Side.
|
 |
An optional components side
|
 |
I took a 3D view of this PCB.
|
Design file could be downloaded here. The file Proteus 8 format. Please use the latest version to open.
Arduino Test Program
Arduino is popular due to ease of programming. I test this board with Arduino Uno I possess. I use shiftOut() function to interface to 74HC595. This function is considered as a software SPI. We can declare any pin on Arduino to shift out clock and data.
The syntax of shiftOut() is:
shiftOut(dataPin, clockPin, bitOrder, value)
Where,
dataPin - Serial data output synchronizes with clock
clockPin - Serial clock output
bitOrder - Decide which bit order to transfer first. It could be MSBFIRST or LSBFIRST
value - An 8-bit data to transfer
In this programming interface I use board to display value between 0 and F, since the hexa decimal has 16 values.
The sketch is shown below.
 |
Arduino Test Program
|
 |
Counting reaches 0x0A is hex.
|
No comments:
Post a Comment