Shop OBEX P1 Docs P2 Docs Learn Events
EEPROM write program — Parallax Forums

EEPROM write program

Mag748Mag748 Posts: 266
edited 2012-10-02 07:14 in Propeller 1
Hello,

I am writing an application to write data from a DAT section to the upper part of the propeller EEPROM. I am having difficulty getting succesfull results. The program seems like it should be straight forward enough, but I must be missing something.

If anyone has time to loot at my code that would be appreciated. This is the output that I am getting when I should be getting a long string of text before the "End of String" statement:
Debug terminal is running on cog 2.
I2C Driver runs in Spin so no cog required.
Attempting to write a string...
Writing "testData" at address $8000.
temp = 128.
Wrote page at $8000.
temp = 128.
Wrote page at $8080.
temp = 18.
Enter address (HEX) to read string from:
Reading memory at address $8000:
0
--END OF STRING --

DONE Reading at address $8001.
Enter address (HEX) to read string from:
Reading memory at address $8001:

--END OF STRING --

DONE Reading at address $8001.
Enter address (HEX) to read string from:
Reading memory at address $7FFF:

--END OF STRING --

DONE Reading at address $7FFF.
Enter address (HEX) to read string from:

Comments

  • Dave HeinDave Hein Posts: 6,347
    edited 2012-10-01 15:35
    Get rid of the "@" before the Stringpointer in the bytemove. Stringpointer already contains the address you need. @Stringpointer is just the address of your pointer variable.
  • Mag748Mag748 Posts: 266
    edited 2012-10-02 06:30
    Dave Hein wrote: »
    Get rid of the "@" before the Stringpointer in the bytemove. Stringpointer already contains the address you need. @Stringpointer is just the address of your pointer variable.

    You have solved my problem. I thank you very much.

    After I finish writing this program, do you think this would be a useful object to add to the object exchange? There doesn't appear to be any simple object like this already.

    Thanks,
    Marcus
  • FORDFORD Posts: 221
    edited 2012-10-02 06:34
    Hi Marcus,

    Did you edit the content of your original post after your question was resolved ?
  • Mag748Mag748 Posts: 266
    edited 2012-10-02 07:14
    Hi Ford,

    Yes, I removed the attachment that contained the non-functioning program. I plan to reattach the working code once it is finalized.

    Thanks,
    Marcus
Sign In or Register to comment.