RS232 Communication Test Routine (2)

with LCD display and MAX232 for PIC16F77 / PIC16C74A
 

Table of Contents [Toc]

Concept
Specifications
Project Resources
   Available Microchip PIC Assembler Source Code
 

Concept   [Toc] [Top]

Fully hardware controlled RS232 reception and transmission for PIC16F7x.
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_lcd.asm and m_lcdv08.asm on the PIC16F77 (or PIC16C74A).
 

Dot matrix LCD display
LCD display output after sending '@'  from the PC across the RS232 line. The character sent is echoed by the microcontroller.

 

PIC16F77 test board with MAX232
Test setup using LCD display on PortB and RS232 connection (built-in HW USART of PIC16C74A in asynchronous mode).

     

Screen shot of the HyperTerminal Program
HyperTerminal output using this RS232 test routine.
The four consecutive letters 'asfd' at the end shows the
successful RX FIFO buffering in the microcontroller.

 

Specifications   [Toc] [Top]

Processor: Microchip PIC 16F77
Clock Frequency: 4 MHz crystal
Throughput: 1 MIPS
RS232 Configuration: 9600 with BRGH = 1
RS232 Baud Rate: 9600 baud, 8 bit, no parity, 1 stopbit
Code Size of entire Program: approx. 566 instruction words
Acquisition Methodology: Preemptive, 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:
commtest2.asm
Download Hex File:
commtest2.hex
The above program needs additional include files (modules) to get successfully assembled: m_bank.asm, m_wait.asm, m_lcd.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: 16.01.2005

[Toc] [Top]


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