SlideShare a Scribd company logo
Lab 4: 20 points
EE 337: Microprocessors Laboratory (Spring 2021)
Section: S1 (Secongd year UG)
Indian Institute of Technology Bombay
Date: Feb 15, 2021
1. [10 points] In this experiment, you will learn to display content on the LCD connected to
the Pt-51 kit. Download the lcd.asm file and lcd-control-made-easy.pdf from Moodle.
The latter has general information about LCD operation which is helpful in understanding
the code in lcd.asm.
• Compile lcd.asm and load the hex file on to the kit. Make sure the output on the
LCD screen is as shown below:
Pt-51
IIT Bombay
• Modify lcd.asm to display “EE337-2021-S1” on the first line and your first name on
the second line (truncate to 16 characters if you have a longer name). Pad the display
lines with spaces such that these are centered on the LCD when displayed. You should
load and run this program on the Pt-51 kit.
2. [10 points] Write a subroutine blinkingLEDs which works as shown in the flowchart below.
After configuring the port pins P1.3-P1.0 as inputs and port pins P1.7-P1.4 as outputs, the
subroutine turns ‘On’ the LEDs on port pins P1.7-P1.4 on for 5 seconds. During this time,
the user gives a nibble input via the switches connected to port pins P1.3-P1.0. This input
controls the number of times (N) that the group of LEDs P1.7-P1.4 blink. Here, a blink
represents LED ‘Off’ for 1 s followed by ‘On’ for 1 s. The value of N can vary between 1 to
15.
Example: After the initial 5 seconds elapse, if the user sets P1.3-P1.0 as 0011 (i.e., N=3),
then the group of LEDs P1.7-P1.4 go through a sequence of ‘Off-On’ transitions thrice, each
with a 2 second period.
Start
Configure
P1.3-P1.0 (Switches) as input and
P1.7-P1.4 (LEDs) as Output
Wait for 5 secs as user gives input via
P1.3-P1.0 (Switches) : N
i=i+1
Set P1.7-P1.4 (LEDs) as LOW, Wait for 1 seconds
Set P1.7-P1.4(LEDs) as HIGH, Wait for 1 seconds
Set P1.7-P1.4 (LEDs) as High
i=0
Call subroutine :
blinkingLEDs
blinkingLEDs
RETURN
i < N
Yes No
TA Checkpoints
1. For question 1, check that the desired string appears in the LCD (Course section, first
name). Also, check that the string is centered in the LCD.
2. For question 2, ask the student to give the nibble input 1010 and check that the four LEDs
are blinking 10 times. Check that the subroutine blinkingLEDs is running indefinitely
by asking the student to change the state of the switches again during the 5 second “all
LEDs on” state.

More Related Content

PDF
PDF
PDF
PDF
PDF
PDF
PDF
PDF
Pt 51 ver-1.3_user_manual
Pt 51 ver-1.3_user_manual

What's hot (18)

PDF
Debugging programs with Keil uVision
PDF
Switch Control and Time Delay - Keypad
PDF
Session 5-exersice
PPTX
COMMON CPU TERMS.pptx
DOCX
Report no.5(microprocessor)
PDF
Chapter 7 8051 programming in c
PPTX
Dead Code Elimination
PDF
C programming part2
PPS
C programming session 04
PDF
Function procedure c6 c7
PDF
Mp lab manual
PPTX
Code optimization
PDF
A tutorial on C++ Programming
PPTX
Infix postfixcoversion
PDF
Chap 3 c++
PPTX
Programming basic computer
Debugging programs with Keil uVision
Switch Control and Time Delay - Keypad
Session 5-exersice
COMMON CPU TERMS.pptx
Report no.5(microprocessor)
Chapter 7 8051 programming in c
Dead Code Elimination
C programming part2
C programming session 04
Function procedure c6 c7
Mp lab manual
Code optimization
A tutorial on C++ Programming
Infix postfixcoversion
Chap 3 c++
Programming basic computer
Ad

Similar to Lab4 s1 (20)

PDF
PDF
PDF
publish manual
PDF
Gain Experience with GPIO, LED Interface and Functions in TI TIVA C Launchpad...
PPTX
Temperature sensor with a led matrix display (arduino controlled)
PDF
Arduino and Robotics
PPTX
Temperature Sensor with LED matrix Display BY ►iRFAN QADOOS◄ 9
PDF
Combine the keypad and LCD codes in compliance to the following requ.pdf
PDF
PDF
Automatic room light controller with visible counter
PPTX
Vechicle accident prevention using eye bilnk sensor ppt
DOC
Microcontroller Programming Assignment
PPTX
Micro c lab6(lcd)
DOCX
m.tech esd lab manual for record
DOCX
Lab #5_Revised  (Due 121315)This is a revision on the previous.docx
PDF
Introduction to Arduino
DOC
micro proj4.V2odt
PDF
Interfacing with LCD
PDF
Lab2F22.pdf
DOCX
#MicroXplorer Configuration settings - do not modifyFile.Versio.docx
publish manual
Gain Experience with GPIO, LED Interface and Functions in TI TIVA C Launchpad...
Temperature sensor with a led matrix display (arduino controlled)
Arduino and Robotics
Temperature Sensor with LED matrix Display BY ►iRFAN QADOOS◄ 9
Combine the keypad and LCD codes in compliance to the following requ.pdf
Automatic room light controller with visible counter
Vechicle accident prevention using eye bilnk sensor ppt
Microcontroller Programming Assignment
Micro c lab6(lcd)
m.tech esd lab manual for record
Lab #5_Revised  (Due 121315)This is a revision on the previous.docx
Introduction to Arduino
micro proj4.V2odt
Interfacing with LCD
Lab2F22.pdf
#MicroXplorer Configuration settings - do not modifyFile.Versio.docx
Ad

