Specifications
BASIC Stamp II
Parallax, Inc. • BASIC Stamp Programming Manual 1.8 • Page 259
2
digits fit within a nibble (four bits), the program below packs two DTMF
digits into each byte of three EEPROM data tables. The end of a phone
number is marked by the nibble $F, since this is not a valid phone-
dialing digit.
EEloc var byte ' EEPROM address of stored number.
EEbyte var byte ' Byte containing two DTMF digits.
DTdigit var EEbyte.highnib ' Digit to dial.
phone var nib ' Pick a phone #.
hiLo var bit ' Bit to select upper and lower nibble.
Scott data $45,$94,$80,$2F ' Phone: 459-4802
Chip data $19,$16,$62,$48,$33,$3F ' Phone: 1-916-624-8333
Info data $15,$20,$55,$51,$21,$2F ' Phone: 1-520-555-1212
for phone = 0 to 2 ' Dial each phone #.
lookup phone,[Scott,Chip,Info],EEloc ' Get location of # in EEPROM.
dial:
read EEloc,EEbyte ' Retrieve byte from EEPROM.
for hiLo = 0 to 1 ' Dial upper and lower digits.
if DTdigit = $F then done ' Hex $F is end-of-number flag
DTMFout 0,[DTdigit] ' Dial digit.
EEbyte = EEbyte << 4 ' Shift in next digit.
next
EEloc = EEloc+1 ' Next pair of digits.
goto dial ' Keep dialing until done ($F in DTdigit).
done: ' This number is done.
pause 2000 '
Wait a couple of seconds.
next ' Dial next phone number.
stop
Figure I-3
Jameco (JC), 1-800-831-4242
or 415-592-8097
Parts Sources
Interfacing to the Telephone Line
600-600Ω
transformer
(JC: 117760)
270V “Sidactor”
(DK: P3000AA61-ND)
10Ω
(both)
3.9V zeners (both)
DK: 1N5228BCT-ND
phone line
(red and green)
0.001µF
0.1µF1k
connect switch (or
relay contacts)
Digi-Key (DK), 1-800-344-4539
or 218-681-6674
I/O pin










