7 SEGMENT INTERFACE WITH AVR MICROCONTROLLER A. D. Patel Institute Of Technology EC :- Sem VPresent By :- Pratik Makadia ( ) 23 June
Introduction Seven segment displays are very common for electronic product to display numerical output. Many common devices like calculators, watches, electronic weighing scales, ovens etc use them. You must have also seen in our ADIT lifts display the current floor numbers in seven segment displays. 23 June
Fundamentals A seven-segment display is so named because it is divided into seven different segments that can be switched on or off. The different combination of these segments switched on produces different English numbers. The display also has a decimal point. 23 June
The figure shows a seven segment display and the names of the various segments. For example if you want to display number 4 then segments that will be ‘on’ are {f, g, b, c} while rest are ‘off’. Basically the seven segments are just LEDs. The one common end of all the leds are connected while the rest are available. Depending on whether anode or cathode of all the leds are common they are of two types. 23 June
1)Common anode 23 June ) Common cathode
PIN Configuration these displays should have nine pin( one for each segment + decimal point +common). but the available modules have two pins for common. They are internally connected. So they have total of 10 PINs. 23 June
Interfacing with MCU Interfacing these displays are same as interfacing LEDs with MCU. I have interfaced a common anode(+) 7 segment display with PORTD of AVR using 8-PIN connectors. The segments will be "on" when levels on the PORT is low, that is June
Block Diagram Of Interfacing 23 June
Table for all 16 hexadecimal digits and values for all segment to need turn on the proper segment. DigitHex Value g f e d c b a 00x3F x x5B x4F x x6D x7D x June DigitHex Value g f e d c b a 80x7F x6F A0x B0x7C C0x D0x5E E0x F0x
Programming These displays are very easy to program in C. The controller is initialized by sending three commands: 1) Turning on its internal oscillator 2) Enabling display output 3) Setting the brightness level Brightness is adjusted from 0 (dimmest) to 15 (brightest). 23 June
23 June