OWOUT dynamic memory addresses
I have a IButton DS1921G and logs the temperature every X minutes to its memory! It starts at address 1000h and goes to 3048h. I am trying to use the OW commands to get X readings but do not know how to get this to work!
Everything works fine if I use a static memory address such as 1000h or 1084h. Which uses lsb first:
OWOUT DQ, 1, [$CC, $F0, $84, $10] ' gets memory location 1084h
I would like to use a for loop to do this such as:
Code:
mem_start = 1000h
mem_end = 1060h
for i = 1 to 60
if i < 10 then OWOUT DQ, 1, [$CC, $F0, $0i, $10] ' I get an error trying to compile for $i
if i >= 10 then OWOUT DQ, 1, [$CC, $F0, $i, $10] ' I get an error trying to compile for $i
nexti
Anyone have any suggestions on how I can do this using OW commands or anything at this time!
Thanks,
Scott
Please, don't take this wrong...
Scott, I took a look at your posting history and something is becoming clear. You don't understand values (numbers, strings, etc.) and how the PIC (or any computer for that matter) deals with them. There are tons of good web sites that can help you understand how all these values interact and interchange with each other. I don't want to sound mean, but you have to get a better understanding of computer math, variable, etc..
{sigh}
I didn't learn these things when I was in school and I've paid for it all my life. I'm 46 years old and just now, it's starting to click.