I like working with Pic micros. They have no libraries or other overhead to worry about. I have a ‘library’ of subroutines to use and tend to use the same device wherever possible, 16F876A. For a datalogger function the main problem is how to store data that can be easily read later. Openlog does this very well.
But it has some peculiar features that need handling. For instance on switch on:
TXO stays low for 75ms, the goes high and 11us later sends 1 at 9600 baud, then nothing for 650ms, then 2 and <. So you have to be ready to read ASCII 49, 50 and 60 at the right moments.
I set echo to off in the config file as I can’t use it.
Then select command mode with ASCII 26, three times. It responds with >, ascii 62
To write to a file you send ‘append file.txt’ where the space is ASCII 32 and follow with carriage return, line feed (13,10) immediately. It falls out of command mode into data mode. Responds ascii 60
Then send the data sentence finishing each with CR and LF. No echo.
Every hour I select command mode and append another file. All works fine.