Professional Documents
Culture Documents
Esm 19
Esm 19
Microprocessors and Microcontrollers: Arm Cortex M0+ (using RP2040) – NPTEL– Mouli Sankaran
Lecture 3.3.1 Focus
UARTs in RP2040
UART Block and RS-232 Signal
Demo of Interfacing UART 0
◦ Without ISR (by polling)
Microprocessors and Microcontrollers: Arm Cortex M0+ (using RP2040) – NPTEL– Mouli Sankaran 2
UARTs in RP2040
Microprocessors and Microcontrollers: Arm Cortex M0+ (using RP2040) – NPTEL– Mouli Sankaran
RP2040 Pin Out: UART 0 and 1
COM port
over USB UART 0
UART 1
Microprocessors and Microcontrollers: Arm Cortex M0+ (using RP2040) – NPTEL– Mouli Sankaran 4
RP2040 System Block
COM port
over
USB
TX
APB Bus
RX
Microprocessors and Microcontrollers: Arm Cortex M0+ (using RP2040) – NPTEL– Mouli Sankaran 8
UART: Serial: RS-232 Signal Format
5-8
Example 1:
Example 2:
Microprocessors and Microcontrollers: Arm Cortex M0+ (using RP2040) – NPTEL– Mouli Sankaran 9
UART 0 Exercise
Microprocessors and Microcontrollers: Arm Cortex M0+ (using RP2040) – NPTEL– Mouli Sankaran
Two Boards Configuration
Commands from Sent to the Board 2
the Serial Monitor
Built-in
Tx TX0 RX0 Rx
Pin no. 1 Pin no. 2 LED
The Commands are:
Pin no. 2 Pin no. 1 O or o: ON
RX0 TX0
RP2040 F or f: OFF
RP2040
Board 1 Pin GND Pin 1 to 9: Blink at
Board 2
no. 3 no. 3 the rate 100 to
900 milliseconds
Commands are received over USB serial port from the laptop by the Tx
Board 1
The command received is sent across to Rx Board 2 via UART 0
Rx Board 2 receives the commands and controls its built-in LED.
Microprocessors and Microcontrollers: Arm Cortex M0+ (using RP2040) – NPTEL– Mouli Sankaran 11
Two Programs (Run on the Boards 1 and 2)
UART0 – Receives data by Polling (without ISR)
Commands from Sent to the Board 2
the Serial Monitor
Built-in
Tx TX0 RX0 Rx
Caution: Pin no. 1 Pin no. 2 LED
Before giving Pin no. 2 Pin no. 1
commands The Commands are:
RX0 TX0
make sure RP2040 RP2040 O or o: ON
both boards Board 1 Pin GND Pin Board 2 F or f: OFF
are uploaded no. 3 no. 3 1 to 9: Blink at
and connected the rate 100 to
together too. 900 milliseconds
Microprocessors and Microcontrollers: Arm Cortex M0+ (using RP2040) – NPTEL– Mouli Sankaran
Lecture 3.3.1: Summary
UARTs in RP2040
UART Block and RS-232 Signal
Demo of Interfacing UART 0
◦ Without ISR (by polling)
Microprocessors and Microcontrollers: Arm Cortex M0+ (using RP2040) – NPTEL– Mouli Sankaran 14
References - 1
Ref 0 Ref 1 Ref 2
Microprocessors and Microcontrollers: Arm Cortex M0+ (using RP2040) – NPTEL– Mouli Sankaran 15
References - 2
Ref 3 Ref 4 Ref 5
Ref 6
Microprocessors and Microcontrollers: Arm Cortex M0+ (using RP2040) – NPTEL– Mouli Sankaran 16