PDA

View Full Version : storing data and dumping data?



earltyso
- 27th November 2007, 23:18
I would like to work on a fairly advanced data collection pcb using a PIC, several sensors and then store the data (temporarily) in the PIC memory, power off the board, then power up the board and dump the raw data to an lcd or my pc via rs232 connection. I found this same code in pbp manual and would like to know if I could keep the data stored to variable W1, store it in non volitile memory until board can be powered up again and then dump it?????

‘ Determine frequency on a pin
COUNT PORTA.2, 1000, W1 ‘ Count for 1 second
Serout PORTB.0,N2400,[W1]


thanks for any help

earltyso
- 28th November 2007, 01:22
OK, so after work tonight, I did some more looking in my pbp manual....
looks like I can write to my EEPROM as long as I do not collect too much of it.
I can then use write and read statements to fetch values in variables.
Sorry to ask about something without researching it out first.
Has anyone done something similar for ex: model rocket data, weather balloon sensor data??? I would like to hear of successes or problems you have run into.
thanks

also...how many EEPROM locations are there?
does anyone know how much EEPROM memory there is in an 16F877 chipset, I could not find in data sheet under memory chart.

thanks again....

ronjodu
- 28th November 2007, 02:18
"The PIC16F876/877 devices have 256 bytes of
EEPROM data memory"

This was taken from page 41 of the Datasheet.

I only read and write one byte at a time so I can't help with the other part of your question.

Hope this helps...

BrianT
- 28th November 2007, 08:02
The internal EEROM on a PIC is probably not a good place to store data. One, the space is very small, two, the EEROM has a wearout lifetime.

Have a look at 'serial memory' of the 24LC512 variety. These are simple to interface but are only a small size for a logger. The M25P64 and M25P128 are much bigger but a little harder to use. Probably the best solution for data logging is the SD/MMC cards which are outstanding size for the money.

HTH
Brian

earltyso
- 28th November 2007, 15:57
thanks for the tips, I will loop into the serial external devices...