0% found this document useful (0 votes)
114 views4 pages

EE313 Lab 2 Report.

This document discusses a lab experiment to drive a 7-segment display through a PIC microcontroller. The aims are to: [1] Design a lookup table to display numbers 0-9 on the display; [2] Write a C program to generate a HEX file for the PIC18F8722 microcontroller; and [3] Display the numbers 1-9 with a one second delay between each number. Equipment includes a PIC18F8722 microcontroller, power supply, resistors, and a 7-segment display. GPIO pins on the microcontroller are used to interface with the display. A delay is programmed to change the displayed number every second. When an additional button is pressed, the program will increment the displayed

Uploaded by

Sherlin Chand
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
114 views4 pages

EE313 Lab 2 Report.

This document discusses a lab experiment to drive a 7-segment display through a PIC microcontroller. The aims are to: [1] Design a lookup table to display numbers 0-9 on the display; [2] Write a C program to generate a HEX file for the PIC18F8722 microcontroller; and [3] Display the numbers 1-9 with a one second delay between each number. Equipment includes a PIC18F8722 microcontroller, power supply, resistors, and a 7-segment display. GPIO pins on the microcontroller are used to interface with the display. A delay is programmed to change the displayed number every second. When an additional button is pressed, the program will increment the displayed

Uploaded by

Sherlin Chand
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

SCHOOL OF INFORMATION TECHNOLOGY, ENGINEERING, MATHAMATICS

AND PHYSICS

EE313: Microprocessor Applications

Lab – 02

Driving 7-segment Display through PIC micro-controller


Group members: Sherlin Chand (s11170770)

Mohammed Azam (s11170901)

Aim
The aim of the lab is to:

Task 1.

 Students are able to design a table of equivalent code in the hex in order to display
number from 0-9 in the microcontroller. The reference LED segment type common
cathode
 Students are able to write a C program in the PIC C to generate HEX file for
PIC18F8722.
 Lastly, the students are able to display the number 1 to 9 with the one second delay.

Task 2.

 The student should be able to convert application by additional control of the key
input in which the key is pressed then only the number should be increment.
Introduction
Programable interface controller also known as PIC microcontroller is an electronic
device/circuit that is used for programming for example timers, to control production line
and much more, PIC microcontroller is found in most of the electronic device as it tells the
device what to do, for example; alarm systems, computer control system, phones and many
more, pic controller are consider wise cheap and can be brought as prebuild circuit or as a
kit that can be assembled by the user. [1]

Figure 1: The above figure shows the image of the micro-controller and all of its uses.

one of the uses for PIC is displaying desired variable in the LCD display. The intel
hexadecimal object file format also known as intellect hex is a file that the binary
information in ASCII test form, this is commonly used for programming in the
microcontrollers. In order to program, first thing to consider is to draw the look up table
that is used to derive the hex code to display the numbers 1 to 9 in the LCD display screen.
The h is always ON. To interface the 7-segment display in the pic controller, GPIO pins are
used to digital output pins. These display pins consist of 7 light emitting diodes connected in
the common anode and cathode configuration. [2]

Figure 2: The above equation shows the image of how the LED display looks like in 1 to 7

The delay of 1 seconds simply defines as that the timer for the LED to display the numbers
from 1 to 9. The number 1 will be displayed on the screen and then one second later
number 2 will be displayed. The time delay can be changed in the program of the users
choice for example time delay of 1, 3, 5 and etc.

Equipment’s

 PIC18F8722 Boot loader


 Multioutput DC power supply
 One 1kΩ resistor
 7-segment LED common cathode or anode type

Methodology
Task 1

1) The PIC18F8722 board details was given for clear details.

Figure 3: the above figure shows the image of the PIC C where it shoes the label ports.

2) Port F was used to interface segment


3) The common terminal of the segment was connected to the ground which is 0V
common cathode type
4) Vss of 7-segment was connected to 5V through 10K resistor.
5) 7 segment LED was interfaced with port
a) F0 was connected to a
b) F1 was connected to b
c) F2 was connected to c
d) F3 was connected to d
e) F4 was connected to e
f) F5 was connected to f
g) F6 was connected to g
h) F7 was connected to h
6) It was noted h is always ON with taking F7 pin = high.
7) The look up table was made in order that the number sends from the PIC will be display
on the segment correctly.
Task 2
1) Key (push button) was connected to port A that is A4
2) Port A4 which is pin 1worked as an input pin. The pin worked as LOW when the key
was pressed, action was taken when the key status was low. The number was
increased from the current value.
3) A separate program only increased the number when the key was pressed.
4) It was noted that port A_4 was already connected to push button on the PIC board, it
was defined in the program to check the key pressed status.

Reference
[1]"Control system", En.wikipedia.org, 2021. [Online]. Available:
https://en.wikipedia.org/wiki/Control_system. [Accessed: 21- Mar- 2021].

[2]"7 segment display in pic microcontroller - Google Search", Google.com, 2021. [Online].
Available: https://www.google.com/search? [Accessed: 26- Mar- 2021].

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy