Time.h for 8Bit PIC

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 6.

Moderator: Benj

Post Reply
User avatar
tiny
Posts: 200
Joined: Wed Jul 08, 2009 8:29 am
Has thanked: 51 times
Been thanked: 93 times
Contact:

Time.h for 8Bit PIC

Post by tiny »

Hello everyone,

is there a way to get a Time.h as in PIC16? It would greatly simplify my programs.

Tiny

Rudi
Posts: 666
Joined: Mon Feb 10, 2014 4:59 am
Has thanked: 493 times
Been thanked: 187 times

Re: Time.h for 8Bit PIC

Post by Rudi »

tiny wrote:Hello everyone,

is there a way to get a Time.h as in PIC16? It would greatly simplify my programs.

Tiny
Hi Tiny

if you mean

#include Time.h

Build -> Project Options -> "Checkbox Use supplementary Code" -> Button Supplementary Code
-> on Top Definitions and functions
-> on Bottom Function

perhabs this helps too:
http://www.matrixtsl.com/mmforums/viewt ... 058#p61265



btw: have you seen in your PM post :-
http://www.matrixtsl.com/mmforums/viewt ... 577#p62577
;-)

Best wishes!
Rudi
;-)

User avatar
tiny
Posts: 200
Joined: Wed Jul 08, 2009 8:29 am
Has thanked: 51 times
Been thanked: 93 times
Contact:

Re: Time.h for 8Bit PIC

Post by tiny »

Hi Rudi,

I have now just read the PM. Many Thanks for your suggestions and the Example file.
As a file.h is involved, I know, but from where I get such a Time.h? The file from the directory PIC16 interrupts when compiling with an error message.

But anyway, I'm going to now look at the Example1.fcfx!

Thank you again!

Tiny

Rudi
Posts: 666
Joined: Mon Feb 10, 2014 4:59 am
Has thanked: 493 times
Been thanked: 187 times

Re: Time.h for 8Bit PIC

Post by Rudi »

Hi Tiny,

have a look to this:

http://glibc.sourcearchive.com/document ... ce333.html

http://glibc.sourcearchive.com/document ... ource.html

and if you programm AVR too, perhabs you can build a personaly Time.h

This Thread from 2012 is given little Info and how own function can build

http://www.avrfreaks.net/index.php?name ... c&p=969296

Hope this helps ;-) and you can go on in this

Best wishes
Rudi
;-)

EDIT:
PIC:
http://www.ccsinfo.com/forum/viewtopic.php?p=19920

.................................

PIC microcontrollers have no inherent Real Time Clock in them,
unlike PC's. If want a RTC or elapsed time function, you'll have to
add a RTC chip, such as the DS1307.

!!..

If you just want to get the elapsed time since the PIC was powered up,
you could use a clock derived from the PIC's crystal frequency to
run one of the PIC's timers, and count elapsed seconds (or minutes, etc.).
Accuracy might not be perfect over a long period of time, because
microprocessor crystals have larger tolerances than RTC crystals.
(Though you could pay more, to get higher accuracy).
..!!



perhabs this a thrd option for you ? ;-)

User avatar
tiny
Posts: 200
Joined: Wed Jul 08, 2009 8:29 am
Has thanked: 51 times
Been thanked: 93 times
Contact:

Re: Time.h for 8Bit PIC

Post by tiny »

Thanks for the great help. In this forum you are really in good hands! :D
I have already implemented a RTC, but your Example also looks very much of promise! 'm just by working on.

Thank you again!
Tiny

Post Reply