SlideShare uma empresa Scribd logo
1 de 3
Baixar para ler offline
Lab 10: 20 points
EE 337: Microprocessors Laboratory (Spring 2023)
Indian Institute of Technology Bombay
Date: March 22, 2023
In this lab, you will be learning about Universal Asynchronous Receiver-Transmitter (UART),
which is a serial communication hardware. Refer to Prof. Dinesh Sharma’s slides and notes on
UART given here- https://ee337.github.io/dks.html#serial-io
1. [20 points] In this question, you will understand communicating between Pt-51 and a com-
puter using UART. You need to send values from Pt-51 board to your computer, display
those values on your computer and store it in a file.
i) To connect the kit to a computer, you will be using the USB-to-UART adapter
Prolific PL2303 (Figure 1) that is part of 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 inputs from the board and capturing to text file in PC 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 Figure 2.
For Windows, download Realterm at: https://realterm.i2cchip.com
For Linux, you can download Putty.
Figure 2: RealTerm: Serial/TCP Terminal
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 4800 (the baud rate you have used in your program). Then click on Open. A
screenshot of Realterm window with port and baudrate setting is shown in Figure 3.
Figure 3: RealTerm: Baudrate
v) Use the same setup designed in previous lab to read sinusoidal signal from
AFG onto Pt-51 board using SPI protocol. With the setup connected to the
computer using the USB-to-UART adapter, you will use it to get the digitized input
printed on LCD to display it 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 present in Lab10 UART folder.
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 4800 bps.
2. Capture the values sent to the computer via UART using real term serial capture.
Refer to Figure 4 to capture the values and save them in a text file.
”Start Overwrite” will start saving the values printed on RealTerm to the text file
(path specified). ”Stop Capture” will stop saving the values.
Figure 4: RealTerm: Serial/TCP Terminal
3. Plot the saved values using Python (or some plotting tool). You should be able to
observe a sinusoidal wave. Note : The y-axis should be value and x-axis should be
sample index.
TA Checkpoints
1. Check whether students have captured the input from board to the text file and all values
are obtained properly.
2. Check whether students have plotted the sinusoidal wave output.

Mais conteúdo relacionado

Semelhante a EE337 2023 Labsheet 10

Report 2 microp.(microprocessor)
Report 2 microp.(microprocessor)Report 2 microp.(microprocessor)
Report 2 microp.(microprocessor)
Ronza Sameer
 
Ijarcet vol-2-issue-7-2389-2397
Ijarcet vol-2-issue-7-2389-2397Ijarcet vol-2-issue-7-2389-2397
Ijarcet vol-2-issue-7-2389-2397
Editor IJARCET
 
Ijarcet vol-2-issue-7-2389-2397
Ijarcet vol-2-issue-7-2389-2397Ijarcet vol-2-issue-7-2389-2397
Ijarcet vol-2-issue-7-2389-2397
Editor IJARCET
 
Quantum composers white paper ethernet connectivity
Quantum composers white paper  ethernet connectivityQuantum composers white paper  ethernet connectivity
Quantum composers white paper ethernet connectivity
Quantum Composers
 

Semelhante a EE337 2023 Labsheet 10 (20)

Embedded Tsunami Warning System
Embedded Tsunami Warning System Embedded Tsunami Warning System
Embedded Tsunami Warning System
 
Report 2 microp.(microprocessor)
Report 2 microp.(microprocessor)Report 2 microp.(microprocessor)
Report 2 microp.(microprocessor)
 
A Computer Based Artificial Neural Network Controller with Interactive Audito...
A Computer Based Artificial Neural Network Controller with Interactive Audito...A Computer Based Artificial Neural Network Controller with Interactive Audito...
A Computer Based Artificial Neural Network Controller with Interactive Audito...
 
Picmico
PicmicoPicmico
Picmico
 
IRJET- Navigation Camp – Bot
IRJET-  	  Navigation Camp – BotIRJET-  	  Navigation Camp – Bot
IRJET- Navigation Camp – Bot
 
Ijarcet vol-2-issue-7-2389-2397
Ijarcet vol-2-issue-7-2389-2397Ijarcet vol-2-issue-7-2389-2397
Ijarcet vol-2-issue-7-2389-2397
 
Ijarcet vol-2-issue-7-2389-2397
Ijarcet vol-2-issue-7-2389-2397Ijarcet vol-2-issue-7-2389-2397
Ijarcet vol-2-issue-7-2389-2397
 
Xctu manual
Xctu manualXctu manual
Xctu manual
 
Quantum composers white paper ethernet connectivity
Quantum composers white paper  ethernet connectivityQuantum composers white paper  ethernet connectivity
Quantum composers white paper ethernet connectivity
 
Bascom avr-course
Bascom avr-courseBascom avr-course
Bascom avr-course
 
Larson and toubro
Larson and toubroLarson and toubro
Larson and toubro
 
DSP_Assign_1
DSP_Assign_1DSP_Assign_1
DSP_Assign_1
 
Tutorial-Auto-Code-Generation-for-F2803x-Target.pdf
Tutorial-Auto-Code-Generation-for-F2803x-Target.pdfTutorial-Auto-Code-Generation-for-F2803x-Target.pdf
Tutorial-Auto-Code-Generation-for-F2803x-Target.pdf
 
NetSim Technology Library- Military radio-tdma-and-dtdma
NetSim Technology Library- Military radio-tdma-and-dtdmaNetSim Technology Library- Military radio-tdma-and-dtdma
NetSim Technology Library- Military radio-tdma-and-dtdma
 
I010315760
I010315760I010315760
I010315760
 
Xctumanual a
Xctumanual aXctumanual a
Xctumanual a
 
