Hello everyone,
is there a way to get a Time.h as in PIC16? It would greatly simplify my programs.
Tiny
Time.h for 8Bit PIC
Moderator: Benj
Re: Time.h for 8Bit PIC
Hi Tinytiny wrote:Hello everyone,
is there a way to get a Time.h as in PIC16? It would greatly simplify my programs.
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
- 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
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
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
Re: Time.h for 8Bit PIC
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 ?
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 ?
- 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
Thanks for the great help. In this forum you are really in good hands!
I have already implemented a RTC, but your Example also looks very much of promise! 'm just by working on.
Thank you again!
Tiny
I have already implemented a RTC, but your Example also looks very much of promise! 'm just by working on.
Thank you again!
Tiny