Can anyone help me with data, write and read statement
Archiver
Posts: 46,084
Like the header says, i like to see a example how to use the commands
READ and Write, into and from the Eeprom (with data statement). If
possible I would use it for store serial data and read this same data
later on and send it to a lcd display (full wired 44780chip).
The display part works already fine.
Is this in general possible ? (mind me ->beginner).
Jugo
pd0ffm@a...
READ and Write, into and from the Eeprom (with data statement). If
possible I would use it for store serial data and read this same data
later on and send it to a lcd display (full wired 44780chip).
The display part works already fine.
Is this in general possible ? (mind me ->beginner).
Jugo
pd0ffm@a...
Comments
>READ and Write, into and from the Eeprom (with data statement). If
>possible I would use it for store serial data and read this same data
>later on and send it to a lcd display (full wired 44780chip).
>The display part works already fine.
>Is this in general possible ? (mind me ->beginner).
Jugo,
The thing about writing to eeprom is that it is slow. Each byte take
5 to 10 milliseconds. So you will not be able to pump large amounts
of data from the serial port into the eeprom. That said, it is quite
possible to receive one byte or a short string of data and then then
write that into the eeprom:
dog data "hellos" ' will later hold other data.
xxx var byte(6) ' 6-byte array to receive data
ix var nib ' array index
char var byte ' for character printout
loop:
serin 16,396,[noparse][[/noparse]str xxx\6] ' read serial data string at 2400 baud
for ix=0 to 5
write dog+ix,xxx(i) ' write to eeprom
next
' ...
' now to read the data from eeprom...
for ix=0 to 5
read dog+ix,xxx ' read from eeprom
debug xxx ' could be your lcd instead
next
goto loop
Is that what you are looking for? BTW, the new Stamp, BS2P will
have an additional SERIN modifier (SPSTR) that will allow capture of
up to 127 bytes in a row at high speed into the scratchpad RAM.
-- Tracy
http://www.emesystems.com