I found quite a few things confusing when I first began to learn the
PIC16F84. It seemed to help to write out what I learned as if I was trying
to explain it to someone else. This project is a result of that exercise.
I always find it easier to understand practical examples and there are
three in this write-up. The first is a short program to send the message
'Hello World!' to a PC COM port where it can be displayed with a terminal
program. This is done with minimal hardware using only zero and 5 volt
levels.
The second program uses this ability to transmit to the PC and adds an
input device. A Dallas Semiconductor DS1820 Digital Thermometer is
interfaced to the PIC and outputs temperature readings at regular intervals that
can be set from a few seconds to four minutes. Programs are included to collect
the data and save it in a disk file and to graph the data on the screen.
The final program extends the second by adding a 8K serial memory to store
data at some remote location and later dump it to the PC. Communication
between the PIC and 24C65 memory is over an I2C bus.
show a schematic
Included then you will find:
- A brief basic explaination of the features of the PIC16F84
- A quick rundown of the instruction set with particular emphasis on
problem areas to look out for
- Code showing how to transmit characters via RS232 to a PC COM port
- Code showing how to interface a DS1820 Digital Thermometer to a PIC
- An elementary explaination of the I2C bus and code using I2C to
communicate with a 12C65 8K serial memory chip
- Other programs, (Pascal) to collect temperature data and graph it
I hope that this project will help others having problems when starting to
learn to use the PIC16F84 as I did. I would be glad to try and answer any
questions. Stick with it! It is confusing at first, but eventually it
does make sense.
Stan Ockers
|