Researchgatedesign and Implementation of Microcontro
Researchgatedesign and Implementation of Microcontro
Researchgatedesign and Implementation of Microcontro
net/publication/326493983
CITATIONS READS
14 8,218
1 author:
SEE PROFILE
All content following this page was uploaded by Engr. Dr. Oluwagbemiga Omotayo Shoewu on 21 October 2018.
ABSTRACT
This paper focused on design and implementation of a microcontroller based calculator which will perform simple arithmetic
using a calculator keypad and a 16x2 Liquid Crystal Display (LCD). The program is limited to single digit input and double-digit
results. This allows the program for the arithmetic operations to be simple, while the same principles can be extended to multi-digit
calculations.
Keywords: Microcontroller, Calculator, keypad, LCD display.
INTRODUCTION
Advancement in technology has led to building time it executes correctly. Analog to digital converter (ADC) is
electronic devices with simple circuit. Introduction of responsible for converting an information about some analog
microcontroller has made designing of electronic devices value to a binary number and follow it through to a CPU block
circuit simpler. A computer on a chip is known as so that CPU block can further process it. Finally, the
microcontroller. It is essential for the operation of devices such microcontroller is completed, and all need to be done is to
as mobile phones, video cameras, electrical appliances and assemble it into an electronic component where it will access.
most self-contained electronic systems. Microcontroller has the Theory of Design
following elements: memory, central processing unit, ports, The circuit for a calculator which will perform simple
bus, serial communication, etc. arithmetic operations in the PIC 16F887 Microcontroller, using
Memory: Program and data are stored in the memory. a calculator keypad and 16X2 LCD display, is shown in
Central Processing Unit (CPU) has capability to multiply, Figure1. The keypad has 16 keys: 10 numeric buttons, 4
divide, subtract, and move its contents from Memory locations arithmetic operations, equals and clear. The results obtained are
which are called registers. Registers are memory locations displayed on the LCD display.
whose role is to perform various mathematical operations or
any other operations with data wherever data can be found. Bus
is a connection between memory and CPU-the path through
which data goes from one block to another. Physically, it
represents a group of 8, 16, or more wires. There are two types
of buses: address and data buses. The first one has many lines
as the amount of memory to address, and the other one is as
wide as data. First one transmits address from CPU memory,
and the second connects all blocks inside the microcontroller.
Ports have several memory locations whose one end is
connected to the data bus, and the other has connection with the
output lines on the microcontroller which can be seen as pins on
the electronic component. There are several types of ports:
input, output or bidirectional ports. When working with ports,
first of all it is necessary to choose which port one needs to
work with, and then to send data to, or take it from the port.
When working with it the port acts like a memory location.
Something is being written into or read from it, and this could
be noticed on the pins of the microcontroller. Watchdog is a
free-run counter where a program needs to write a zero in every Figure 1: Calculator Circuit Diagram
Control Unit Input 17. IF second key, load sign, Display character and restart loop
Power Supply Unit (keypad)
Unit 18. IF third key, load Num2 Display character and restart loop
9
19. IFfourth key, CALL Calculate result
Output Unit
(LCD) 20. IF fifth key, Clear display
Figure 2. Block Diagram of the calculator 21. ALWAYS
Citation: Shoewu O. O, et al (2014). Design and Implementation of Microcontroller Based Calculator. J. of Computation in
Biosciences and Engineering. V1I2.
Copyright: © 2014 Shoewu O. O . This is an open-access article distributed under the terms of the Creative Commons Attribution
License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original author and source are
credited.