Storing Data

Data logging or Event monitoring systems generate data that needs to be stored. Depending on the complexity or sophistication of the system the data that needs to be stored could be the value or values captured and the date and time of the event.

How can you store this level of complexity?

There are two methods of not losing your generated data and these are 1) Exporting the data off the data logging system as soon as the data is captured and the 2) sore it locally. If your DLS(Data Logging System) is online i.e. wifi, internet etc exporting the data can be real time. However, if the connectivity goes off line for some reason or fails a fail safe way of storing the data locally is necessary.

PICs do, along with their program memory have some on board memory. This memory is in the form of EEPROM memory which is basically a collection of 8 BIT registers. The reason for limited data storage is that each register can be a single value meaning that you eat up your available memory.

The on board memory can be extended by adding an external memory device in the form of an external EEPROM or an SDCARD. The EEPROM is the more traditional method. However, SDCARDS using the SPI bus are a viable alternative. A very useful reason to use an SDCARD is that the data can be stored in FAT16 format which means a stock standard PC can read the data directly.

When deciding which to use, each has its advantages. The EEPROM is cheap and does not require additional sockets and so on to your application’s hardware. The SDCARD requires an SDCARD holder which makes swopping out a full card for a new one much easier. EEPROM is also quite limited in memory capacity, whereas an SDCARD is available in GB capacities.

It really does just depend on how much data you need to store and how practical and easy accessing that data needs to be.

The Protodev DX V2 is supplied with a SDCARD holder for dataloggin applications. [E]