SlideShare a Scribd company logo
Lab 7: 20 points
EE 337: Microprocessors Laboratory (Spring 2021)
Section: S2 (Third year UG)
Indian Institute of Technology Bombay
Date: March 12, 2021
Refer to Prof. Dinesh Sharma’s slides and notes on serial I/O to do this lab.
1. [20 points] In this lab you will understand and use a program for communicating between
Pt-51 and a computer using UART. This program will take inputs from the computer’s key-
board that can be used in programs running on the kit, to perform appropriate operations.
i) To connect the kit to a computer, you will be using the USB-to-UART adapter
Prolific PL2303 (Fig. 1) that was shipped along with the kit. The driver software
for this adapter and the instructions for installing it can be found at the following link:
http://www.miklor.com/COM/UV_Drivers.php
After installing the software, connect the PL2303 adapter to one of the USB ports of
your PC.
Figure 1: USB to UART adapter.
ii) Connect the Pt-51 kit to the USB-to-UART adapter using F-F wires as described
next. In the Pt-51 kit, port pin P3.0 is the serial data input and P3.1 is the serial
data output. Connect P3.0 of the kit to transmit data line (TxD) of the adapter.
Connect P3.1 of the kit to receive data line (RxD) of the adapter. Connect the GND
pin of the kit to GND pin of adapter.
iii) For recognizing keyboard inputs on the computer and transmitting to the kit, through
the serial terminal, you need to use the Realterm software (or any equivalent software).
This software will also be used to display the messages received from the Pt-51 kit on
the PC. A screenshot of Realterm window is shown in Fig. 2.
For Windows, download Realterm at: https://realterm.i2cchip.com
For Linux, you can download putty.
iv) Configure Realterm (or equivalent tool) to use the appropriate COM port and baud
rate. This can be done by clicking on Serial Port/ Port tab and choosing appropriate
COM port as the port to which the USB-to-UART adapter is connected. Set the baud
rate to 1200 (or that used in your program). Then click on Open.
With the kit connected to the computer using the USB-to-UART adapter, you will next
write code to recognize key presses, perform an operation on the kit, and display messages
sent by the kit on the computer.
Use main.c as starting (template) code. This uses serial.c and lcd.h for initialisation of
UART and LCD, respectively. These files are part of the zip file shared with you.
The flow of the program is given below.
1. Complete the function uart init() in serial.c to configure the serial port for UART
communication. Use timer T1 and a baud rate of 1200 bps.
Figure 2: RealTerm: Serial/TCP Terminal
2. The given main.c has code for transmitting a set of strings and to capture a key
press on the PC. Compile the project, dump the hex file on to Pt-51 and run the
program. Launch the Realterm window on your PC and you can see that the following
is displayed on the window.
************************
******8051 Tests********
************************
Press 1 to test the LCD
Press 2 to test the LED
3. Now, Pt-51 should be respond to the key presses on the PC’s keyboard. With Realterm
window in focus (active window), any key press on PC’s keyboard will be captured by
it and transferred to Pt-51.
• When 1 is pressed, it will be detected by Pt-51 and you will see a message “LCD
Ok” on the LCD screen and “LCD tested” display on the Realterm window. This
happens because of the function lcd test in main.c.
• When 2 is pressed, it should be detected by pt-51 and should glow all four LEDs
and display “LED tested” on the Realterm window. For this to happen, you will
have to update the function led test in main.c
• When any other key is pressed, you will see the message “Incorrect key pressed”
displayed on the Realterm window.
TA Checkpoints
1. Verify that the student can demonstrate the UART setup.

More Related Content

PDF
PDF
PDF
Debugging programs with Keil uVision
PDF
PPTX
Getting started with Keil uVision 2020
PDF
PDF
Pt 51 ver-1.3_user_manual
PDF
Debugging programs with Keil uVision
Getting started with Keil uVision 2020
Pt 51 ver-1.3_user_manual

What's hot (17)

PDF
PDF
PDF
PDF
PDF
PDF
8051 Interrupts
PDF
PPTX
Micro c lab2(led patterns)
PDF
Pt 51 kit - Peripheral self-test
PDF
Intel Hex Format
PPSX
Node finder presentation
PPTX
8051 programming skills using EMBEDDED C
PDF
PDF
Ecet 340 Teaching Effectively--tutorialrank.com
PDF
L12 c-language-programming-of-atmega328 p
PDF
Serial IO for 8051
DOCX
Embedded System Practical manual (1)
8051 Interrupts
Micro c lab2(led patterns)
Pt 51 kit - Peripheral self-test
Intel Hex Format
Node finder presentation
8051 programming skills using EMBEDDED C
Ecet 340 Teaching Effectively--tutorialrank.com
L12 c-language-programming-of-atmega328 p
Serial IO for 8051
Embedded System Practical manual (1)
Ad

