A Simple Capacitance Meter
FIGURE 2. The location of the first channel of A/D and
the first channel of D/A on the evaluation kit.
(Counting from the pin that connects to the first channel
of the A/D, it is the ninth pin over.) See Figure 2.
The Serial Interface
When using the development kit, the serial interface is
used for two purposes — downloading the program and
communicating with the ADuC812 while the program is
running. Downloading programs to the ADuC812 development kit is easy. First, connect the serial cable that comes
with the kit to the kit itself (being careful to match up the
pins on the board with the markings on the cable). Then
connect the cable to COM1. (For some reason, the downloader that comes with the development kit does not seem
to work from COM2.) Make sure that the jumper at location LK3 (PSEN) on the evaluation board is in. Run WSD,
the Windows serial downloader. Go to the configuration
menu of the downloader and make sure that it is set to
COM1. Next click on DOWNLOAD. Find the program that
you want to download and download it. Finally, click on the
RUN button. At this point, the program is running on the
The program that is running on the ADuC812 expects
to communicate with the outside world through the COM
port, too. The program sets the ADuC812's internal UART
to transmit and receive at 19200 baud with one stop bit
and no parity bit. Additionally, no flow control is used.
Thus, the host computer must be set up similarly. I generally use Hyperterminal (a Windows utility) to communicate
with the ADuC812. When using Hyperterminal, you must
tell Hyperterminal which COM port you are using (COM1),
and then you must set the properties of the COM port to
19200 baud, one stop bit, no parity, and no flow control.
Once the set-up is taken care of, to initiate a measurement all that you need to do is to type a lower case 'm' in
the Hyperterminal window. The ADuC812 will measure the
capacitance and will send the capacitance value to the
COM port. Hyperterminal will pick up the value and display it on your screen.
For those who do not want to type, the ADuC812 has
been set to start a measurement when the INT0 button on
the development kit is pressed. In order to see the value of
the capacitance, you must still use Hyperterminal.
Learn at home in your
Earn up to
$100 an hour
No previous experience needed!
You can earn more money
if you get an FCC License!
Not satisfied with your present income?
Add prestige and earning power to your
electronics career by getting your FCC
The Original Home-Study course prepares you for the “FCC Commercial
Radiotelephone License” at home in your
This valuable license is your professional
“ticket” to thousands of exciting jobs in:
Communications, Radio-TV, Microwave,
Maritime, Radar, Avionics & more…you
can even start your own business!
No need to quit your job or go to school.
This proven “self-study” course is easy,
fast and low cost!
GUARANTEED TO PASS – You get your
FCC License or your money will be refunded.
Call for FREE facts now!
(800) 932-4268 Ext. 220
FCC LICENSE TRAINING - Dept. 220
P.O. Box 3000 • Sausalito, CA 94966
Please rush FREE details immediately!
City State Zip
Circle #109 on the Reader Service Card.