Shop OBEX P1 Docs P2 Docs Learn Events
reading incoming serial...and new questions — Parallax Forums

reading incoming serial...and new questions

ArchiverArchiver Posts: 46,084
edited 2000-05-22 23:20 in General Discussion
Hi,

The character you are getting is the carriage return after the word "OK",
you must set the 'wait' parameters for the characters -after- which you want
to read n bytes.
However, as others have said, you are memory-limited.

To follow on this subject, another question to the list:

- Does the serial RAM Pack increase memory for the program itself? I think
it doesn't, as it only stores and sends out data via one of the serial pins
on the Stamp.
- Would it be possible to read n bytes through one serial pin and send them
straight out via another to the RAM Pack? This way you could 'buffer' around
8k of data.

Cheers all,

Mike

>
Mensaje original
> De: sdye@m... [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=WBUQx9jd-2IT0bWKYAdIaCVF4yWr5IAzrLazHl84EU1sygonRM6rg0eciIR61ImJYXKcaE0p1wKpPA]sdye@m...[/url
> Enviado el: lunes, 22 de mayo de 2000 22:48
> Para: basicstamps@egroups.com
> Asunto: [noparse][[/noparse]basicstamps] reading incoming serial data greater than 1 byte
>
>
> Hello, I am having trouble reading incoming serial data greater than
> one Byte. I have connected my Stamp 2 to a modem, and am trying to
> read the responses it gives when I send a command to it. The commands
> are successfully sent using the SerOut command.
>
> The particular command I use should solicit a response in excess of
> 150 characters that terminates with "OK". What happens is OK comes
> back , but the message content is lost. I use
> serin p,b[noparse][[/noparse]wait("OK"), serData]
> This only gives me nothing or just 1 byte!
>
> Ideally, the entire response would be stored in a string.
>
> Please help, I need to see where I am going wrong!
>
> Thank you
>
>
>
>
>
>
Sign In or Register to comment.