0% found this document useful (0 votes)
20 views9 pages

PaperonReal TimeSystems

Uploaded by

rahul.0621
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)
20 views9 pages

PaperonReal TimeSystems

Uploaded by

rahul.0621
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/ 9

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/360342183

Application and Analyses of Microcontrollers in Real-Time Systems

Article · April 2022


DOI: 10.35629/5252-040497104

CITATIONS READS

0 1,559

5 authors, including:

Obianyo Obianuju Ekene Alagbu


Madonna University, Nigeria Nnamdi Azikiwe University, Awka
2 PUBLICATIONS 0 CITATIONS 15 PUBLICATIONS 10 CITATIONS

SEE PROFILE SEE PROFILE

All content following this page was uploaded by Obianyo Obianuju on 03 May 2022.

The user has requested enhancement of the downloaded file.


International Journal of Advances in Engineering and Management (IJAEM)
Volume 4, Issue 4 Apr 2022, pp: 97-104 www.ijaem.net ISSN: 2395-5252

Application and Analyses of


Microcontrollers in Real-Time Systems
Isizoh A.N.1, Obianyo O.R.2, Ejimofor I.A.3, Ebih U.J.4,
Alagbu E.E.5
1,4,5: Dept. of Electronic and Computer Engineering, Nnamdi Azikiwe University, Awka, Nigeria,
2,3: Dept. of Computer Engineering, Madonna University of Nigeria, Akpugo Campus.

---------------------------------------------------------------------------------------------------------------------------------------
Submitted: 01-04-2022 Revised: 06-04-2022 Accepted: 11-04-2022
----------------------------------------------------------------------------------------------------------------------------------
ABSTRACT system is used when it is imperative that an event
This paper presents the applications of must take place within a strict deadline. Such
microcontrollers in real-time systems. Critical strong guarantee is required of a system for which
analyses of real-time systems and microcontroller if the event does not take place within a certain
were done. A real-time system is a system that its interval of time, would cause a great loss in some
operation is dependent on time condition; while a manner (missing the deadline constitutes failure of
microcontroller is a single chip computer. The type the entire system). For example, a car engine
of microcontroller used in this work for analyses is control system is a hard real-time system because a
AT89C55 microcontroller, and can be used delayed signal may cause an engine failure or
(applied) in several real-time systems. It has a large damage. Other examples of hard real-time
program memory capacity, unlike other embedded systems include medical child incubator
microcontrollers which have little program memory system, industrial process controllers, etc.
capacity. It then means that it can accommodate a
large control program in its memory. Any real-time A soft real-time system on the other hand
system other than the traffic light used as a case will tolerate such lateness, and may respond with
study for this work can as well be handled by just decreased service quality (for example omitting
programming the microcontroller for such frames while displaying a video). Soft real-time
application. Assembly language was used to systems are typically used where there is some
program the microcontroller for different real-time issue of concurrent access and the need to keep a
applications. When the system was tested, it was number of connected systems up to date with
observed that with a good and adequate program, a changing situations; for example, software that
given microcontroller can be used for different maintains and updates the flight plans for
real-time applications. commercial airliners. Live audio-video systems are
also usually soft real-time; violation of constraints
KEYWORDS: Software, microcontroller, real- results in degraded quality, but the system can
time, controller, memory continue to operate [2].

I. INTRODUCTION 1.2 Fundamentals of Microcontrollers


1.1 An Overview of Real-Time Systems A microcontroller is a single chip
A system is said to be real-time if the total computer. It is a computer because it has all the
correctness of its operation depends not only upon component parts of a typical digital computer.
its logical correctness, but also upon the time in Those component parts are: the Central Processing
which it is performed [1]. There are hard real-time Unit (CPU), Memory (ROM and RAM) and
or immediate real-time system and soft real-time Input/output units. The difference between a
system. microprocessor and microcontroller is that a
microprocessor is only a processor without an
In a hard real-time system, the completion internal memory, but can access external memory;
of an operation after its deadline is considered while a microcontroller contains a processor as
useless; and however, this may cause a critical well as an inbuilt (internal) memory. A typical
failure of the complete system. Hard real-time

