And not having my PBP manual handy, do those declares try and allocate 8 arrays , 250 elements big? so 2k just for the vars?
And not having my PBP manual handy, do those declares try and allocate 8 arrays , 250 elements big? so 2k just for the vars?
-Bert
The glass is not half full or half empty, Its twice as big as needed for the job!
http://foamcasualty.com/ - Warbird R/C scratch building with foam!
yepok put this at ten and it now compile error free. Thanks for the cue
really appreciate it.
But with ten elements:
Voltage_Charge_time_RTCSec var byte[10]
does that mean I can have only ten values? like:
Voltage_Charge_time_RTCSec var byte[0]
Voltage_Charge_time_RTCSec var byte[1].....
......
Voltage_Charge_time_RTCSec var byte[9]
Voltage_Charge_time_RTCSec var byte[10] ?????
Ken
yes thats what it means, except it will go from 0 - 9, not 0 - 10. 0 - 10 is 11 elements. What are you trying to save here? sec and min should never need to be over 60 hours would never need to exceed 12 or 24 days would never need to be more than 31 add months for up to 12. but I may very well be thinking a whole different thing.
-Bert
The glass is not half full or half empty, Its twice as big as needed for the job!
http://foamcasualty.com/ - Warbird R/C scratch building with foam!
Humm yes I understand what you mean.
Here is what i am attempting to do, for sure there is anothr way to do it much better then the one I am thinking. My battery will be charging and discharging automatically for an indefinit period of time. Lets say the longest would a month !! So there could be lets say 5 charge /discharge cycle a day..so 150 total. SO for the seconds I would have something like that:
Voltage_Charge_time_RTCSec var byte[0] = First charge cycle time (ie. 02 seconds)
Voltage_Charge_time_RTCSec var byte[1] = Second charge cycle time (ie. 42 seconds)
etc...
How can I keep the time for 150 cycles ?
K
Last edited by lerameur; - 25th November 2010 at 15:53.
Write to the EEPROM?How can I keep the time for 150 cycles ?
Dave
Always wear safety glasses while programming.
Guess thats a good idea. I will go ahead and read up on EEPROM in the F88.pdf meanwhhile if you have a tutorial of something interesting to read on programming to the EEPROM with pic basic, that will be very appreciate . I never programmed to the EEPROM before !!
k
Hi I can find a lot of stuff with external EEPROM, if I need to program the internal EEPROM, do I need to use wires to itself ? I have not seen any examples either !! so far
K
Hello,
The 16F877A has 368 bytes of RAM so trying to fit 8 arrays each 250 bytes long is simply impossible.
On top of that, on 16F devices, the RAM is divided into banks (which PBP mostly handle transparantly for you) and each array has to fit in one RAM bank. Each bank is 128 bytes but the lower 32bytes of each bank is occupied by the special function registers (TMR0, INTCON, TXREG etc) so only the upper 96 bytes of each bank is available for "user RAM". So the longest array you can declare on a 16F device is 96 bytes.
Not all banks will have the top 96 bytes available either, see the memory organization chapter in the datasheet for the particualr PIC details and the section about arrays in the PBP manual for more details.
/Henrik.
EDIT: Ah, was a little slow typing there. Anyway, hopefully the information will help.
Bookmarks