Hi, I am in the process of upgrading the event counter that I built using flowcode, I need a date stamp for the events which can
be shown as a graph using the terminal emulator on a pc. I am using PIC18F13K50 (usb enabled). Please help with ideas.
Thanks in anticipation
Indana
Data logging
Moderator: Benj
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Data logging
Hello,
You could use something similar to the FAT date stamp.
You could use something similar to the FAT date stamp.
Date Format. A FAT directory entry date stamp is a 16-bit field that is basically a date relative to the MS-DOS epoch of 01/01/1980. Here is the format (bit 0 is the LSB of the 16-bit word, bit 15 is the MSB of the 16-bit word):
Bits 0?4: Day of month, valid value range 1-31 inclusive.
Bits 5?8: Month of year, 1 = January, valid value range 1?12 inclusive.
Bits 9?15: Count of years from 1980, valid value range 0?127 inclusive (1980?2107).
Time Format. A FAT directory entry time stamp is a 16-bit field that has a granularity of 2 seconds. Here is the format (bit 0 is the LSB of the 16-bit word, bit 15 is the MSB of the 16-bit word).
Bits 0?4: 2-second count, valid value range 0?29 inclusive (0 ? 58 seconds).
Bits 5?10: Minutes, valid value range 0?59 inclusive.
Bits 11?15: Hours, valid value range 0?23 inclusive.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel