hyperterminal and basic stamp integration
James2010NG
Posts: 10
We were wondering how we can put hyperterminal results into the DEBUG terminal for basic stamp 2. We are inputting AT commands to HyperTerminal and we want to display the "OK" in the debug terminal. Any help? Thanks in advance.
Comments
The second answer is "you'll need some more hardware" -- if you have a second serial port on your PC, or add one with another USB to Serial converter, you can then add a TTL to RS232 adapter card ($12 or so from Kronos Robotics) to use some other pin on your BS2 as a serial port.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- Stephen
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- Stephen
GM862 documentation: www.gm862.com/en/products/gsm-gprs.php?p_id=12&p_ac=show&p=4
http://www.gm862.com/en/products/gsm-gprs.php?p_id=12&p_ac=show&p=4 (if I messed the above one up)
On the GM862:
TXD PIN 1
RXD PIN 2
thats all we need.
For starting off, we want to debug an "OK"
so we have:
response VAR Byte(5)
SEROUT TXD, 84, [noparse][[/noparse]"AT", CR]
SERIN RXD, 84, [noparse][[/noparse]STR response\5\CR]
DEBUG STR response
what happens is that this will display on hyperterminal, it will show
AT
OK
but we cannot transmit the "OK" from HT to DEBUG. The DEBUG stays blank?
So, to get the OK, you'll need:
SERIN RXD, 84, [noparse][[/noparse]STR Response\5\CR, STR Res2\5\CR]
Or, you could just remove the "\CR" from the end and get it all. Note the STR modifier terminates a string with a "NULL" ( CHR(0) ) character, so you'll need Byte(6), not Byte(5).
...
...
serout Tx,84,[noparse][[/noparse]"AT+CMGR=1", CR]
serin Rx, 84, [noparse][[/noparse]WAIT("xxxx"STR response\25, command] the xxxx is the last 4 digits of phone number
debug str response
we are sending a text message containing one letter that we want to initialize a new subroutine, thus the command variable.
we have then if command = "blank" then do
"blank"
and so on. But we only get random symbols with the WAIT("") command. If we take it out we get the first 20 ish characters of what shows in the HT. We cant JUST read the message.