DOI: 10.35629/5252-040497104 Impact Factor value 7.429 | ISO 9001: 2008 Certified Journal Page 97
International Journal of Advances in Engineering and Management (IJAEM)
Volume 4, Issue 4 Apr 2022, pp: 97-104 www.ijaem.net ISSN: 2395-5252

block diagram of a microcontroller is shown in Figure 1.

Figure 1: Block Diagram of a Typical Microcontroller

The block diagram of a microcontroller contains at least four or five transistors to store a
like the one used in this research (AT89C55) single bit of data.
consists of the Central Processing Unit (CPU), the The AT89C55 has a bank of 256 bytes of internal
memory unit, and the Input/output unit. RAM.

The CPU - The Central Processing Unit (CPU) of The ROM – A ROM is a non-volatile memory.
AT89C55 microcontroller comprises of the There is an on-chip Read Only Memory (ROM)
Arithmetic and Logic unit (ALU), the Registers, embedded in AT89C55 microcontroller. There are
and the Control unit. different types of ROM: Programmable Read Only
The function of the ALU is to perform all the Memory (PROM), Erasable Programmable Read
arithmetic and logic expressions from or within the Only Memory (EPROM), Electrically Erasable
CPU according to the instruction it receives. Such Programmable Read Only Memory (EEPROM),
arithmetic instructions are addition, subtraction, and Flash. The type of ROM being used by
etc; and logic expressions like AND, OR, NOT, AT89C55 is a 20K EEPROM. Its content can be
etc. erased by applying a suitable electrical voltage to
However, the basic functions performed by the the device.
various registers are essentially the same in all
processors. They are used to store data, addresses, I/O Ports - There are 32 input and output lines,
instruction codes, and information on the status of which make up the four ports of the
various processor operations [3]. microcontroller. The ports enable the
The Control unit controls the internal operations of microcontroller to read and write to external
the microcontroller and sends control signals to memory and other components. The AT89C55 has
other parts of the microcontroller during program four 8-bit I/O ports (Port 0 to 3). As the name
execution. suggests, the ports can act as inputs (to be read) or
outputs (to be written to).
The Memory - Two on-chip memories exist in the
chip. They are the Random Access Memory 1.3 Internal Architecture of AT89C55
(RAM) and Read Only Memory (ROM). Microcontroller
The RAM - This is a volatile type of memory. The The figure 2 shows the internal architecture of a
AT89C55 microcontroller uses the type of RAM typical AT89C55 microcontroller.
called Static RAM (SRAM). Each SRAM cell

DOI: 10.35629/5252-040497104 Impact Factor value 7.429 | ISO 9001: 2008 Certified Journal Page 98
International Journal of Advances in Engineering and Management (IJAEM)
Volume 4, Issue 4 Apr 2022, pp: 97-104 www.ijaem.net ISSN: 2395-5252

Figure 2: The Internal Architecture of AT89C55 Microcontroller

The CPU: The Central processing Unit (CPU) of the interrupt. This sequence of actions is handled
the microcontroller comprises of the arithmetic and by the interrupt controller [5].
logic unit (ALU) which performs arithmetic and
logic operations on the data fetched from the data Bus Control: This controls the flow of instructions
memory. It has an instruction decoder that decodes as well as data within the microcontroller. It
machine code instruction words. It also has prevents bus contention.
registers that store operand addresses/instructions
and the control unit [4]. The Timer Counters: Timer 0 and timer 1 provide
time measurement and counts events. It is also
The Interrupt Control: The AT89C55 employed in generating clock pulses (baud rates)
microcontroller has two external interrupt control when the microcontroller is used in serial
pins INT0 and INT1. When the external interrupt communication.
mode is selected, hardware components connected
to these pins can be serviced when they send an The I/O Ports: The AT89C55 microcontroller has
interrupt request IRQ by making either INT0 or I/O ports used for interfacing the microcontroller to
INT1 active (low). When this occurs, the normal external devices like keypads, relays, sensors,
execution of programs stops while the ADCs, etc. Apart from the use as I/O ports, three
microcontroller services the hardware (runs a out of the four ports have alternate functions. Port 0
special subroutine known as the interrupt service and port2 are used when interfacing with external
routine ISR for the interrupting device) and when memory and all the pins in port 3 have alternate
the hardware has been serviced, the program functions as illustrated in Table 1.
execution continues from where it stopped before

