johnnewyork
New Member
Hi Guys, I'm looking for help with a new project. I'm not a great software coder but I want to learn. I have made a few small projects using the 08m2 PICAXE with small serial I/o. Now I would like to use a Picaxe to received a "file" serially and store it in an EEPROM then later transmitt the saved "file" back out the serial port. My main problem is how to Write to EEPROM with a Serial interface. I would like to receive and transmit at 38400 baud and save a variable sized file of about 20K bytes. I don't need to perform any background serial I/O.
I am familiar enough with For Next loop statements and reading characters from the serrxd but I don't understand how to receive large amount of "data" character and save it in real time.
I have read through a lot of example posted here but I still don't understand. I have a 28x2 and a 20m2 for prototyping and a EEPROM kit.
I believe I need something like this:
code:
code to initiate the transfer
"here"
;for reading the characters
Transfer_to_EEPROM
HI2CSETUP I2CMASTER,%10100000,i2cfast_32,i2cword ;Set-up for eeprom
for b0=0 to 2500 ; read in 20000 characters and save then in the EEPROM
serrxd (b0,b1,b2,b3,b5,b5,b6,b7)
writei2c, 0, (@ptrinc,@ptrinc,@ptrinc,@ptrinc,@ptrinc,@ptrinc,@ptrinc,@ptrinc)
pause 40
next b0
;
code to initiate the transfer
"here"
;for sending the characters
Transfer_to_PC:
for W1=0 to 1023
readi2c W1,(B1)
pause 40
hserout 0,(B1)
next W1
Any help would be appreciated.
thanks john
I am familiar enough with For Next loop statements and reading characters from the serrxd but I don't understand how to receive large amount of "data" character and save it in real time.
I have read through a lot of example posted here but I still don't understand. I have a 28x2 and a 20m2 for prototyping and a EEPROM kit.
I believe I need something like this:
code:
code to initiate the transfer
"here"
;for reading the characters
Transfer_to_EEPROM
HI2CSETUP I2CMASTER,%10100000,i2cfast_32,i2cword ;Set-up for eeprom
for b0=0 to 2500 ; read in 20000 characters and save then in the EEPROM
serrxd (b0,b1,b2,b3,b5,b5,b6,b7)
writei2c, 0, (@ptrinc,@ptrinc,@ptrinc,@ptrinc,@ptrinc,@ptrinc,@ptrinc,@ptrinc)
pause 40
next b0
;
code to initiate the transfer
"here"
;for sending the characters
Transfer_to_PC:
for W1=0 to 1023
readi2c W1,(B1)
pause 40
hserout 0,(B1)
next W1
Any help would be appreciated.
thanks john