Design Ideas: October 13, 1994
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]