serial input > 26 bytes
I am using (or more correctly, attempting to use) a BS-2SX to read
data packets which come in over serial RS232 lines. By the nature of
the packets I typically need to grab sequences of contiguous bytes
which are longer than the RAM memory of the BS-2SX (26 bytes),
sequences up to 80 bytes long. The overhead in initiating a SERIN
command, the somewhat extensive processing on the string I need to do
before storing in EEPROM memory, as well as the time it takes to do
this storing, mean that it is impossible to grab a packet in 26-byte
chunks. Using the tricks outlined in the BS-2SX manual, namely
reading in numerical characters as actual numbers, etc, etc, I can
get over the 26-byte limit to a degree, but this depends on knowing
ahead of time the nature of the data in the packet, which in general
I do not know. Also these tricks fall far short of getting to 80
bytes.
Short of scraping the BS-2SX completely and going to some other
microcontroller, I see no way around this problem. Is that correct?
Alternately, is there a way it can be done in hardware? In other
words, are there "serial line buffers" available that could buffer
the 80-byte packet, so the BS-2SX could subsequently read it byte-by-
byte, doing the necessary processing as each byte is extracted from
the buffer? The nature of the packets and the time between packets
is such that this would be ok to do.
Thanks, Steve
data packets which come in over serial RS232 lines. By the nature of
the packets I typically need to grab sequences of contiguous bytes
which are longer than the RAM memory of the BS-2SX (26 bytes),
sequences up to 80 bytes long. The overhead in initiating a SERIN
command, the somewhat extensive processing on the string I need to do
before storing in EEPROM memory, as well as the time it takes to do
this storing, mean that it is impossible to grab a packet in 26-byte
chunks. Using the tricks outlined in the BS-2SX manual, namely
reading in numerical characters as actual numbers, etc, etc, I can
get over the 26-byte limit to a degree, but this depends on knowing
ahead of time the nature of the data in the packet, which in general
I do not know. Also these tricks fall far short of getting to 80
bytes.
Short of scraping the BS-2SX completely and going to some other
microcontroller, I see no way around this problem. Is that correct?
Alternately, is there a way it can be done in hardware? In other
words, are there "serial line buffers" available that could buffer
the 80-byte packet, so the BS-2SX could subsequently read it byte-by-
byte, doing the necessary processing as each byte is extracted from
the buffer? The nature of the packets and the time between packets
is such that this would be ok to do.
Thanks, Steve
Comments
read the first 16 bytes and reread the input data again by skiping the first
16 bytes and reading the next 16 bytes, etc. You could try using the scratch
pad ram provided by the put and get commands. I don't know if this sceond
method is fast enough for the serin to read and put and go back to again.
Another method might be to use Parallax StampMEM board to read the serial
input data directly. This later method would take a little more programming
code.
Chuck