This is very cool! I went to the microchip site to use their parametric search to see which 8 bit pics have the RTCC, but that is not one of their searchable items, that I can find anyway. How can you find which pics have this capability?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The problem with the Microchip RTC is the lack of a Battery pin to keep the Internal RTC alive on power loss. It is not much more than a Clock Xtal on the Timer 1 Input, but it sounds good in marketing litrature to call it an onboard RTC :)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The RTCC included with the PIC16F191xx series of chips is a "real" RTCC module
and is much more than a crystal on timer1.
Features:
• Time: Hours, Minutes and Seconds
• 24-hour Format (Military Time)
• Calendar: Weekday, Date, Month and Year
• Year Range: 2000 to 2099
• Leap Year Correction
• Configurable Alarm
• BCD Format for Compact Firmware
• Half-second Synchronization and Visibility
• User Calibration with Auto-Adjust
• Multiple Clock Sources
• Low-Power Optimization
• Battery Support (V_Bat Pin)
Yep - the library is very comprehensive covers all the functionality includingng the alarm and the interrupt. I did check the library will support the 18f RTCC also but I cannot test.
Features:
• Time: Hours, Minutes and Seconds
• 24-hour Format (Military Time)
• Calendar: Weekday, Date, Month and Year
• Year Range: 2000 to 2099
• Leap Year Correction
• Configurable Alarm
• BCD Format for Compact Firmware
• Half-second Synchronization and Visibility
• User Calibration with Auto-Adjust
• Multiple Clock Sources
• Low-Power Optimization
• Battery Support (V_Bat Pin)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The problem with the Microchip RTC is the lack of a Battery pin to keep the Internal RTC alive on power loss. It is not much more than a Clock Xtal on the Timer 1 Input, but it sounds good in marketing litrature to call it an onboard RTC :)
Not the case.
From the datasheet:
24.3 VBAT Operation
This device is equipped with a VBAT pin that allows the
user to connect an external battery or Supercap. In the
event of the VDD supply failing or dropping below the
supply voltage level on the VBAT pin, the power source
connected to the VBAT pin will keep the SOSC and
RTCC blocks running. VBAT is enabled via the VBATEN
bit in Configuration Word 1.
This works a treat.
Last edit: Anobium 2017-12-15
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I must take a look and get an order in for samples.
I requested that feature at Last year's conference and they said no, not available and not planned.
So either the engineers were told to keep mum, or as usual the right hand doesn't know what the left is doing .
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Added Real-Time Clock/Calendar (RTCC) library for Microchip PIC microcontroller to Great Cow BASIC.
The library has the same capabilities as the other RTCC libraries but this support the Microchip PIC Internal RTCC.
Methods
The Public methods are shown below:
The library will be in future releases but is available if needed before the next release - just ask.
Demos
If you search GITHUB for RTCC you will find the demonstrations for the 16F19156
https://github.com/Anobium/Great-Cow-BASIC-Demonstration-Sources/find/master
Thanks
My thanks go to William as he helped me crack the initilisation process.
Enjoy
This is very cool! I went to the microchip site to use their parametric search to see which 8 bit pics have the RTCC, but that is not one of their searchable items, that I can find anyway. How can you find which pics have this capability?
It is in the parametric search, At the top ritght click on "Show All Specs" then it will show up.
The problem with the Microchip RTC is the lack of a Battery pin to keep the Internal RTC alive on power loss. It is not much more than a Clock Xtal on the Timer 1 Input, but it sounds good in marketing litrature to call it an onboard RTC :)
The RTCC included with the PIC16F191xx series of chips is a "real" RTCC module
and is much more than a crystal on timer1.
Features:
• Time: Hours, Minutes and Seconds
• 24-hour Format (Military Time)
• Calendar: Weekday, Date, Month and Year
• Year Range: 2000 to 2099
• Leap Year Correction
• Configurable Alarm
• BCD Format for Compact Firmware
• Half-second Synchronization and Visibility
• User Calibration with Auto-Adjust
• Multiple Clock Sources
• Low-Power Optimization
• Battery Support (V_Bat Pin)
Have a look at the Datasheet (Section 24)
PIC16F191xx Datasheet
Yep - the library is very comprehensive covers all the functionality includingng the alarm and the interrupt. I did check the library will support the 18f RTCC also but I cannot test.
Not the case.
From the datasheet:
24.3 VBAT Operation
This device is equipped with a VBAT pin that allows the
user to connect an external battery or Supercap. In the
event of the VDD supply failing or dropping below the
supply voltage level on the VBAT pin, the power source
connected to the VBAT pin will keep the SOSC and
RTCC blocks running. VBAT is enabled via the VBATEN
bit in Configuration Word 1.
This works a treat.
Last edit: Anobium 2017-12-15
Wow, this is really great now with the VBAT. Eliminates the DS321 on some future projects... Nice job there Evan and William!
Never get too exicited! The library may need tweaking!
Thanks Bill and Anobium,
I must take a look and get an order in for samples.
I requested that feature at Last year's conference and they said no, not available and not planned.
So either the engineers were told to keep mum, or as usual the right hand doesn't know what the left is doing .