EDN logo


Design Ideas: October 13, 1994

Serial-controlled "postage stamp" computer governs process

Steven C Hageman,
Calex Manufacturing Co Inc, Concord, CA


thumbnail The tiny, $39 BASIC Stamp computer makes a nifty low-cost, easily programmed, RS-232C process controller (Parallax Inc, (916) 721-8217). In the circuit in Fig 1, the BASIC Stamp computer accepts commands via its RS-232C port. Its I/O pins drive a piezoelectric beeper and a demultiplexer. The demultiplexer, in turn, activates one of 16 optoisolated channels. In this application, the circuit multiplexed 16 measurement points to a precision voltmeter.

You download the program in Listing 1 (which you might have prepared on a PC) to the BASIC Stamp's nonvolatile EEPROM. Thereafter, the BASIC Stamp's program responds to a 2400-baud RS-232C control word. The control word comprises "MUX1'' followed by a space and then a function number. The number set ranges from 0 to 16 and includes 99. The number 0 turns all channels off, and a number from 1 to 16 turns on the corresponding channel. Sending 99 causes the BASIC Stamp to send its current setting back to the controlling computer.

Listing 1 and a test program, along with some documentation, are available on the EDN Readers' ftp site as /DI_SIG DI1593Z.ZIP.

LISTING 1

The piezoelectric beeper sounds whenever the BASIC Stamp computer gets an erroneous command. In agreement with the RS-232C standard, you can hang multiple BASIC Stamp computers off the same serial line, assigning each one a different name (MUX2, MUX3,...). (DI#1593]





| EDN Access | feedback | subscribe to EDN! |
| design features | design ideas | columnist |


Copyright © 1995 EDN Magazine. EDN is a registered trademark of Reed Properties Inc, used under license.