pic32mx320f064h Microchip Technology Inc., pic32mx320f064h Datasheet - Page 414

no-image

pic32mx320f064h

Manufacturer Part Number
pic32mx320f064h
Description
64/100-pin General Purpose, 32-bit Flash Microcontrollers
Manufacturer
Microchip Technology Inc.
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
pic32mx320f064h-40I/PT
Manufacturer:
Microchip Technology
Quantity:
10 000
Part Number:
pic32mx320f064h-40I/PT
Manufacturer:
MICROCHIP/微芯
Quantity:
20 000
Part Number:
pic32mx320f064h-40V/PT
Manufacturer:
Microchip Technology
Quantity:
10 000
Part Number:
pic32mx320f064h-80I/PT
Manufacturer:
Microchip Technology
Quantity:
10 000
Part Number:
pic32mx320f064h-80V/PT
Manufacturer:
Microchip Technology
Quantity:
10 000
Part Number:
pic32mx320f064hT-40I/PT
Manufacturer:
Microchip Technology
Quantity:
10 000
ALRMEN bit is cleared automatically and the alarm will
PIC32MX FAMILY
EXAMPLE 21-4:
21.3.3
A repeat alarm can be generated by configuring the
Alarm Repeat Counter bits, ARPT (RTCALRM<7:0>)
= 0x00 to 0xFF (0 to 255), and the CHIME bit
(RTCALRM<14>) = 0. Once the the alarm is enabled
and an alarm event occurs, the ARPT count is decre-
mented by one. Once the register reaches 0, the alarm
will be generated one last time; after which point,
turn off. The user must re-enable this bit for any new
alarm configuration.
EXAMPLE 21-5:
DS61143A-page 412
/*
*/
/*
*/
Note:
The following code example will update the RTCC one-time alarm.
Assumes the interrupts are disabled.
unsigned long alTime=0x16153300;// set time to 04 hr, 15 min, 33 sec
unsigned long alDate=0x06102705;// set date to Friday 27 Oct 2006
while(RTCALRM&0x1000);
RTCALRMCLR=0xCFFF;
ALRMTIME=alTime;
ALRMDATE=alDate;
RTCALRMSET=0x8000|0x00000600;
The following code example will update the RTCC repeat alarm.
Assumes the interrupts are disabled.
unsigned long alTime=0x23352300;
unsigned long alDate=0x06111301;
while(RTCALRM&0x1000);
RTCALRMCLR=0xCFFF;
ALRMTIME=alTime;
ALRMDATE=alDate;
RTCALRMSET=0x8000|0x0509;
REPEAT ALARM
An alarm event is generated when ARPT
bits are = 0x00.
CONFIGURING THE RTCC FOR A ONE-TIME ALARM
CONFIGURING THE RTCC FOR A TEN TIMES PER HOUR ALARM
// turn off the alarm, chime and alarm repeats; clear
// the alarm mask
// wait ALRMSYNC to be off
// clear ALRMEN, CHIME, AMASK and ARPT;
// update the alarm time and date
// re-enable the alarm, set alarm mask at once per day
Advance Information
// set time to 23hr, 35 min, 23 sec
// set date to Monday 13 Nov 2006
// turn off the alarm, chime and alarm repeats; clear
// the alarm mask
// wait ALRMSYNC to be off
// clear the ALRMEN, CHIME, AMASK and ARPT;
// update the alarm time and date
// re-enable the alarm, set alarm mask at once per hour
// for 10 times repeat
It is recommended to read and verify the Alarm Sync bit
ALRMSYNC (RTCALRM<12>) = 0, before performing
the following configuration steps:
• Disable alarm – ALRMEN (RTCALRM<15>) = 0.
• Disable chime – CHIME (RTCALRM<14>) = 0.
• Configure alarm repeat counter – ARPT
• Configure alarm date and time – Load
• Configure mask – Load the desired AMASK
• Enable alarm – ALRMEN (RTCALRM<15>) = 0.
Refer to Example 21-5.
(RTCALRM<7:0>) = 0x00 to 0xFF.
ALRMDATE and ALRMTIME registers with the
desired alarm date/time values.
value.
© 2007 Microchip Technology Inc.

Related parts for pic32mx320f064h