I am creating a data logger with a PIC18 microcontroller, and I’m writing the code in C.
I want to create a file containing all the data I’ve recorded. Inicially I’d like to create 2 file types. One of them .txt and the other one in .pqd (PQDIF format).
The problem with all this is that I can’t find anywhere the structure fo a txt file. I’ve found a dll written in VB for pqd which can be translated to C, but it’s difficult, so I’ve decided to start with the easier one.
Does anyone know where I can find the txt’s logical structure. If so, do you know how I could look for other file types’ structures?
Sorry for any english mistakes.
There is no structure. Just use the Microchip Application Libraries and you’re on your way:
http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=2680&dDocName=en547784
Here is the MDD section:
http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=2680&dDocName=en537999
What’s more, they have existing demo applications for logging data from the analog-to-digital converter (ADC) to the text file on a regular basis. You can either purchase a $50 demo board to get up and running immediately, or you can order free sample PIC18 chips (chips and shipping are FREE), and build your own system on a solderless breadboard.
http://www.microchip.com/samples/
I have personally written SD card loggers to text/CSV files for PIC18, PIC24F, and PIC32mx chips on numerous occasions. You can find some of my examples if you look for posts by user “Dogbertius” on the Microchip.com forums.
Good luck!