Electronic Components Datasheet Search
  English  ▼
ALLDATASHEET.NET

X  

PIC24F32KA302-I/ML Datasheet(PDF) 186 Page - Microchip Technology

Part # PIC24F32KA302-I/ML
Description  20/28/44/48-Pin, General Purpose, 16-Bit Flash Microcontrollers with XLP Technology
PDF  364 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Manufacturer  MICROCHIP [Microchip Technology]
Direct Link  http://www.microchip.com
Logo MICROCHIP - Microchip Technology

PIC24F32KA302-I/ML Datasheet(HTML) 186 Page - Microchip Technology

Back Button PIC24F32KA302-I/ML Datasheet HTML 182Page - Microchip Technology PIC24F32KA302-I/ML Datasheet HTML 183Page - Microchip Technology PIC24F32KA302-I/ML Datasheet HTML 184Page - Microchip Technology PIC24F32KA302-I/ML Datasheet HTML 185Page - Microchip Technology PIC24F32KA302-I/ML Datasheet HTML 186Page - Microchip Technology PIC24F32KA302-I/ML Datasheet HTML 187Page - Microchip Technology PIC24F32KA302-I/ML Datasheet HTML 188Page - Microchip Technology PIC24F32KA302-I/ML Datasheet HTML 189Page - Microchip Technology PIC24F32KA302-I/ML Datasheet HTML 190Page - Microchip Technology Next Button
Zoom Inzoom in Zoom Outzoom out
 186 / 364 page
background image
PIC24FV32KA304 FAMILY
DS39995D-page 186
 2011-2013 Microchip Technology Inc.
19.2
RTCC Module Registers
The RTCC module registers are organized into three
categories:
• RTCC Control Registers
• RTCC Value Registers
• Alarm Value Registers
19.2.1
REGISTER MAPPING
To limit the register interface, the RTCC Timer and
Alarm Time registers are accessed through corre-
sponding register pointers. The RTCC Value Register
Window (RTCVALH and RTCVALL) uses the RTCPTR
bits (RCFGCAL<9:8>) to select the desired Timer
register pair (see Table 19-1).
By writing the RTCVALH byte, the RTCC Pointer value,
the RTCPTR<1:0> bits decrement by one until they
reach ‘00’. Once they reach ‘00’, the MINUTES and
SECONDS value will be accessible through RTCVALH
and RTCVALL until the pointer value is manually
changed.
TABLE 19-1:
RTCVAL REGISTER MAPPING
The Alarm Value Register Window (ALRMVALH
and
ALRMVALL)
uses
the
ALRMPTRx
bits
(ALCFGRPT<9:8>) to select the desired Alarm
register pair (see Table 19-2).
By writing the ALRMVALH byte, the Alarm Pointer
value (ALRMPTR<1:0> bits) decrements by one until
they reach ‘00’. Once they reach ‘00’, the ALRMMIN
and ALRMSEC value will be accessible through
ALRMVALH and ALRMVALL, until the pointer value is
manually changed.
TABLE 19-2:
ALRMVAL REGISTER
MAPPING
Considering that the 16-bit core does not distinguish
between 8-bit and 16-bit read operations, the user must
be aware that when reading either the ALRMVALH or
ALRMVALL bytes, the ALRMPTR<1:0> value will be
decremented. The same applies to the RTCVALH or
RTCVALL bytes with the RTCPTR<1:0> being
decremented.
19.2.2
WRITE LOCK
In order to perform a write to any of the RTCC Timer
registers, the RTCWREN bit (RTCPWC<13>) must be
set (see Example 19-1).
19.2.3
SELECTING RTCC CLOCK SOURCE
There are four reference source clock options that can
be selected for the RTCC using the RTCCSEL<1:0>
bits: 00 = Secondary Oscillator, 01 = LPRC, 10 = 50 Hz
External Clock and 11 = 60 Hz External Clock.
EXAMPLE 19-1:
SETTING THE RTCWREN BIT
RTCPTR<1:0>
RTCC Value Register Window
RTCVAL<15:8>
RTCVAL<7:0>
00
MINUTES
SECONDS
01
WEEKDAY
HOURS
10
MONTH
DAY
11
—
YEAR
ALRMPTR
<1:0>
Alarm Value Register Window
ALRMVAL<15:8> ALRMVAL<7:0>
00
ALRMMIN
ALRMSEC
01
ALRMWD
ALRMHR
10
ALRMMNTH
ALRMDAY
11
PWCSTAB
PWCSAMP
Note:
This only applies to read operations and
not write operations.
Note:
To avoid accidental writes to the timer, it is
recommended that the RTCWREN bit
(RCFGCAL<13>) is kept clear at any
other time. For the RTCWREN bit to be
set, there is only one instruction cycle time
window allowed between the 55h/AA
sequence and the setting of RTCWREN.
Therefore, it is recommended that code
follow the procedure in Example 19-1.
asm
volatile
(“push w7”);
asm
volatile
(“push w8”);
asm
volatile
(“disi #5”);
asm
volatile
(“mov #0x55, w7”);
asm
volatile
(“mov w7, _NVMKEY”);
asm
volatile
(“mov #0xAA, w8”);
asm
volatile
(“mov w8, _NVMKEY”);
asm
volatile
(“bset _RCFGCAL, #13”);
//set the RTCWREN bit
asm
volatile
(“pop w8”);
asm
volatile
(“pop w7”);



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100  ...More


Datasheet Download

Go To PDF Page


Link URL



Does ALLDATASHEET help your business so far?  [ DONATE ] 

About Alldatasheet   |   Advertisement   |   Contact us   |   Privacy Policy   |   Link to Datasheet    |   Link Exchange   |   Manufacturer List
All Rights Reserved©Alldatasheet.com


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
Russian : Alldatasheetru.com  |   Korean : Alldatasheet.co.kr  |   Spanish : Alldatasheet.es  |   French : Alldatasheet.fr  |   Italian : Alldatasheetit.com
Portuguese : Alldatasheetpt.com  |   Polish : Alldatasheet.pl  |   Vietnamese : Alldatasheet.vn
Indian : Alldatasheet.in  |   Mexican : Alldatasheet.com.mx  |   British : Alldatasheet.co.uk  |   New Zealand : Alldatasheet.co.nz
Family Site : ic2ic.com  |   icmetro.com