It's a byte. That's not ok for 1-256? If that's the case, through your eyes, will I need to change anything else in the code, besides the VAR? Thanks a bunch!
C
It's a byte. That's not ok for 1-256? If that's the case, through your eyes, will I need to change anything else in the code, besides the VAR? Thanks a bunch!
C
Sorry, mis-spoke...
BIT 1 0 to 1
BYTE 8 0 to 255
WORD 16 0 to 65535
LONG* 32 -2147483648 to 2147483647
My bad...0 to 255
Thanks again!
C
A byte is 256 steps starting at 0.
Not knowing the value of "boardadd" I will make a guess and say changing it to WORD is all you have to do. Pulling the three digits of boardadd, 999 would be the largest number... right?
Dave
Always wear safety glasses while programming.
thanks mackrackit. the BoardAdd is stored in EEPROM 0, with a min value of 001 to a max value of 254. I hope that answers what your trying to ask me?
Thanks,
C
Dave
Always wear safety glasses while programming.
Sorry, I guess I should have noted that this routine checks to make sure you don't try to write an address to EEPROM that is >254 or is =0. So, if a user enters "A280" for example, I want that to be invalid. I hope that helps explain my goal?
Just tried it in the sim...
I entered "A300" and it returned with,
"Board received A044
Board address set to 44"
Hopefully you can see what I mean?
Thanks again,
C
Ok... Go ahead and change it to a WORD. 44 is what you are getting when it rolls over.
Dave
Always wear safety glasses while programming.
On that note, a word sized var won't flow over into EEPROM 1 will it? I'de like to avoid that if I could.
Thanks again,
C
Bookmarks