with LCD display and two MAX232 for
PIC16F77
Concept
Specifications
Project Resources
Available Microchip PIC
Assembler Source Code
Two independent RS232 interfaces, with display of received ASCII characters and corresponding decimal values on the dot matrix LCD. ASCII values entered on one terminal window are transmitted by the first RS232 link to the controller, displayed on the LCD, and further transmitted across the second RS232 link to the other terminal window. The microcontroller sends feedback of received characters back to the issueing terminal window. When the PIC terminal is idle, it sends a status message '@' to both terminals every 2.75 seconds.
This program incorporates two independent RS232 interfaces, one hardware-based and one software-based. The HW-based RS232 interface uses the PIC-internal USART (and interrupts), configured to standard 9600 baud @ 4 MHz PIC clock. The SW-based RS232 interface is based on the module file m_rs096.asm, which performs interrupt-based RS232 reception on PortB0 (INTCON,INTF) at 9600 baud @ 4 MHz PIC clock.
The program shows the implementation and function of the modules
m_bank.asm, m_wait.asm, m_lcd.asm, m_lcdv08.asm, and m_rs096.asm
on the PIC16F77.
Dot matrix LCD display |
PIC16F77 test board with two MAX232 |
|
Screen shot of the two HyperTerminal Programs |
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. 733 instruction words |
Acquisition Methodology: |
SW-based RS232: Interrupt-based RS232 data acquisition HW-based RS232: Preemptive, interrupt-based RS232 data acquisition, LCD display output and RS232 echo during normal operation |
Required Hardware: | two MAX 232 for two RS232 interfaces, dot matrix LCD display |
Required Software: | RS232 terminal software (or Excel 97 RS232 Debug Interface) |
Main File | HEX Files |
Download assembler source code: 16F77dual.asm |
Download Hex File: 16F77dual.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