I'm looking for advice on program structure. I'm working on an automotive project than includes quite a few different functions. As a result, there are many pieces of data I would like to be able to record, and they all come from different sub programs.
I have 6 ADC channels operating. Each channel has three pieces of data with it: the raw ADC value, the voltage, and the converted sensor data (there is a different type of sensor on each channel).
There are some process control functions going on with the sensor data as well. I would like to be able to log the output for these functions as well.
My question is this:
How should I arrange the data so it is easily accessible to the data logging program? I need to be able to tell the data logger I want to log certain items, and exclude others. Right now I'm considering using a large table of pointers in flash, each pointer to a specific item. I can then reference each item by its array index in the table when I tell the datalogger what I want to record.
Does anyone else have experience with this sort of thing, and how did you solve it?
For those who are interested, the app will be running on a 1281, with over 90% of the SRAM available for datalogging memory, so extremely conservative SRAM usage is not a requirement. Flash memory space is also not a concern.
Thanks in advance!