728x90

728x90

Wednesday, March 3, 2021

Making A Single 74HC595 Seven Segments Driver For Arduino PIC And AVR

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:

  1. Serial Clock
  2. Serial Data
  3. 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.
 

Making A Single 74HC595 Seven Segments Driver For Arduino PIC And AVR
Pins And Logic Diagram Of SN74HC595
 

Making A Single 74HC595 Seven Segments Driver For Arduino PIC And AVR
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.

 
Making A Single 74HC595 Seven Segments Driver For Arduino PIC And AVR
Fully Solder Board

 

Making A Single 74HC595 Seven Segments Driver For Arduino PIC And AVR
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.

Making A Single 74HC595 Seven Segments Driver For Arduino PIC And AVR
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.

Making A Single 74HC595 Seven Segments Driver For Arduino PIC And AVR
A screen shot of PCB design
Making A Single 74HC595 Seven Segments Driver For Arduino PIC And AVR
High Quality Print Copper Side.
Making A Single 74HC595 Seven Segments Driver For Arduino PIC And AVR
An optional components side

Making A Single 74HC595 Seven Segments Driver For Arduino PIC And AVR
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.
 
Making A Single 74HC595 Seven Segments Driver For Arduino PIC And AVR
Arduino Test Program
 
Making A Single 74HC595 Seven Segments Driver For Arduino PIC And AVR
Counting reaches 0x0A is hex.
 
Arduino test program could be download here
 
 

No comments:

Post a Comment

320x50

Search This Blog

tyro-728x90