0% found this document useful (0 votes)
13 views17 pages

Drive Exp-05

The document outlines an experiment focused on familiarizing with various display elements, including 7-segment displays, alphanumeric displays, LCDs, and LED matrix displays. It explains the structure and operation of 7-segment displays, detailing common cathode and common anode types, as well as multiplexing techniques for displaying multiple digits. Additionally, it covers LCD functionality, memory organization, and the operation of dot matrix displays for character representation.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views17 pages

Drive Exp-05

The document outlines an experiment focused on familiarizing with various display elements, including 7-segment displays, alphanumeric displays, LCDs, and LED matrix displays. It explains the structure and operation of 7-segment displays, detailing common cathode and common anode types, as well as multiplexing techniques for displaying multiple digits. Additionally, it covers LCD functionality, memory organization, and the operation of dot matrix displays for character representation.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 17

Experiment-5: Familiarization with different display elements.

Objectives: The objectives of this experiment are:

 To learn about 7-segment display.


 To learn about alphanumeric display.
 To learn about LCD display.
 To learn about LED matrix display.

Seven segment Display

The 7-segment display, also written as “seven segment display”, consists of seven LEDs
(hence its name) arranged in a rectangular fashion as shown. Each of the seven LEDs is
called a segment because when illuminated the segment forms part of a numerical digit
(both Decimal and Hex) to be displayed. An additional 8th LED is sometimes used within
the same package thus allowing the indication of a decimal point, (DP) when two or more 7-
segment displays are connected together to display numbers greater than ten.

Figure 1.9: Seven segment display and pattern of digits and character

Types of 7-segment Display:

The displays common pin is generally used to identify which type of 7-segment display it is.
As each LED has two connecting pins, one called the “Anode” and the other called the
“Cathode”, there are therefore two types of LED 7-segment display called: Common
Cathode (CC) and Common Anode (CA).

The difference between the two displays, as their name suggests, is that the common
cathode has all the cathodes of the 7-segments connected directly together and the common
anode has all the anodes of the 7-segments connected together and is illuminated as follows.
The Common Cathode (CC) – In the common cathode display, all the cathode connections
of the LED segments are joined together to logic “0” or ground. The individual segments are
illuminated by application of a “HIGH”, or logic “1” signal via a current limiting resistor to
forward bias the individual Anode terminals (a-g).

Figure 2.0: Common Cathode 7-segment display.


The Common Anode (CA) – In the common anode display, all the anode connections of the
LED segments are joined together to logic “1”. The individual segments are illuminated by
applying a ground, logic “0” or “LOW” signal via a suitable current limiting resistor to the

Cathode of the particular segment (a-g).

Figure 2.1: Common Anode 7-segment display.

In general, common anode displays are more popular as many logic circuits can sink more
current than they can source.

Displaying in 7-segment display

Figure 2.2 (a): Displaying 3


Figure 2.2 (b): Displaying 3 in common
in common cathode 7-segment
anode 7-segment display
display
A BCD to 7-segment decoder can be used to convert BCD number into 7-segment digit

pattern.

Figure 2.3: Use of 7-segment decoder


Displaying in multiple 7-segment display

Displays connected to the microcontroller usually occupy a large number of valuable I/O
pins, which can be a big problem especially if it is needed to display multi digit numbers.
The problem is more than obvious if, for example, it is needed to display two 6-digit
numbers (a simple calculation shows that 96 output pins are needed in this case). The
solution to this problem is called MULTIPLEXING. Only one digit is active at a time, but
they change their state so quickly making impression that all digits of a number are
simultaneously active.

First a byte representing units is applied on a microcontroller port and a transistor T1 is


activated at the same time. After a while, the transistor T1 is turned off, a byte representing
tens is applied on a port and a transistor T2 is activated. This process is being cyclically

repeated at high speed for all digits and corresponding transistors.

Figure 2.4: Multiplexing technique to show number in multiple seven segment display
Pin diagram of 7-segment display

Figure 2.5: Pin diagram of 7-segment display


Alphanumeric display

Figure 2.6: Alphanumeric display


About LCD Display:

This component is specialized to be used with the microcontrollers, which means that it
cannot be activated by standard IC circuits. It is used for displaying different messages on a
miniature liquid crystal display. A model described here is for its low price and great
capabilities most frequently used in practice. It is based on the HD44780 microcontroller
(Hitachi) and can display messages in two lines with 16 characters each. It displays all
letters of alphabet, greek letters, punctuation marks, mathematical symbols etc. In addition,
it is possible to display symbols made up by the user. Other useful features include
automatic message shift (left and right), cursor appearance, LED backlight etc.

Figure 2.7: LCD Display

Along one side of a small printed board there are pins used for connecting to the
microcontroller. There are in total of 14 pins marked with numbers (16 in case the backlight
is built in). Their functions are described in table below:
Table: Pin functions of 2X16 LCD display
LCD Screen

LCD screen consists of two lines with 16 characters each. Every character consists of 5x8 or
5x11 dot matrix. This book covers 5x8 character display, which is indeed the most
commonly, used one.

Figure 2.8: LCD screen.

Display contrast depends on power supply voltage. For that reason, varying voltage 0-Vdd
is applied on the pin marked as Vee. Trimmer potentiometer is usually used for that
purpose. Some LCD displays have built in backlight (blue or green diodes). When used
during operation, a current limiting resistor should be serially connected to one of the pins
for backlight (similar to LED diodes).

