Serial 4-Channel 8-bit A/D in an 8-pin DIP

Introduction.

We have completed the development of a 4-channel 8-bit analog to digital converter which may be easily interfaced with either a Basic Stamp 1 or Basic Stamp 2. It consists simply of a single programmed Microchip PIC12C671 8-pin DIP.

It may also be interfaced with a PC com port or similar using a DS275 RS232 transceiver which is also packaged in an 8-pin DIP.

Description of Operation.

Normally, the PIC is in a sleep mode. A momentary logic zero on the /GO input causes the PIC to reset, pause for 250 msecs, perform an A/D conversion on each of the four input channels, sending the result at 9600 baud on output SER, and the PIC returns to its sleep mode.

The results of the four measurements are returned to the Stamp or PC in hexadecimal format;

	FE 3C 22 1D

Note that the quantities are separated with a single space. The line is terminated with a new line consisting of a carriage return and line feed ($0D, $0A).

BASIC Stamp Interface.

Thus, in the case of the Basic Stamp, the interface is simply one of winking a lead low and then reading the result.

   OUT1=0 ' bring the /GO lead momentarily
low
   OUT1=1

   SERIN 0, 84, 1000, TM_OUT, [HEX Q_0, HEX Q_1, HEX Q_2, HEX Q_3]

This design provides the enthusiast with a great deal of power with minimal effort; a single 8-pin DIP and three lines of code.

PC Serial Interface.

In interfacing with a PC, a DS275 transceiver is required. This is an 8-pin DIP that converts RS232 levels to TTL and TTL to RS232. Unlike the MAX232 no external capacitors are required.

To initiate a measurement sequence, the PC need only send any character which pulls the /GO input low and the data is returned in the above format.

Note that the voltage on any of the channels may be calculated as;

   V_CH = Q / 256 * V_ref

where V_ref is the +5.0 Volt supply.

Pricing.

Stamp Evaluation Kit ($10.00). Includes two programmed 4-channel A/D PICs, logic probe and documentation.

PC Evaluation Kit ($16.00). This is the same as the Stamp Evaluation Kit plus two DS275 Transceivers.

Additional Programmed PICs - $3.50

DS275 Only - $3.00

Ordering Information