Similar to Lab7 s2 (20)

PDF
Rodrigo Almeida - Microkernel development from project to implementation
DOCX
Report 2 microp.(microprocessor)
PDF
Larson and toubro
PPTX
RCCreator Guidance. Remote control adding (copy codes from your original remo...
PPTX
Remote control adding
PPTX
Export option (copy codes from your original RC)
PDF
XBMC USB Controller for Media Center PCs
PDF
IOT and embaded_Internship final Report-2.pdf
PDF
DeviceHub - First steps using Intel Edison
PDF
Bluetooth quick start_guide / Controlanything India
PDF
Xgt training
PDF
Enabling TPM 2.0 on coreboot based devices
PDF
Embedded Tsunami Warning System
PDF
Bluetooth remote control... from your mobile phone
PDF
I need help with this assignment, using atmel studio 7.0Place a l.pdf
PDF
Quantum composers white paper ethernet connectivity
PDF
Process Instrument Explorer Installation Instructions
PDF
Control of Industrial Pneumatic & Hydraulic Systems using Serial Communicatio...
PDF
Control of Industrial Pneumatic & Hydraulic Systems using Serial Communicatio...
PDF
IJSRED-V2I2P57
Rodrigo Almeida - Microkernel development from project to implementation
Report 2 microp.(microprocessor)
Larson and toubro
RCCreator Guidance. Remote control adding (copy codes from your original remo...
Remote control adding
Export option (copy codes from your original RC)
XBMC USB Controller for Media Center PCs
IOT and embaded_Internship final Report-2.pdf
DeviceHub - First steps using Intel Edison
Bluetooth quick start_guide / Controlanything India
Xgt training
Enabling TPM 2.0 on coreboot based devices
Embedded Tsunami Warning System
Bluetooth remote control... from your mobile phone
I need help with this assignment, using atmel studio 7.0Place a l.pdf
Quantum composers white paper ethernet connectivity
Process Instrument Explorer Installation Instructions
Control of Industrial Pneumatic & Hydraulic Systems using Serial Communicatio...
Control of Industrial Pneumatic & Hydraulic Systems using Serial Communicatio...
IJSRED-V2I2P57
Ad

More from rajbabureliance (8)

PDF
PDF
PDF
PDF
PDF
PDF
PDF
EE337 Course Introduction
PDF
EE337 Course Introduction
EE337 Course Introduction
EE337 Course Introduction

Recently uploaded (20)

PPTX
Onco Emergencies - Spinal cord compression Superior vena cava syndrome Febr...
PDF
Practical Manual AGRO-233 Principles and Practices of Natural Farming
DOC
Soft-furnishing-By-Architect-A.F.M.Mohiuddin-Akhand.doc
PPTX
Orientation - ARALprogram of Deped to the Parents.pptx
PPTX
A powerpoint presentation on the Revised K-10 Science Shaping Paper
PDF
SOIL: Factor, Horizon, Process, Classification, Degradation, Conservation
PDF
GENETICS IN BIOLOGY IN SECONDARY LEVEL FORM 3
PDF
1_English_Language_Set_2.pdf probationary
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PDF
Trump Administration's workforce development strategy
PDF
Classroom Observation Tools for Teachers
PPTX
Chinmaya Tiranga Azadi Quiz (Class 7-8 )
PDF
احياء السادس العلمي - الفصل الثالث (التكاثر) منهج متميزين/كلية بغداد/موهوبين
PDF
RTP_AR_KS1_Tutor's Guide_English [FOR REPRODUCTION].pdf
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PPTX
Introduction-to-Literarature-and-Literary-Studies-week-Prelim-coverage.pptx
PPTX
CHAPTER IV. MAN AND BIOSPHERE AND ITS TOTALITY.pptx
PDF
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
PDF
Weekly quiz Compilation Jan -July 25.pdf
PDF
Chinmaya Tiranga quiz Grand Finale.pdf
Onco Emergencies - Spinal cord compression Superior vena cava syndrome Febr...
Practical Manual AGRO-233 Principles and Practices of Natural Farming
Soft-furnishing-By-Architect-A.F.M.Mohiuddin-Akhand.doc
Orientation - ARALprogram of Deped to the Parents.pptx
A powerpoint presentation on the Revised K-10 Science Shaping Paper
SOIL: Factor, Horizon, Process, Classification, Degradation, Conservation
GENETICS IN BIOLOGY IN SECONDARY LEVEL FORM 3
1_English_Language_Set_2.pdf probationary
Final Presentation General Medicine 03-08-2024.pptx
Trump Administration's workforce development strategy
Classroom Observation Tools for Teachers
Chinmaya Tiranga Azadi Quiz (Class 7-8 )
احياء السادس العلمي - الفصل الثالث (التكاثر) منهج متميزين/كلية بغداد/موهوبين
RTP_AR_KS1_Tutor's Guide_English [FOR REPRODUCTION].pdf
Final Presentation General Medicine 03-08-2024.pptx
Introduction-to-Literarature-and-Literary-Studies-week-Prelim-coverage.pptx
CHAPTER IV. MAN AND BIOSPHERE AND ITS TOTALITY.pptx
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
Weekly quiz Compilation Jan -July 25.pdf
Chinmaya Tiranga quiz Grand Finale.pdf

Lab7 s2

  • 1. Lab 7: 20 points EE 337: Microprocessors Laboratory (Spring 2021) Section: S2 (Third year UG) Indian Institute of Technology Bombay Date: March 12, 2021 Refer to Prof. Dinesh Sharma’s slides and notes on serial I/O to do this lab. 1. [20 points] In this lab you will understand and use a program for communicating between Pt-51 and a computer using UART. This program will take inputs from the computer’s key- board that can be used in programs running on the kit, to perform appropriate operations. i) To connect the kit to a computer, you will be using the USB-to-UART adapter Prolific PL2303 (Fig. 1) that was shipped along with the kit. The driver software for this adapter and the instructions for installing it can be found at the following link: http://www.miklor.com/COM/UV_Drivers.php After installing the software, connect the PL2303 adapter to one of the USB ports of your PC. Figure 1: USB to UART adapter. ii) Connect the Pt-51 kit to the USB-to-UART adapter using F-F wires as described next. In the Pt-51 kit, port pin P3.0 is the serial data input and P3.1 is the serial data output. Connect P3.0 of the kit to transmit data line (TxD) of the adapter. Connect P3.1 of the kit to receive data line (RxD) of the adapter. Connect the GND pin of the kit to GND pin of adapter. iii) For recognizing keyboard inputs on the computer and transmitting to the kit, through the serial terminal, you need to use the Realterm software (or any equivalent software). This software will also be used to display the messages received from the Pt-51 kit on the PC. A screenshot of Realterm window is shown in Fig. 2. For Windows, download Realterm at: https://realterm.i2cchip.com For Linux, you can download putty. iv) Configure Realterm (or equivalent tool) to use the appropriate COM port and baud rate. This can be done by clicking on Serial Port/ Port tab and choosing appropriate COM port as the port to which the USB-to-UART adapter is connected. Set the baud rate to 1200 (or that used in your program). Then click on Open. With the kit connected to the computer using the USB-to-UART adapter, you will next write code to recognize key presses, perform an operation on the kit, and display messages sent by the kit on the computer. Use main.c as starting (template) code. This uses serial.c and lcd.h for initialisation of UART and LCD, respectively. These files are part of the zip file shared with you. The flow of the program is given below. 1. Complete the function uart init() in serial.c to configure the serial port for UART communication. Use timer T1 and a baud rate of 1200 bps.
  • 2. Figure 2: RealTerm: Serial/TCP Terminal 2. The given main.c has code for transmitting a set of strings and to capture a key press on the PC. Compile the project, dump the hex file on to Pt-51 and run the program. Launch the Realterm window on your PC and you can see that the following is displayed on the window. ************************ ******8051 Tests******** ************************ Press 1 to test the LCD Press 2 to test the LED 3. Now, Pt-51 should be respond to the key presses on the PC’s keyboard. With Realterm window in focus (active window), any key press on PC’s keyboard will be captured by it and transferred to Pt-51. • When 1 is pressed, it will be detected by Pt-51 and you will see a message “LCD Ok” on the LCD screen and “LCD tested” display on the Realterm window. This happens because of the function lcd test in main.c. • When 2 is pressed, it should be detected by pt-51 and should glow all four LEDs and display “LED tested” on the Realterm window. For this to happen, you will have to update the function led test in main.c • When any other key is pressed, you will see the message “Incorrect key pressed” displayed on the Realterm window. TA Checkpoints 1. Verify that the student can demonstrate the UART setup.