IoT with openHAB on pcDuino3B
IoT with openHAB on pcDuino3BIoT with openHAB on pcDuino3B
IoT with openHAB on pcDuino3B
 
Report (2)
Report (2)Report (2)
Report (2)
 
Micro c lab2(led patterns)
Micro c lab2(led patterns)Micro c lab2(led patterns)
Micro c lab2(led patterns)
 
Avr book
Avr bookAvr book
Avr book
 

Mais de SaravananVijayakumar4

Mais de SaravananVijayakumar4 (20)

EE337 Microprocessors Lab Labsheet 5
EE337 Microprocessors Lab Labsheet 5EE337 Microprocessors Lab Labsheet 5
EE337 Microprocessors Lab Labsheet 5
 
EE337 Spring 2023 Lab1
EE337 Spring 2023 Lab1EE337 Spring 2023 Lab1
EE337 Spring 2023 Lab1
 
EE337 Microprocessor Lab, Course Outline, Spring 2023
EE337 Microprocessor Lab, Course Outline, Spring 2023EE337 Microprocessor Lab, Course Outline, Spring 2023
EE337 Microprocessor Lab, Course Outline, Spring 2023
 
EE337 Course introduction 2021
EE337 Course introduction 2021EE337 Course introduction 2021
EE337 Course introduction 2021
 
Pt 51 ver-1.3_user_manual
Pt 51 ver-1.3_user_manualPt 51 ver-1.3_user_manual
Pt 51 ver-1.3_user_manual
 
EE 337 Lab 1 for Section 1 (2nd year UG)
 EE 337 Lab 1 for Section 1 (2nd year UG) EE 337 Lab 1 for Section 1 (2nd year UG)
EE 337 Lab 1 for Section 1 (2nd year UG)
 
Intel Hex Format
Intel Hex FormatIntel Hex Format
Intel Hex Format
 
EE 337 Lab 1 for Section 2 (3rd year UG)
EE 337 Lab 1 for Section 2 (3rd year UG)EE 337 Lab 1 for Section 2 (3rd year UG)
EE 337 Lab 1 for Section 2 (3rd year UG)
 
Getting started with Keil uVision 2020
Getting started with Keil uVision 2020Getting started with Keil uVision 2020
Getting started with Keil uVision 2020
 
EE337 Course introduction 2021
EE337 Course introduction 2021EE337 Course introduction 2021
EE337 Course introduction 2021
 
Hex file creation using Keil uVision
Hex file creation using Keil uVisionHex file creation using Keil uVision
Hex file creation using Keil uVision
 
Debugging programs with Keil uVision
Debugging programs with Keil uVisionDebugging programs with Keil uVision
Debugging programs with Keil uVision
 
Serial IO for 8051
Serial IO for 8051Serial IO for 8051
Serial IO for 8051
 
8051 Timers
8051 Timers8051 Timers
8051 Timers
 
8051 Interrupts
8051 Interrupts8051 Interrupts
8051 Interrupts
 
Introduction to Microcontrollers
Introduction to MicrocontrollersIntroduction to Microcontrollers
Introduction to Microcontrollers
 
8051 instruction set
8051 instruction set8051 instruction set
8051 instruction set
 
89c5131datasheet
89c5131datasheet89c5131datasheet
89c5131datasheet
 
Pt-51 User Manual
Pt-51 User ManualPt-51 User Manual
Pt-51 User Manual
 
EE337 Course introduction 2018
EE337 Course introduction 2018EE337 Course introduction 2018
EE337 Course introduction 2018
 

Último

The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
heathfieldcps1
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
KarakKing
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
ZurliaSoop
 

Último (20)

Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 

EE337 2023 Labsheet 10

  • 1. Lab 10: 20 points EE 337: Microprocessors Laboratory (Spring 2023) Indian Institute of Technology Bombay Date: March 22, 2023 In this lab, you will be learning about Universal Asynchronous Receiver-Transmitter (UART), which is a serial communication hardware. Refer to Prof. Dinesh Sharma’s slides and notes on UART given here- https://ee337.github.io/dks.html#serial-io 1. [20 points] In this question, you will understand communicating between Pt-51 and a com- puter using UART. You need to send values from Pt-51 board to your computer, display those values on your computer and store it in a file. i) To connect the kit to a computer, you will be using the USB-to-UART adapter Prolific PL2303 (Figure 1) that is part of 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 inputs from the board and capturing to text file in PC 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 Figure 2. For Windows, download Realterm at: https://realterm.i2cchip.com For Linux, you can download Putty.
  • 2. Figure 2: RealTerm: Serial/TCP Terminal 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 4800 (the baud rate you have used in your program). Then click on Open. A screenshot of Realterm window with port and baudrate setting is shown in Figure 3. Figure 3: RealTerm: Baudrate v) Use the same setup designed in previous lab to read sinusoidal signal from AFG onto Pt-51 board using SPI protocol. With the setup connected to the computer using the USB-to-UART adapter, you will use it to get the digitized input printed on LCD to display it 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 present in Lab10 UART folder.
  • 3. 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 4800 bps. 2. Capture the values sent to the computer via UART using real term serial capture. Refer to Figure 4 to capture the values and save them in a text file. ”Start Overwrite” will start saving the values printed on RealTerm to the text file (path specified). ”Stop Capture” will stop saving the values. Figure 4: RealTerm: Serial/TCP Terminal 3. Plot the saved values using Python (or some plotting tool). You should be able to observe a sinusoidal wave. Note : The y-axis should be value and x-axis should be sample index. TA Checkpoints 1. Check whether students have captured the input from board to the text file and all values are obtained properly. 2. Check whether students have plotted the sinusoidal wave output.