I showed this thread to a friend this morning: "Look", I said "a few days ago I had little clue about how to solve this problem I have, but now a good handful of good people around the world have been helping me find a solution, and showing how to do it". "Wow" he said "I thought Internet forums were all about arguing". Not so. Not on this Forum.
Erlend
Thanks for my morning pick me up Erlend.
Lets hope there are good people on other forums helping and sharing ideas to solve other problems around the world.
I do this kind of stuff all the time with the excess EEPROM.
You can easily substitute a 64KB EEPROM device for your 32KB EEPROM device. They are entirely compatible. You can also use a 128KB device, but it MUST have pin 3 (A2) tied high and that's probably tied low on your board.
My recommendation would be to create a file that holds "hunks" of messages. Organize the messages as statements that go in a "dat" section. So, for example:
byte 27,"This is message 27.", 0
byte 28, "This is message 28!", 0
Then, write a program that does the following:
1) Churns through the messages in the dat section and counts their aggregate length and grabs the first and last message numbers, call these things X, Y and Z, respectively.
2) Looks through the EEPROM to determine the size of the currently stored messages, the address of existing message Y and the address of message Z.
3) Relocates the messages from Z + 1 to the end of the eeprom image to accomodate the new space requirements, this might move them up, down or not at all
4) Inserts the new messages into the eeprom
Then, just use the include file mechanism to combine this program with some subset of your messages and it will update the EEPROM accordingly. This means you don't have to worry about the case where the aggregate message size is too big to contain in a program. It also avoids the mess of having to manage communications with some file transfer program/protocol. And, it's wicked fast.
Write another little program to display the EEPROM message contents and do a little testing. This also allows you to recover messages if they get lost. It's best to print them out in the same format that you need them. Then you have a closed system that's easy to maintain.
Parallax has the best technical forum here I have ever seen.
We like a good argument, err debate, as much as anyone else. But generally the arguments are backed up with solid evidence and made with the best of intentions.
Well done everybody.
Note to self: I must try to not argue so much
Agree 100% in regard to the quality of the forum, but please don't try too hard. I have learned a lot from these ar...er debates.
Comments
Thanks for my morning pick me up Erlend.
Lets hope there are good people on other forums helping and sharing ideas to solve other problems around the world.
I do this kind of stuff all the time with the excess EEPROM.
You can easily substitute a 64KB EEPROM device for your 32KB EEPROM device. They are entirely compatible. You can also use a 128KB device, but it MUST have pin 3 (A2) tied high and that's probably tied low on your board.
My recommendation would be to create a file that holds "hunks" of messages. Organize the messages as statements that go in a "dat" section. So, for example:
byte 27,"This is message 27.", 0
byte 28, "This is message 28!", 0
Then, write a program that does the following:
1) Churns through the messages in the dat section and counts their aggregate length and grabs the first and last message numbers, call these things X, Y and Z, respectively.
2) Looks through the EEPROM to determine the size of the currently stored messages, the address of existing message Y and the address of message Z.
3) Relocates the messages from Z + 1 to the end of the eeprom image to accomodate the new space requirements, this might move them up, down or not at all
4) Inserts the new messages into the eeprom
Then, just use the include file mechanism to combine this program with some subset of your messages and it will update the EEPROM accordingly. This means you don't have to worry about the case where the aggregate message size is too big to contain in a program. It also avoids the mess of having to manage communications with some file transfer program/protocol. And, it's wicked fast.
Write another little program to display the EEPROM message contents and do a little testing. This also allows you to recover messages if they get lost. It's best to print them out in the same format that you need them. Then you have a closed system that's easy to maintain.
Good luck.
Agree 100% in regard to the quality of the forum, but please don't try too hard. I have learned a lot from these ar...er debates.