Not sure about the best solution but here is how to split a number up into two EEPROM spaces
Read it back the same way.Code:WRITE 0,NUM.BYTE1 WRITE 1,NUM.BYTE0
HTH
Not sure about the best solution but here is how to split a number up into two EEPROM spaces
Read it back the same way.Code:WRITE 0,NUM.BYTE1 WRITE 1,NUM.BYTE0
HTH
Dave
Always wear safety glasses while programming.
I'm in the office and can't test this right now so I ask further.
Do you know if I can store WORD sized numbers the same way you show me?
The DATA command allows to do this, but WRITE?
>>> just found the answer: Yes, it is possible. I'll have to try this when I get back home...
<img src="http://www.picbasic.co.uk/forum/attachment.php?attachmentid=2421&stc=1&d=120590965 5">
Last edited by flotulopex; - 19th March 2008 at 07:54.
Roger
Yep. DATA is at program time, WRITE is for run time.
Dave
Always wear safety glasses while programming.
Since I'm using interrupts, storing data with WRITE might sometimes be too long in conjunction some ADC processes.
How do I store numbers greater than 65535 in variables and reuse them?
I'm lost.
Roger
Again, typical small U.S. school's got me here...I don't get it
Me = uni-lingual ... there's a better word for that, but I don't know what it is off hand...
My point is that PBP can handle numbers over 65535 by using LONG variables...which you can then split up using the WORD or BYTE modifiers, then store those numbers if needed, or recover them, using the WORD, or BYTE variable modifiers.
Roger ...
You can store them in temporary variables and send them to EEPROM when you've enough time ...
WHILE some ADC conversions are running in the background ... for example.
ah, ... yes, I see ... that needs some ... brain use ???
just open your PBP "samples" folder and look for "A2D10" ... instead of "ADCIN10"
...
Good night, Roger
Alain
************************************************** ***********************
Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
************************************************** ***********************
IF there is the word "Problem" in your question ...
certainly the answer is " RTFM " or " RTFDataSheet " !!!
*****************************************
J'ai ze feeling qu'on me taquine un peu...
Going to do some searching in the samples then.
Thanks for the advice.
Roger
Bookmarks