Tutorial 9:  Aysnchronous USART echo

The PIC16F62X has an onboard USART which can operate either synchronously or asynchronously. This tutorial demonstrates asynchronous operation. It listens for a 9.6Kbaud RS232 signal and echo's any data it receives.

Download FEATURE62X_Tutorial9.zip and unzip into folder <your path>\Tutorial 9

Filename Version Description
tut9.pjt 1.0 MPLAB Project
tut9.asm 1.0 PIC16F628 Assembler code
tut9.hex 1.0 Precompiled HEX
tut9.lst 1.0 Precompiled LST
tut9.vbb 1.0 Virtual Breadboard simulation

Running the Simulation

Open tut9.vbb and press RUN. Using the terminal enter 'Hello World' and click Transmit. The RS232 terminal will transmit this string in 9600 RS232 format which is received and echo'd back to the terminal. After a short delay 'Hello World' appears in the Termainal Text Received window.

Code Walk Through

 

Features Demonstrated

TRISB/PORTB

USART Asynchronous Mode

USART Receive Interrupt

USART Receive

USART Transmit