'MODEM PROGRAMME 'MILFORD INSTRUMENTS November 2000 'Series of routines for experimenting with the Eur-modem-24 'Pin connections 'Do NOT use the BS2's regulator to supply current to the modem 'use an external +5V psu rs232 con 396 '2400baud- direct txpin con 10 'Stamp message out pin-connect to Modem pin 4 rxpin con 14 'Stamp recieve pin- connect to modem pin 3 RI con 11 'ring indicator pin- connecct to modem pin 9 'other modem signal lines not used Setup: dirs=%0000010000000000 'set up the pins forI(0) or O(1) pause 1000 main: gosub call 'Call the number pause 20000 'wait 20 secs for the modems to initialise gosub send_data 'now send the data gosub hang_up 'now hang up pause 20000 'do it all again goto main '=========================================================== 'SUBROUTINES '========================================================== CALL: 'Call this number serout txpin,rs232,["ATDT01977683665",CR] return SEND_DATA: 'Send this greeting serout txpin,rs232,["Hello",CR] return HANG_UP: serout txpin,rs232,["+++"] 'switch back to command mode pause 2000 serout txpin,rs232,["ATH",CR]'Send the hang-up code return Answer_Phone: if RI=1 then answer_phone 'wait for ring indicator serout txpin,rs232,["ATA",CR] 'pick up the phone pause 20000 'wait 20 secs for modems to initialise serout txpin,rs232,["How are you?",cr,10] 'send data,carriage return and line feed gosub hang_up return