More from rajbabureliance (10)

PDF
PDF
PDF
PDF
PDF
PDF
Pt 51 kit - Peripheral self-test
PDF
PDF
PDF
EE337 Course Introduction
PDF
EE337 Course Introduction
Pt 51 kit - Peripheral self-test
EE337 Course Introduction
EE337 Course Introduction

Recently uploaded (20)

PPTX
202450812 BayCHI UCSC-SV 20250812 v17.pptx
PDF
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PDF
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PDF
Complications of Minimal Access Surgery at WLH
PPTX
Pharmacology of Heart Failure /Pharmacotherapy of CHF
PPTX
Introduction-to-Literarature-and-Literary-Studies-week-Prelim-coverage.pptx
PDF
Supply Chain Operations Speaking Notes -ICLT Program
PDF
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
PPTX
Orientation - ARALprogram of Deped to the Parents.pptx
PDF
Trump Administration's workforce development strategy
PDF
GENETICS IN BIOLOGY IN SECONDARY LEVEL FORM 3
PPTX
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
PDF
Chinmaya Tiranga quiz Grand Finale.pdf
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PDF
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
PDF
A systematic review of self-coping strategies used by university students to ...
PPTX
Lesson notes of climatology university.
PDF
O5-L3 Freight Transport Ops (International) V1.pdf
202450812 BayCHI UCSC-SV 20250812 v17.pptx
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
STATICS OF THE RIGID BODIES Hibbelers.pdf
Complications of Minimal Access Surgery at WLH
Pharmacology of Heart Failure /Pharmacotherapy of CHF
Introduction-to-Literarature-and-Literary-Studies-week-Prelim-coverage.pptx
Supply Chain Operations Speaking Notes -ICLT Program
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
Orientation - ARALprogram of Deped to the Parents.pptx
Trump Administration's workforce development strategy
GENETICS IN BIOLOGY IN SECONDARY LEVEL FORM 3
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
Chinmaya Tiranga quiz Grand Finale.pdf
Abdominal Access Techniques with Prof. Dr. R K Mishra
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
A systematic review of self-coping strategies used by university students to ...
Lesson notes of climatology university.
O5-L3 Freight Transport Ops (International) V1.pdf

Lab4 s1

  • 1. Lab 4: 20 points EE 337: Microprocessors Laboratory (Spring 2021) Section: S1 (Secongd year UG) Indian Institute of Technology Bombay Date: Feb 15, 2021 1. [10 points] In this experiment, you will learn to display content on the LCD connected to the Pt-51 kit. Download the lcd.asm file and lcd-control-made-easy.pdf from Moodle. The latter has general information about LCD operation which is helpful in understanding the code in lcd.asm. • Compile lcd.asm and load the hex file on to the kit. Make sure the output on the LCD screen is as shown below: Pt-51 IIT Bombay • Modify lcd.asm to display “EE337-2021-S1” on the first line and your first name on the second line (truncate to 16 characters if you have a longer name). Pad the display lines with spaces such that these are centered on the LCD when displayed. You should load and run this program on the Pt-51 kit. 2. [10 points] Write a subroutine blinkingLEDs which works as shown in the flowchart below. After configuring the port pins P1.3-P1.0 as inputs and port pins P1.7-P1.4 as outputs, the subroutine turns ‘On’ the LEDs on port pins P1.7-P1.4 on for 5 seconds. During this time, the user gives a nibble input via the switches connected to port pins P1.3-P1.0. This input controls the number of times (N) that the group of LEDs P1.7-P1.4 blink. Here, a blink represents LED ‘Off’ for 1 s followed by ‘On’ for 1 s. The value of N can vary between 1 to 15. Example: After the initial 5 seconds elapse, if the user sets P1.3-P1.0 as 0011 (i.e., N=3), then the group of LEDs P1.7-P1.4 go through a sequence of ‘Off-On’ transitions thrice, each with a 2 second period. Start Configure P1.3-P1.0 (Switches) as input and P1.7-P1.4 (LEDs) as Output Wait for 5 secs as user gives input via P1.3-P1.0 (Switches) : N i=i+1 Set P1.7-P1.4 (LEDs) as LOW, Wait for 1 seconds Set P1.7-P1.4(LEDs) as HIGH, Wait for 1 seconds Set P1.7-P1.4 (LEDs) as High i=0 Call subroutine : blinkingLEDs blinkingLEDs RETURN i < N Yes No TA Checkpoints 1. For question 1, check that the desired string appears in the LCD (Course section, first name). Also, check that the string is centered in the LCD. 2. For question 2, ask the student to give the nibble input 1010 and check that the four LEDs are blinking 10 times. Check that the subroutine blinkingLEDs is running indefinitely by asking the student to change the state of the switches again during the 5 second “all LEDs on” state.