Skip to content

High speed RS232 for PIC

Figure 6 . UTRS schema


Figure 7. UTRS board


The terminal

Windows API allows setting options for each of RS-232 lines individually (see [10]), however, no one of available communication/terminal programs, which I have looked at, provides explicit control over settings for RTS, CTS and DTR lines. Therefore, I have written a small console application for running communication tests ([11] helped me on this matter). This application sends data to the serial port (either an unlimited sequence of characters or whatever comes into standard input), reads data from the port and writes them to the standard output. As with any console application, its input and output may be redirected from/to a file.

Reviewing trophies

I have loaded UTRS application to a PIC16F84A and tested it on the board. The transmitter routines were working from the very first load. First version of the receiver routines were based on the polling loop and failed at baud rate 230400. Second try with interrupts gave better results but there were frequent cases of skipping several bytes. After several experiments, I have found a relaxation period essential for my PC  –­ 1ms, and my old notebook – 4 ms. I also noticed that Pentium 233 MHz running Win98 is not powerful enough to read the 115200 stream.


Post a Comment

Your email is never published nor shared. Required fields are marked *