Design and Construction of A Dot-Matrix Display Using AT89C4052 Microcontroller and Decoders

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

Design and Construction of a Dot-Matrix Display

Using AT89C4052 Microcontroller and Decoders


C.J Ezeilo, Igboebisi Ikechukwu, C.U Mezi, K.A Akpado, Ajakor Uchechukwu

Abstract It has features like central processing unit (CPU), memories


This article explains the technics in designing of a moving in the case of RAM-random access memory, ROM-read only
message display DOT-Matrix, used in displaying information to memory, registers, input and Output units and other peripherals.
the general public electronically. This display consists of a In the course of this project I will be using ATMEL
regularly arranged light emitting diodes (LEDs) indicators in a microcontroller called AT89C2051. This was chosen because
rectangular topology, in such that by periodic switching ON or of its good memory management and flexibility in usage.
OFF selected lights by the microcontroller on various columns and ii. Decoders/DE multiplexers: These devices are used in
rows in different segments of display screen, texts or graphics are decoding the output signals coming from the output port of a
formed. The microcontroller used in this dot-matrix display
microcontroller to the screen display. This is achieved using
converts logical instruction code stored in the program memory of
the microcontroller into signals which turns ON or OFF LED light
fewer pins as input to it and generating as many output pins,
in a symbolic logical order, so as to display required character or depending on the number of input pins and type.
images pre-determined by the instruction code. The design process In this project, I am using three decoders (one-74138 and
involves ATMEL 89C4052, 3 to 8-line and a three-state two-74154).
buffer/latch used as the main hardware component while MIDE iii. Latch: The latching device used on this project is a 3-
was used as software development tool for the program code. state buffer (74244) used to boost/amplifier the current signal
coming out from the microcontroller and as well help in
Keywords providing a screen delay that will enable visibility of the
LEDs, AT89c52 Microcontroller, 74LS138 Decoders, 74LS244 message printed on the screen. These buffers/line drivers are
Buffers/latch designed to improve both the performance and PC board
density of 3-state buffers/drivers employed as memory-address
drivers, clock drivers, and bus-oriented transmitters/receivers
I INTRODUCTION [4]. This 74244-IC is a 20-pin dual-line package device, that
A dot-matrix display is a display device used to display has two independent control section inside, each with 4-input
information on machines, clocks, railway departure indicators and 4-output, making a total of 8-input pins and 8-output pins.
and many other devices requiring a simple display device of It has two enabling pins which are all active low, and then VCC
limited resolution [1]. and ground.
i. Microcontroller: This is a computer-in-chip device iv. Drivers Unit: These are the switching section of the
that is used in controlling the circuit. Being a computer-in-chip circuit comprising of transistors and resistors configure as
means it has all the features of a simple which enables it to inverter, used in driving/selecting each of the screen display
function alone independently. columns. For the course of this project BC557 and 1k one
quarter watt resistors are used, because of the output of the
Manuscript received on 03/20/2017; revised on 04/10/2017 decoder 74138 which is active low.
Design and Implementation of a Moving Message Dot-Matrix Display Using v. Screen: This is the display output interface where the
At89c52 Microcontroller and Decoders.
Ezeilo Chibuike Justin is a student with Electronics and Computer Engineering, message that is to be display by the microcontroller as
Nnamdi Azikiwe University Awka, PMB 5025 Nigeria, internee with instructed by my program code that will be displayed in real
Electronics Development Institute, Awka, Anambra State, time. The screen comprises of two-hundred and twenty-four
Nigeria.(Phone:+2348036370366;email:ezeilochibuikejustin@gmail.com)
Igboebisi Ikechukwu is with Electronics Development Institute, Awka,
LEDs (light-emitting diodes) arranged in rows and columns.
Anambra State, Nigeria (email: bigaike@yahoo.com) vi. Power Supply Unit: This section provides power
C. U Mezi is with department of Electronics and Computer Engineering, source in the form of DC-current and DC-voltage. This is made
Nnamdi Azikiwe University Awka, PMB 5025, Anambra State Nigeria.(email:
nwaogboji@gmail.com)
possible by the use of step-down transformer, rectifier diode,
K. A Akpado is with department of Electronics and Computer Engineering, filter capacitor, voltage regulator and indicator light with
Nnamdi Azikiwe University Awka, PMB 5025, Anambra, State Nigeria.(email: current limiting resistor attached to it.
k.akpado@unizik.edu.ng)
Ajakor Uchechukwu is with department of Electronics and Computer
Engineering, Nnamdi Azikiwe University Awka, PMB 5025, Anambra State,
Nigeria (up.ajakor@unizik.edu.ng)
Component Description
i. AT89C4051: This is an ATMEL version of a low-
voltage, high-performance CMOS 8-bit microcontroller with
4K bytes of Flash programmable and erasable read-only
memory [2]. This 8-bit microcontroller comprises of two
input/output port, with each port having 8-pins on it,with port 1
having 8 pins, out of which two pins p1.0 & p1.1 are
floating(i.e. at high impedance) needing an external pull-up
resistor before usage. While port 3 have 8 pins, out of which 7
pins are available for usage, with p3.6 hardwired.And finally
Pin 20 is the positive supply of the microcontroller called VCC.
For the purpose of this project, I made use of port 1 as output
port to the latch unit (74LS244) and port 3 as the output port to
the decoders (74LS138).

