Using the PIC 12C671 A/D Converter With Visual Basic
If you are new to the world
of the PIC microcontroller, you may have been wondering how hard it was
to interface the PIC to your PC. It is not as hard as you may have imagined!
I have found that most of the time a couple of resistors are the only hardware
required to interface the PIC to the PC. Sometimes however the levels are
not correct and you may need additional hardware.
The following information will
cover the connection of the PIC to the PC using a single chip interface
from Maxim. The chip only needs four capacitors to provide up to 4 I/O
lines at true RS232 levels. We will be using two of these, one for TX data
from the PIC, the other for RX data to the PIC. In this example we are
simply sending data to the PC, in future updates we will include a bidirectional
software interface.
In the above figure you can see
how simple it is to connect the MAX232 chip between the PIC and the PC.
You can also see that there are 4 unused pins; these are available for
a second RX/TX pair for a second PIC. The 12C671 has 2 LED's connected
to GPIO.4 and GPIO.5 just to give a visual indication for this example.
They may be omitted if you desire.
The 12C671 is set to have GPIO.0
in ANALOG mode, all other ports are set to DIGITAL mode. You may change
the configuration to allow multiple A/D channels if you desire. The software
can be downloaded for Visual Basic version 4 or 6 depending on what you
have. I hope this is helpful to you... write to me and let me know!