HOS Template PIC Project

This page describes a template PIC project that communicates with a host computer via RS-232.  The firmware as provided here is not intended to perform useful functions, but does provide an easy way to add functions that are controlled via a "dumb" terminal, or a PC running software like HyperTerm.  It may also be useful as an example PIC project. 

All the source code is available for download and may be used for free in commercial applications with minor restrictions.  See the copyright notice at the start of each source module for details. 

The firmware contains the following constructs:

The firmware was tested with a 16F876 as indicated by the reference schematic.  This can be easily wired in a few minutes as shown in the picture.  The RS-232 settings as provided here are 8 data bits, 1 stop bit, no parity, no flow control. 

The template implements two example commands.  The command "a" sets RB0 low, and "b" sets RB0 high.  If wired according to the reference schematic, "a" turns the LED on and "b" turns it off. 

Below are some of the source files for this project:


Project-specific include file. 


Interrupt handler. 


UART handler, including the UART interrupt service code. 


Main event loop. 


Command processor. 

To get all the project files and build scripts, go to the PIC software downloads page and download the HOS PIC project. 

Last Updated 10 December 2002