Can anyone point me in the general direction of some example code on working with Arrays and data storage. I have been over the help files and demo programs like a nasty rash and ended up more confused than when I started.
I gather I need to establish an array with a statement like 'DIM array_DateStamp ( 20 ) which will setup an Array called DateStamp of 20 Lines. in the RAM
How would I create the Array in EEProm and what about the string length....
(My Head Hurts! )
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I don't think I would use strings here as Dec will suffice. Please substitute GCB I2C routines for my I2CWrites. If DS1307 then use BCD to Dec routine before storing. Something like this:
sub WriteRTCeeprom
I2CWrite(write_HK24C32,addr1,Mth)
wait 6 ms
addr1 += 1
I2CWrite(write_HK24C32,addr1,Dte)
wait 6 ms
addr1 += 1
I2CWrite(write_HK24C32,addr1,Yr)
wait 6 ms
addr1 += 1
I2CWrite(write_HK24C32,addr1,Hr)
wait 6 ms
addr1 += 1
I2CWrite(write_HK24C32,addr1,Min)
wait 6 ms
addr1 += 1
I2CWrite(write_HK24C32,addr1,Secs)
wait 6 ms
addr1 += 1
end sub
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Can anyone point me in the general direction of some example code on working with Arrays and data storage. I have been over the help files and demo programs like a nasty rash and ended up more confused than when I started.
I gather I need to establish an array with a statement like 'DIM array_DateStamp ( 20 ) which will setup an Array called DateStamp of 20 Lines. in the RAM
How would I create the Array in EEProm and what about the string length....
(My Head Hurts! )
I don't think I would use strings here as Dec will suffice. Please substitute GCB I2C routines for my I2CWrites. If DS1307 then use BCD to Dec routine before storing. Something like this:
sub WriteRTCeeprom
I2CWrite(write_HK24C32,addr1,Mth)
wait 6 ms
addr1 += 1
I2CWrite(write_HK24C32,addr1,Dte)
wait 6 ms
addr1 += 1
I2CWrite(write_HK24C32,addr1,Yr)
wait 6 ms
addr1 += 1
I2CWrite(write_HK24C32,addr1,Hr)
wait 6 ms
addr1 += 1
I2CWrite(write_HK24C32,addr1,Min)
wait 6 ms
addr1 += 1
I2CWrite(write_HK24C32,addr1,Secs)
wait 6 ms
addr1 += 1
end sub