Figure 2.9: LCD contrast adjustment.

LCD Memory

LCD display contains three memory blocks:


DDRAM-Display Data RAM

CGRAM-Character Generator RAM

CGROM- Character Generator ROM

DDRAM Memory: DDRAM memory is used for storing characters that should be
displayed. The size of this memory is sufficient for storing 80 characters. Some memory
locations are directly connected to the characters on display.

All works quite simply: it is enough to configure display to increment addresses


automatically (shift right) and set starting address for the message that should be displayed
(for example 00 hex).

After that, all characters sent through lines D0-D7 will be displayed as a message. In this
very case, displaying starts from the first field of the first line because the address is 00 hex.
If more than 16 characters are sent then all of them will be memorized, but only first sixteen
characters will be visible. In order to display the rest of them, a shift command should be
used. Virtually, everything looks as if LCD display is a window which shifts left-right over
memory locations containing different characters. In reality, that is how the effect of
message shifting on the screen has been made.
Figure 2.10: memory address of DDRAM memory

If cursor is on, it appears at location which is currently addressed. In other words, when a
character appears at cursor position, it will automatically move to the next addressed
location. This is a sort of RAM memory so data can be written to and read from it, but its
contents is irretrievably lost upon the power goes off.

CGROM Memory: CGROM memory contains default character map with all characters that
can be displayed on the screen. Each character is assigned to one memory location.

Table 2.1: CGROM memory address for different character

Addresses of CGROM memory locations match the characters of ASCII. If the program
being currently executed encounters a command “send character P to port” then binary
value 0101 0000 appears on the port. This value is ASCII equivalent to the character P. It is
further written to LCD, which results in displaying the symbol from the 0101 0000 location
of CGROM. In other words, the character “P” is displayed. This applies to all letters of the
alphabet (capital and small), but not to the numbers!

ASCII Code CGROM DDRAM

Character Pattern

Figure 2.11: Process of displaying ASCII character.


As seen on the previous map, addresses of all digits are pushed forward by 48 in relative to
their values (digit 0 address is 48, digit 1 address is 49, digit 2 address is 50 etc.).
Accordingly, in order to display digits correctly it is necessary to add a decimal number 48
to each of them prior to sending them to LCD.

Modification of character map is not possible in CGROM.

CGRAM: This memory works same as CG ROM but as this is RAM we can modify its
content any time. So, this is the place where when have to first store our custom character
pattern, then that pattern can be sent to display.

The HD44780 has total 8 CG RAM memory locations. So, we can generate only up to 8
custom characters. But you can always change the content of CG RAM on the fly to
generate new characters. The addresses of 8 CG RAM locations go from 0x00 to 0x07.

LCD Connection

Depending on how many lines are used for connecting LCD to the microcontroller, there are
8-bit and 4-bit LCD modes. The appropriate mode is selected at the beginning of the
operation in that process called initialization. 8-bit LCD mode uses outputs D0-D7 to
transfer data as explained previous.

The main purpose of 4-bit LED mode is to save valuable I/O pins of the microcontroller.
Only 4 higher bits (D4-D7) are used for communication, while others may be unconnected.
Each data is sent to LCD in two steps- four higher bits are sent first (normally through the
lines D4-D7) and four lower bits are sent afterwards. Initialization enables LCD to link and
interpret received bits correctly.
Figure 2.12: LCD connection with microcontroller.

Besides, data is rarely read from LCD (it is mainly transferred from the microcontroller to
LCD) so it is often possible to save an extra I/O pin by simple connecting R/W pin to the
Ground. Such saving has its price. Messages will be normally displayed, but it will not be
possible to read busy flag since it is not possible to read display as well. Fortunately, there is
a simple solution. After sending a character or a command it is important to give LCD
enough time to do its job. Owing to the fact that execution of the slowest command lasts for
approximately 1.64mS, it will be fairly enough to wait approximately 2mS for LCD.

Dot Matrix Display

In a dot matrix display, multiple LEDs are wired together in rows and columns. This is done
to minimize the number of pins required to drive them. For example, a 8×8 matrix of LEDs
(shown below) would need 64 I/O pins, one for each LED pixel. By wiring all the anodes
together in rows (R1 through R8), and cathodes in columns (C1 through C8), the required
number of I/O pins is reduced to

16. Each LED is addressed by its row and column number. In the figure below, if R4 is
pulled high
and C3 is pulled low, the LED in fourth row and third column will be turned on. Characters
can be displayed by fast scanning of either rows or columns.

Figure 2.13: Dot Matrix Display

Now, we will learn how to display still characters by column scanning in a standard 5×7-
pixel format. Suppose, we want to display the alphabet A. We will first select the column
C1 (which means C1 is pulled low in this case), and deselect other columns by blocking
their ground paths (one way of doing that is by pulling C2 through C5 pins to logic high).
Now, the first column is active, and you need to turn on the LEDs in the rows R2 through
R7 of this column, which can be done by applying forward bias voltages to these rows.
Next, select the column C2 (and deselect all other columns), and apply forward bias to R1
and R5, and so on. Therefore, by scanning across the column quickly (> 100 times per
second), and turning on the respective LEDs in each row of that column, the persistence of
vision comes in to play, and we perceive the display image as still.

You might also like