RS232 Communication Test Routine (1)

fully software controlled RS232 transmission and reception for PIC16F84
 

Table of Contents [Toc]

Concept
Specifications
Project Resources
   Available Microchip PIC Assembler Source Code
 

Concept   [Toc] [Top]

Fully software controlled RS232 reception and transmission for PIC16F8x.
Display of received ASCII characters sent from PC via RS232 and their corresponding decimal value on the LCD. Microcontroller sends feedback of received characters back to the terminal window. When the PIC terminal is idle, it sends a status message '@' to the PC every 2.75 seconds.
Shows the implementation and function of the modules m_wait.asm, m_rs096.asm, m_lcd.asm and m_lcdv08.asm on the PIC 16F84.
 

PCB test board for PIC16F84
using a dot matrix LCD display and a MAX232 for RS232 transmission.

 

PIC16F84 test board with MAX232
Test setup using LCD display on PortB and asynchronous RS232 connection (RX on PortB0, TX on PortA0). RS232 to USB1.1 connector in the back.

     

LCD display after reset
shows welcome screen of this program.

 

LCD display output during operation
after sending 'A'  from the PC across the RS232 line. The character sent is echoed back to the PC by the microcontroller.

     

Screen shot of the HyperTerminal Program
showing the start-up message of this RS232 test routine.

 

Specifications   [Toc] [Top]

Processor: Microchip PIC 16F84
Clock Frequency: 4 MHz crystal
Throughput: 1 MIPS
RS232 Baud Rate: 9600 baud, 8 bit, no parity, 1 stopbit
Code Size of entire Program: approx. 566 instruction words
Acquisition Methodology: Interrupt-based RS232 data acquisition, with LCD display output and RS232 echo during normal operation
Required Hardware: MAX 232, dot matrix LCD display
Required Software: RS232 terminal software (or Excel 97 RS232 Debug Interface)

 

Project Resources   [Toc] [Top]

Available Microchip PIC Assembler Source Code   [Toc] [Top]

Main File HEX Files
Download assembler source code:
commtest1.asm
Download Hex File:
commtest1.hex
The above program needs additional include files (modules) to get successfully assembled: m_bank.asm, m_wait.asm, m_rs096.asm
For those, who are not familiar with interfacing a PIC to the RS232 using a MAX232:   RS232-Interface.pdf   (9.7 kB)

Download ASCII Character Map: ASCII-Map.pdf

 

Last updated: 2005/01/16

[Toc] [Top]
 

If you see only this page in your browser window,
click here
to get the entire site.