Table 1: Alternate Functions of Port 3


Pin Alternate Functions

P3.0 RXD (serial input port)

P3.1 TXD (serial output port)

P3.2 INT0 (external interrupt 0)

P3.3 INT1 (external interrupt 1)

DOI: 10.35629/5252-040497104 Impact Factor value 7.429 | ISO 9001: 2008 Certified Journal Page 99
International Journal of Advances in Engineering and Management (IJAEM)
Volume 4, Issue 4 Apr 2022, pp: 97-104 www.ijaem.net ISSN: 2395-5252

P3.4 T0 (timer 0 external input)

P3.5 T1 (timer 1 external input)

P3.6 WR (external data memory write strobe)

P3.7 RD (external data memory read strobe)


Those functions that have a bar above them are made active when low.

Program Memory (On-Chip ROM): This is where addresses 00h-7Fh) are reserved for the user. The
the control programs executed by the remaining 128bytes (memory addresses 80h-FFh)
microcontroller are stored. The sizes and types of are reserved for the special function registers
ROM vary in order to meet consumer’s needs; but (SFR). Figure 3 shows the AT89C55
generally, they are in the other of a few kilobytes microcontroller RAM Structure. However, the
and flash ROMs are common these days [6]. RAM is usually defined with respect to the base
memory available to the user. Hence, if a RAM is
Data Memory (On-Chip RAM): The AT89C55 said to be 128bytes, it means that 128bytes is
microcontroller has an on-chip base memory of available to the user (without taking into account
256bytes; out of which 128bytes (memory the special function registers).

Figure 3: The AT89C55 Microcontroller RAM Structure

The on-chip data memory is divided as follows: the impracticable. The AT89C55 takes care of the
first 32 bytes made of four memory bank (bank 0- protocols needed for serial communication and all
bank 3) are 8-bit registers with each bank the programmer needs to do is to select the serial
possessing eight registers (R0-R7) of one byte communication mode and the baud rate (number of
each. The next 16 bytes are made up of 128 bit sent/received bits per second) and then the data to
addressable memory locations from 00h through be sent can be placed on the SBUF register [7].
7Fh, occupying 20h to 2Fh of internal RAM. The
remaining 80bytes occupying RAM location 30h to Oscillator: The oscillator produces equalized pulses
7Fh is the general purpose memory/registers. needed to ensure the harmonic and synchronous
operation of all the parts of the microcontroller.
Serial port: The AT89C55 microcontroller has a
universal asynchronous receiver and transmitter 1.4 The Ports/Pins Configuration in AT89C55
(UART) otherwise known as serial port which it Microcontroller
uses for transmission of data in the form of pulses The Ports/Pins Configuration in AT89C55
over longer distances where parallel connection is Microcontroller is shown in Figure 4.

DOI: 10.35629/5252-040497104 Impact Factor value 7.429 | ISO 9001: 2008 Certified Journal Page 100
International Journal of Advances in Engineering and Management (IJAEM)
Volume 4, Issue 4 Apr 2022, pp: 97-104 www.ijaem.net ISSN: 2395-5252

Figure 4: The Ports/Pins Configuration in AT89C55 Microcontroller

The AT89C55 Microcontroller has four clock, traffic lights, timed bomb, space
ports (P0, P1, P2 and P3). Each of these ports can applications, copiers, cable television terminal
be addressed to in a program for the purpose equipment, lawn sprinkling controllers, credit card
fetching or sending instruction. There are 40 pins in phone equipment, cellular phones, fax machines,
this microcontroller. Of these 40 pins, about eight automotive applications such as engine control
pins are not included in the ports and they are modules, anti-lock braking systems, automobile
called special pins. They are special in the sense suspension control, keyless entry systems, display
that their connections in a circuit are specific. systems, and a host of other industrial and
These eight pins are Pin 9, Pin 18, Pin 19, Pin 20, consumer applications [10]. It should be good to
Pin 29, Pin 30, Pin 31 and Pin 40. The rest of the analyze some of these real-time systems examples
32 pins are used for input and output interfaces [8]. where the AT89C55 microcontroller could be
applied.
II. ANALYSES OF THE APPLICATIONS
OF AT89C55 MICROCONTROLLER IN In a computer storage system having
REAL-TIME SYSTEMS multiple disk drives and multiple power supplies,
Microcontrollers are independently an environmental monitoring unit (EMU) is
programmable and can have a great deal of controlled by a microcontroller. The EMU
additional functionality combined on the same performs a variety of tasks including monitoring
integrated circuit. One good thing about AT89C55 power supply voltage and currents, fan speeds,
microcontroller is that it has a large memory which temperature of the storage system enclosure, and
can allow the microcontroller to perform different the status of the various disk drives in the storage
real-time applications, since it can conveniently system.
hold large programs. Just as it is applicable to other In household appliances, microcontrollers are part
microcontrollers, when applying this type of of microwave ovens, televisions, calculators,
microcontroller for real-time operations, what is remote controls, clocks, etc.
needed is to develop an appropriate control In a car, they are used in the engine
program for the task and “burn” it inside the control modules, the antilock braking systems, the
microcontroller. Of course, without a program sound systems, and automobile suspension control
inside a microcontroller, no control operation can modules. In antilock braking systems, the
take place. With adequate control programs where microcontroller monitors the rotational speed of the
time constraints are included, the use of AT89C55 tires through sensors attached to the tires.
microcontroller will help in monitoring and
controlling several real-time operations [9]. As an example, let us briefly discuss how
a microcontroller is used for display. The display in
AT89C55 Microcontroller can be used in this example is to scroll the word “FULL” on a
achieving different ranges of systems that operate seven segment display.
in real time because of its relatively large memory. Seven segment has a common anode type
This includes temperature controller, real time and a common cathode type. In a common anode

DOI: 10.35629/5252-040497104 Impact Factor value 7.429 | ISO 9001: 2008 Certified Journal Page 101
International Journal of Advances in Engineering and Management (IJAEM)
Volume 4, Issue 4 Apr 2022, pp: 97-104 www.ijaem.net ISSN: 2395-5252

type, all the anodes of the LEDs are tied together letter, the LED of that letter will be ON, but if you
and grounded, while in a common cathode type, the set it one (1), it will be OFF. However, in a
cathodes of all the LEDs are tied together and common cathode, the reverse is the case. If you set
grounded. zero (0) to any letter, the LED of that letter will be
OFF, but if you set it one (1), it will be ON.
Each type contains seven LEDs connected The real-time simulation of AT89C55
in a segmented form lettered a, b, c, d, e, f, and g. microcontroller for scrolling a word “FULL” in a
In a common anode type, if you set zero (0) to any common anode 7-segment is shown in Figure 5.

Figure 5: Seven Segment Display Interfaced to AT89C55 Microcontroller in Proteus

In designing a program for this, you must In another example, the application of
note that each of the display segments would be AT89C55 microcontroller in real-time system for a
equated to a particular memory location. Also note Five-Way Traffic Light Control System can be
that there are as many as 0 – 127 memory locations analyzed. Its real-time simulation could be
you can use for this equation, and each memory performed using Proteus ISIS Professional
location is 8-bit which is equal to one byte. software. All the electronic components used for
the circuit were sourced from the internal
As usual there must be five subroutine programs. components arrangement within the Proteus
The five subroutines are: Shift, Screen, software. The essence of performing this real-time
Screen_delay, Letters, and Delay subroutines. The simulation is to show how this AT89C55
7-segment codes for the display are represented microcontroller could be applied in the design of a
thus: traffic light control system.
F = 10001110b When the circuit in Figure 6 was connected and run
U = 11000001b in Proteus software, the traffic light controller
L = 11000111b (which is basically the AT89C55 microcontroller
L = 11000111b plus few electronic components) is seen operating
as programmed.

DOI: 10.35629/5252-040497104 Impact Factor value 7.429 | ISO 9001: 2008 Certified Journal Page 102
International Journal of Advances in Engineering and Management (IJAEM)
Volume 4, Issue 4 Apr 2022, pp: 97-104 www.ijaem.net ISSN: 2395-5252

Figure 6: A 5-Way Traffic Light Control System Using AT89C55 Microcontroller

III. CONCLUSION microcontrollers for real-time systems; as


It has been shown that with adequate AT89C55 will offer one the opportunity of using
control programs, the use of AT89C55 one microcontroller for several operations.
microcontroller will help in monitoring and
controlling several real-time operations using that REFERENCES
single microcontroller, unlike using lower ROM- [1]. Isizoh A.N., NwobodoNzeribe H.N., Aniedu
capacity microcontrollers such as AT80C51, A.N., “Assembly Language Programming
AT89C51 (with 4K of ROM). Lower ROM- for Embedded Systems and Real-Time
capacity microcontrollers cannot contain many Applications”, Scoa Heritage Publishers Ltd,
programs, and therefore their control operations are Awka, Nigeria, 2018.
limited and not up to that of AT89C55. [2]. Schuster A., “Microcontroller Principles and
When AT89C55 microcontroller is used Applications”, Maxon Press Ltd, Rochester,
for real-time applications, its function is to interpret 2008.
input (user and environmental), communicate with [3]. Cookie J. L., “Theory of Illumination
other devices, and output data to a variety of Technology”, Sunde Publications, Canada,
different devices. In this way, it reduces the bill of 2013.
material cost of the system significantly by [4]. Predko Myke, “Handbook of
reducing the number of components required to Microcontrollers”, McGraw Hill, New York,
carry out complex functions, add a great deal of USA, 2007, Pp 1-17.
“user friendliness” to a product for a very little [5]. Douglas V.H., “Microcontrollers and
additional cost. These days, AT89C55 Interfacing: “Programming Hardware”,
microcontroller is effectively used for real-time McGraw Hill Inc, New York, 2008, Pp 270-
control applications and this seminar has 344.
demonstrated one of such applications in the [6]. Holliday D. and Resmick Robert,
control of traffic lights. “Fundamentals of Microcontrollers”, Don
Peters Press Ltd, Fulmar, 2008, P 88.
IV. RECOMMENDATION [7]. Kopetz H., “Real-Time Systems: Design
The use of AT89C55 microcontrollers is Principles for Distributed Embedded
highly recommended for real-time system controls. Applications”, Kluwer Academic Publishers,
This is because of its relatively low cost, Dordrecht, 2009, Pp 6-11.
availability in markets, low power consumption, [8]. Katz P., “Digital Controls Using
larger program memory capacity, etc. Researchers Microcontrollers”, Prentice Hall
should be making use of this microcontroller International Inc, New Delhi, 2009, Pp 15-
instead of using lower-memory capacity 43.

DOI: 10.35629/5252-040497104 Impact Factor value 7.429 | ISO 9001: 2008 Certified Journal Page 103
International Journal of Advances in Engineering and Management (IJAEM)
Volume 4, Issue 4 Apr 2022, pp: 97-104 www.ijaem.net ISSN: 2395-5252

[9]. Wakerly John F., “Digital Designs:


Principles and Practices”, 4th Edition, PHI
Learning Private Limited, New Delhi, 2008,
Pp 5-6.
[10]. Floyd T.F., “Digital Fundamental”, 6th
Edition, Prentice-Hall International Inc,
New Delhi, 2008, Pp. 4-7.

DOI: 10.35629/5252-040497104 Impact Factor value 7.429 | ISO 9001: 2008 Certified Journal Page 104

View publication stats

You might also like