ii. 74LS244: This is a three-state/buffer IC used in


latching the screen, in this case the rows of the dot matrix. This
component has 20 pins, of which 8 pins are the input pins, while
another 8 pins is the output pins and its output and input pins
are not linearly positioned. Pin 1 and Pin 19 are the enabling
pins and both are active low, meaning it has to be given a low
or 0(ground) to activate the IC. Pins(2,4,6,8,11,13,15 & 17) are
the input pins of the IC, while Pins(3,5,7,9,12,14,16 & 18) are
the output pins of the IC. Pins 10 and 20 are the ground and
VCC respectively. The port 1 of the microcontroller are
received through input pins of this component and after logical
manipulation has been performed on it by the gates, then sent
Figure1: Block Diagram of a Dot-Matrix Display out through the output pins of the IC, to drive each row of the
dot matrix.
II METHODOLOGY For the purpose of this project, I made use of seven input
and output pins of the IC.
iii. 74LS138: this component is a 3-to 8-line decoder used
in decoding the output of the port 3 of the microcontroller. This
decoder comprises of 16 pins, out of which three are the input
pins(1, 2 & 3), another three are the enabling pins(4,5 & 6;
where 4 & 5 are active low and 6 is active high) and another 8-
pins are the output pins(7,9,10,11,12,13,14 & 15). While pin 8
and pin 16 are the ground and VCC respectively.
For the purpose of this project enable pins of decoder 74138
are connected to the output pin 7 & 8 of the AT89C4052. The
outputs of this decoder are connected to the switching transistor
BC557 through a base biasing resistors.
iv. BC557 & 1K Resistor: these two components are what
make-up switching part/driver section of the circuit. The BC557
is a PNP type low signal bi-polar transistor together with its
base biasing resistor 1-kilo ohms which is rated ¼ watt. ¼ watt
was chosen because of its small size, thereby occupying little
space and also its low power dissipation property compared to
bigger sizes. The BC557 is a center based type of bi-polar
transistor. The output of the decoder passes through a resistor
to their bases, while the emitter terminal was connected to
positive signal (i.e. VCC) permanently. Then this flows out
through the collector terminal to the various columns of the
screen, as soon as the base has been biased.
BC557 was used for the purpose of this project because the
outputs of the decoders that will biases its base are active low
Figure2: Circuit Schematic Diagram
(i.e. negative signal). So to achieve inversion, I needed a by a 5V regulator (7805), which according to its datasheet
negative based PNP type bi-polar transistor. requires a minimum voltage of 7V coming in to it as input
v. Board/Screen and LED: For the purpose of this before it will regulate it to 5V.
project I chose 5x7 character design model and because I - Rectifying Diode: this is a component that is used in
wanted it to be displaying 6-characters at once, I went for 32x7 converting the AC voltage from the output of a transformer to
(i.e. 32-columns and 7-rows). a DC voltage. For the purpose of the project, I chose 1N4007
Here I made use of ceiling board sheet instead of perspex connected in a bridge topology. The reason is that, the output
because of the number of advantages it offers as against current rating of the transformer is 500mA and according to
perspex, advantages like; 1N4007 datasheet, it can be able to source up to 1000mA and a
i. Easiness to drill and work on, maximum voltage of 600V.
ii. Low cost as compare to perspex. - Filter Capacitor: This is where filtration process takes
But though it has its own disadvantages like; place, filtering off trace of AC ripples from the rectified DC
i. Tear due to rough handling voltage. The value of the capacitance and voltage of the
ii. Consumes more paint capacitor is much more dependent to the output supply from the
Design and Construction transformer.
- Marking out and cutting of the board: How to calculate the capacitance of the filter capacitor
Since I am designing 32x7, then means that the number of Capacitance C, = Quantity of current Q
holes/LEDs to be perforated/inserted is; Ripple voltage Vr
32 multiply by 7, which is 224 holes. Where Q= IT but recall that T= 1/F
The size of my board will be: 28 inches by 7 inches Therefore Q= I/F
LED size: 5mm Where I is the current rating of the transformer
The hole spacing at columns and rows is 20mm. F is the frequency of the transformer
I used metal rule and pencil to do my markings on the board. Since our Transformer rating is; I = 500mA
- Hole drilling: I used a hand electric drilling machine with F = 50Hz
a drilling bit size of 5mm as regards the size of the LED that I Vrms = 12VAC
was using, to bore a hole on the board through those markings Peak voltage Vp = Vrms √2
on the board. = 12√2
- Spray Paint: for this project I made use of ABRO spray = 16.971VMAX
paint black, because of its fast drying quality and smoothness. The biasing voltage of a silcon diode is 0.7V, therefore the
- Insertion of LEDs and Soldering: In this section the two diodes is
LEDs was inserted in a definite pattern of arrangement. For the = 2 x 0.7V
course of this project, I adopted common cathode arrangement = 1.4V
of the LEDs. Whereby all the cathode on a row are joined Then,
together, while the anode are connected together along the Vr = 16.971 – 1.4 – 7V
column. After which soldering took place. = 8.571V
POWER SUPPLY UNIT Since the diode setup is in a modified full wave rectification,
Components that makes up a simple power supply unit are; the frequency is doubled.
vi. Step-down Transformer I.e. F = 2 x 50Hz = 100Hz
vii. Rectifying Diode Therefore,
𝐼
viii. Filter Capacitor C=
𝐹𝑉𝑟
ix. Voltage Regulator 500 ×10−3
x. Indicator Light =
100 ×8.571
- Step-down Transformer: A step-down transformer is = 5.833625 x 10-4 F = 583.36 µF
used in stepping down the input voltage of an AC supply to a The maximum operating voltage of the capacitor is gotten by
lower output voltage still AC. For the purpose of this project, I multiplying the ripple voltage Vr, by a factor 1.5. This is a
chose 12x1: 220VAC – 12VAC / 500mA Transformer. standard for all capacitors.
Why I chose 12x1 instead of 12x2 Operating voltage = Vr x 1.5
Since from our circuit schematic diagram, there is no section = 8.571 x 1.5 = 12.8565V
that requires a negative voltage, because using 12x2 type, it Therefore any capacitor from 16V rating and above is good,
simply mean that the transformer has two output supply wire to avoid the capacitor blowing up due to excessive voltage.
and a center tapped which is the ground. So in other to reduce - Voltage Regulator: This component keeps the output
cost and complexity of the circuit, I made use of 12x1 which voltage from the capacitor to a constant value as long as its
does not have center tapped terminal. minimum operating voltage as required by its datasheet. They
Why 12VAC/500mA output supply was used have a number of unique build-in features such as current
The need for 12VAC/500mA output arises from the fact that limiting, self-protection against over-temperature, remote
in our circuit schematic, all the components that I used in the control operation over a wide range of input voltages and fold
circuit makes use of 5VDC supply. And this is made possible back current limiting [5]. In the case of this project, I made use
of LM7805, which by its datasheet requires a minimum input IV CONCLUSION
voltage of 7VDC to be able to give out 5V regulated voltage The use of digital displays in our electronic circuits and
output. gadgets has over the years gotten a lot of recognitions and
- Indicator light: indicator light is incorporated in the acceptance in the world of digital/embedded systems designs
power supply section, to indicate when the circuit is active. The and our daily lives. This has made it possible for us to pass out
indicator light is an LED bulb connected in series with a information digitally using logical devices like microcontrollers
1KiloOhm current limiting resistor, to protect it against and decoders to the general public. This displays can assume
excessive current that will damage it. many forms and shapes, it can be in the form of a public notice
Project Implementation, Testing and Results board, digital clocks, Television sets etc.
This is where the workability of the circuit, ideas and REFERENCE
laydown technicalities are being enforced. I achieved this using [1] Dot-matrix display https://en.m.wikipedia.org/wiki/dot-matrix_display
[2] ATMEL 8-bit Microcontroller with 8K bytes flash. AT89C4052 datasheet
I. MIDE software: for development and compliering of
[3] 3-to-8 line decoder/demultiplexer product datasheet by NXP
the program code in assembly language, which configures the Semiconductors N.V 2016
internal circuitry of the microcontroller used. [4] DM74LS244 Octal 3-state buffer/line Driver/line Receiver datasheet
II. Protues professionals: This is a virtual laboratory from Fairchild semiconductor
[5] Regulated power supply: Twenty-fourth Edition of a Textbook of
circuit board used to draw and simulate the circuit. This was
Electrical Technology (combined volume).Reprint 2013. B.L Theraja,
done to determine its functionality, for easy implementation on A.K. Theraja.
a vero board or PCB.
III FLOW CHART OF THE CODE

Figure 3: Flow chart of the program code

You might also like