DV164132 Microchip Technology, DV164132 Datasheet - Page 27
![no-image](/images/manufacturer_photos/0/4/439/microchip_technology_sml.jpg)
DV164132
Manufacturer Part Number
DV164132
Description
KIT EVAL F1 FOR PIC12F1/PIC16F1
Manufacturer
Microchip Technology
Type
MCUr
Specifications of DV164132
Contents
Board, PIC kit 3
Silicon Manufacturer
Microchip
Core Architecture
PIC
Core Sub-architecture
PIC12, PIC16
Silicon Core Number
PIC12F, PIC16F
Silicon Family Name
PIC12F1xxx, PIC16F1xxx
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
For Use With/related Products
PIC16LF1937
Lead Free Status / RoHS Status
Lead free / RoHS Compliant, Lead free / RoHS Compliant
Available stocks
Company
Part Number
Manufacturer
Quantity
Price
Company:
Part Number:
DV164132
Manufacturer:
Microchip Technology
Quantity:
135
Company:
Part Number:
DV164132
Manufacturer:
MICROCHIP
Quantity:
12 000
5.9
© 2009 Microchip Technology Inc.
USING THE MCP9800 DRIVER
FIGURE 5-12:
5.8.1.2
The rtcc_handler function must be called frequently to keep the internal seconds
counter accurate.
FIGURE 5-13:
5.8.1.3
After system initialization, the seconds counter is cleared to ‘0’. The standard C
libraries equate 0 seconds to Midnight, Jan 1, 1970. That time has expired a long time
ago, so a new time in seconds can be configured with rtcc_set().
FIGURE 5-14:
5.8.1.4
The standard C libraries require the application to supply the time function. This
function returns the current time_t value or loads a supplied time_t value. The
interrupts are saved and restored to make this function safe for use with interrupt driven
code.
The MCP9800 is an I
interface to the features in the sensor.
#include <time.h>
Time_set() // set the time & date to 1 second after midnight, July 4, 2009
{
}
System_initialization()
{
}
System_interrupt_service_routine()
{
}
If(TMR1IF & TMR1IE)
{
}
rtcc_init();
struct tm time_str;
time_t unix_time;
time_str.tm_year = 2009; // the year
time_str.tm_mon = 7;
time_str.tm_mday = 4;
time_str.tm_hour = 0;
time_str.tm_min = 0;
time_str.tm_sec = 1;
time_str.tm_isdst = -1; // daylight savings time modifier
unix_time = mktime(&time_str);
rtcc_set(unix_time);
rtcc_handler
rtcc_set
time
TMR1IF = 0;
rtcc_handler();
2
C temperature sensor. The MCP9800 driver provides a simple
Hardware Libraries and Drivers
// the month
// the day of the month
// the hour (0-23)
// the minutes
// the seconds
DS41401A-page 27