The blog of a dedicated radio amateur and electronics enthusiast

"Having fun on the air and in the workshop - communicating and creating"

02 November 2012

PC-to-PIC serial comms


I have been programming the EUSART module of a Microchip PIC18F4550 microcontroller on my MYDEV2 development board for RS-232 serial  communications with a pc running a terminal application; in my case 'HyperTerminal'. I have configured the connection for 1200 baud asynchronous operation. Although this is one of the slowest of the standard com port baud rates, however in conjunction with the 8MHz PIC clock it gives the lowest baud rate error of only 0.1%.
The connection is called PC-PIC_EUSART. Pressing any key 'wakes up' the EUSART and starts the sequence. The above capture of the Hyperterminal screen shows, for example, the steps taken to change the dfcw dot-dash frequency shift to 4Hz. All seems to be error-free !
Now that I have the connection working, I am considering incorporating serial comms functionality into my PIC controlled frequency synthesiser, so that values, e.g., relating to priority band and dfcw shift, which are held in PIC data eeprom, can be changed quickly in real time without having to modify, build and reload the entire source code file.

No comments: