BS2PE as a logic level translator
Archiver
Posts: 46,084
I'm working on a project where I have a OEM GSM modem interfaced with
a BS2PE. I can send it what I think are the right commands but I
don't know if it is receiving them okay. Whenever I issue a command
to the GSM it will send an "OK" command back to me if it worked. But
the GSM only accepts 5V logic levels. I want to communicate with the
GSM through my PC in order to make sure its operating properly. I'm
trying make it so I can type in the GSM commands in hyperterminal and
get the GSM's response printed back on the screen. I'm very new to
Stamps in general so I may be going about this in the wrong way.
Any suggestions or corrections will be greatly appreciated.
Thank You
Sean Vreeland
Here is the code I have so far:
key VAR Byte
key = 0
Loop1:
SERIN 1,16468,[noparse][[/noparse]key]
IF key=0 THEN Loop1
SEROUT 12,16468,[noparse][[/noparse]key]
SERIN 11,16468,[noparse][[/noparse]SPSTR 100]
DEBUG key
DEBUG CR,LF
GOTO debug_out
DEBUG CR,lf
key = 0
GOTO Loop1
debug_out:
cnt VAR Byte
cnt = 0
temp VAR Byte
IF cnt = 99 THEN RETURN
GET cnt,temp
DEBUG temp
cnt=cnt+1
GOTO debug_out
a BS2PE. I can send it what I think are the right commands but I
don't know if it is receiving them okay. Whenever I issue a command
to the GSM it will send an "OK" command back to me if it worked. But
the GSM only accepts 5V logic levels. I want to communicate with the
GSM through my PC in order to make sure its operating properly. I'm
trying make it so I can type in the GSM commands in hyperterminal and
get the GSM's response printed back on the screen. I'm very new to
Stamps in general so I may be going about this in the wrong way.
Any suggestions or corrections will be greatly appreciated.
Thank You
Sean Vreeland
Here is the code I have so far:
key VAR Byte
key = 0
Loop1:
SERIN 1,16468,[noparse][[/noparse]key]
IF key=0 THEN Loop1
SEROUT 12,16468,[noparse][[/noparse]key]
SERIN 11,16468,[noparse][[/noparse]SPSTR 100]
DEBUG key
DEBUG CR,LF
GOTO debug_out
DEBUG CR,lf
key = 0
GOTO Loop1
debug_out:
cnt VAR Byte
cnt = 0
temp VAR Byte
IF cnt = 99 THEN RETURN
GET cnt,temp
DEBUG temp
cnt=cnt+1
GOTO debug_out
Comments
>I'm working on a project where I have a OEM GSM modem interfaced with
>a BS2PE. I can send it what I think are the right commands but I
>don't know if it is receiving them okay. Whenever I issue a command
>to the GSM it will send an "OK" command back to me if it worked. But
>the GSM only accepts 5V logic levels. I want to communicate with the
>GSM through my PC in order to make sure its operating properly. I'm
>trying make it so I can type in the GSM commands in hyperterminal and
>get the GSM's response printed back on the screen. I'm very new to
>Stamps in general so I may be going about this in the wrong way.
>
>Any suggestions or corrections will be greatly appreciated.
>
>Thank You
>Sean Vreeland
>
>Here is the code I have so far:
>
>key VAR Byte
>key = 0
>Loop1:
>SERIN 1,16468,[noparse][[/noparse]key]
>IF key=0 THEN Loop1
>SEROUT 12,16468,[noparse][[/noparse]key]
>SERIN 11,16468,[noparse][[/noparse]SPSTR 100]
>DEBUG key
>DEBUG CR,LF
>GOTO debug_out
>DEBUG CR,lf
>key = 0
>GOTO Loop1
>
>debug_out:
>cnt VAR Byte
>cnt = 0
>temp VAR Byte
>IF cnt = 99 THEN RETURN <<=== This is a RETURN without a preceeding GOSUB
>GET cnt,temp
>DEBUG temp
>cnt=cnt+1
>GOTO debug_out
>
>
>
>
>To UNSUBSCRIBE, just send mail to:
> basicstamps-unsubscribe@yahoogroups.com
>from the same email address that you subscribed. Text in the Subject and Body
of the message will be ignored.
>
>Yahoo! Groups Links
>
>
>
>