Hi,
I do read the datasheet of PIC18F4620 and know the EEPROM address is 0 to 1023.
So why did you try writing to $4205 then?
Anyway,
What version of PBP are you using? Step is a reserved a word and has been for as long as I can remember, I'm surprised that code even compiles.
I don't have a 4620 to test with but I do have a 4520 so I tried the following code:
Code:
i VAR WORD
Char VAR BYTE
Boot:
HSEROUT ["Program start",13,13]
HSEROUT ["Writing EEPROM, starting at location $0000..."]
i = 0
For Char = "A" to "Z"
WRITE i, Char
i = i + 1
NEXT
HSEROUT ["Done.",13]
HSEROUT ["Writing EEPROM, starting at location $0200..."]
i = $200
For Char = "A" to "Z"
WRITE i, Char
i = i + 1
NEXT
HSEROUT ["Done.",13]
PAUSE 1000
HSEROUT ["Reading EEPROM, starting at $0000: "]
For i = 0 to 25
Read i, Char
HSEROUT[Char]
NEXT
HSEROUT[13]
HSEROUT ["Reading EEPROM, starting at $0200: "]
For i = 512 to 537
Read i, Char
HSEROUT[Char]
NEXT
HSEROUT[13,13, "Program end.",13]
PAUSE 10
END
And it produces the following output
Code:
Program start
Writing EEPROM, starting at location $0000...Done.
Writing EEPROM, starting at location $0200...Done.
Reading EEPROM, starting at $0000: ABCDEFGHIJKLMNOPQRSTUVWXYZ
Reading EEPROM, starting at $0200: ABCDEFGHIJKLMNOPQRSTUVWXYZ
Program end.
Which shows that, at least at this end, both WRITE and READ works as expected.
I can't really tell what's going on in your case and I don't really understand what exactly the problem is. Can you try and explain it a little better?
If you contunue to have issues you need to boil the code down to a short example that shows the problem and post that code.
/Henrik.
Bookmarks