PDA

View Full Version : Writecode quirkiness



Joe Rocci
- 25th August 2006, 20:50
After spending the better part of a day trying to figure out why my WRITECODE sometimes works and sometimes doesn't, I've come to the conclusion that the address argument MUST be a word variable and the data argument MUST be a byte variable. Also, I'm told by others that putting anything into the address & data arguments except a constant or a variable also produces strange results. I haven't tried determine if READCODE acts the same way, but I wouldn't be surpprised.

Has anyone else experienced this?

Joe

BigWumpus
- 25th August 2006, 22:16
No,
I put 14-bit-values in my ROM of a 16F876 with Writecode <Word-Var>,<Word-Var>.

And I read it back with my programmer...

But 18Fxxx is another joke...

Joe Rocci
- 25th August 2006, 23:14
Yes, important point I forgot to mention...My processor is a PIC18F2620

Joe

Jumper
- 26th August 2006, 04:49
It seems to work nice with my 18-pic using a WORD for address and a WORD for DATA. But it is less reliable if I try to use a word array. I need to move the data from the array into a temporary word variable and then write it.


/me