Advertisement
Advertisement

Connect a modem to a Basic Stamp

-September 16, 1999

The 2400-bps modem in Figure 1 makes it easy to connect a Basic Stamp (Parallax Inc, www.parallaxinc.com) to a telephone modem. Using this circuit, you can call home via your PC and find out if the house is still there. The Basic Stamp2, BS2-IC, has the necessary programming space, and a 64-kbyte StampMEM memory-storage board enhances site data collection.

In the setup configuration of Figure 1, the Basic Stamp can read data from sensors and store the result on the StampMEM board. When the modem receives a call, the Basic Stamp reads the StampMEM board and transfers the stored data directly to the modem, which in turn sends it to the remote PC or Basic Stamp terminal that has a modem interface and standard communication software.

Simple software code performs data movement to and from the modem. The software collects sensor data and places the modem in an auto-answer mode for a short time and loops back to collect more data. When a remote terminal sends a phone call, the looping stops, and the Basic Stamp answers the phone call by requesting the terminal to type "start." After receiving the typed input from the remote terminal, the Basic Stamp reads the StampMEM data-storage board and transfers the entire stored data to the remote terminal.

After data transfer is complete, the Basic Stamp hangs up the phone call, returns to collecting sensor data, and awaits another phone call. The software communications between the Basic Stamp, modem, and memory data storage are through the "serin" and "serout" commands. This approach allows the Basic Stamp to use just a few I/O pins, leaving at least 11 pins for the sensors' data input. The program includes no sensor inputs; doing so would complicate the software. The StampMEM memory data storage is unnecessary if you intend to retain the data within the available memory on the Basic Stamp. You can easily connect many data-storage devices and EEPROM chips to the circuit. Sensor and data-storage-device software codes are available for free on the Parallax Web site. (DI #2411)


Loading comments...

Write a Comment

To comment please Log In

FEATURED RESOURCES