one more thought, do any of your isr routines alter the eecon registers , ie a read eprom
one more thought, do any of your isr routines alter the eecon registers , ie a read eprom
Warning I'm not a teacher
Thanks for the thoughts. I tried something, in the subroutine to SaveChanges I used WRITE 132,150 instead of WRITE 132,CB. The retrieved value was 150. It's not an EEPROM issue after all. Somehow my variables are getting corrupted somewhere. I'm reviewing all code with a "magnifying glass in one hand and a fine tooth comb in the other" to try to find where things are going awry. Thanks all.
No, CB is the name of my variable, not the value.
Do you have (or can you add) a debug port (EUSART, SEROUT, DEBUG)?
If so, then print the value of your variable out before calling the write routine, before executing the write command, after executing the write command, read the value back immediately after and print it out again.
Is CB declared as a BYTE?
If you're indexing arrays somewhere then doublecheck that you're not writing outside the range of the array.
CB is declared as a BYTE. I checked the arrays' indexing several times. I have a spread sheet with all the variables listed, size (BIT, BYTE, etc), USB ID#, the internal code used to communicate each variable with other PICs on the board (there are a total of 6), and some other criteria. I've been working on this project for the past several years. It's due in less than 2 weeks.
I decided to rebuild the HIDmaker side of things. I found several variables, including arrays, that were structured as signed bytes. I'm dealing with the sign in software and forgot I did that earlier. I will be totally revamping it around the proper non-signed bytes and try again.
This makes me wondering, how can one follow every detail in a large program.
Too many variables and chances are something will go wrong.
Ioannis
Bookmarks