Here is a fantastic assortment of code to get you
started. I have also included a VERY short Borland C++ (I used
the DOS compiler) for accessing the parallel port on your PC.
Please be careful to only use the relevant pieces from the equates
file, as most of the programs will not work without
them! Same goes for the delays.
Please feel free to send your comments / requests at
the bottom of the page, but if you would like a reply... you will
have to leave your email address too! The code on these pages
have no warranty and are offered for you to download for free and
use as you will.
The code below is designed to work with the 16CXX
and the 16FXXX series. The delays will only be accurate if you
use a clock speed of 20Mhz but all the code on this page will work
with slower clocks, as the IIC protocol and the LCD are not speed
dependant.
General equates file -
Please only extract what you need.
Serial routine using
the bit bang principle. (Oscillator must be 3.6864 Mhz for this
routine to work at 9600 N81)
Transmitting using the internal
Usart. (Oscillator must be 3.6864 Mhz for this routine to
work at 9600 N81). Now includes a software transmit and
receive routine with Interrupts using TMR0.
Interface to the parallel
port on your PC! Here is a short Borland C++ program (you MUST
have an ECP port for this).
By the way, if you are into gadgets, take a look
at this site. They ship anywhere in the world too!