MA240029 Microchip Technology, MA240029 Datasheet - Page 276

no-image

MA240029

Manufacturer Part Number
MA240029
Description
Daughter Cards & OEM Boards PIC24FJ128GA310 Gen Purpose PIM
Manufacturer
Microchip Technology
Datasheet

Specifications of MA240029

Rohs
yes
Product
Daughter Cards
Core
PIC
Description/function
Plug-in module
Interface Type
I2C, SPI
Tool Is For Evaluation Of
PIC24FJ128GA310
For Use With
Explorer 16 Development Board

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
MA240029
Manufacturer:
MICROCHIP
Quantity:
12 000
PIC24FJ128GA310 FAMILY
22.2
The RTCC module registers are organized into three
categories:
• RTCC Control Registers
• RTCC Value Registers
• Alarm Value Registers
22.2.1
To limit the register interface, the RTCC Timer and
Alarm
corresponding 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
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 22-1:
The Alarm Value register window (ALRMVALH and
ALRMVALL)
(ALCFGRPT<9:8>) to select the desired Alarm register
pair (see
By writing the ALRMVALH byte, the Alarm Pointer
value, ALRMPTR<1:0> bits, decrement 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.
EXAMPLE 22-1:
DS39996F-page 276
RTCPTR<1:0>
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 _RCFGCAL1, #13”); //set the RTCWREN bit
asm volatile(“pop w8”);
asm volatile(“pop w7”);
00
01
10
11
Time
RTCC Module Registers
Table
REGISTER MAPPING
22-2).
registers
uses
RTCVAL<15:8>
RTCVAL REGISTER MAPPING
RTCC Value Register Window
WEEKDAY
MINUTES
MONTH
SETTING THE RTCWREN BIT
Table
the
are
22-1).
accessed
ALRMPTR
RTCVAL<7:0>
SECONDS
HOURS
YEAR
DAY
through
bits
TABLE 22-2:
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.
22.2.2
In order to perform a write to any of the RTCC Timer
registers, the RTCWREN bit (RCFGCAL1<13>) must
be set (see
22.2.3
The clock source for the RTCC module can be selected
using the RTCLK<1:0> bits in the RTCPWC register.
When the bits are set to ‘00’, the Secondary Oscillator
(SOSC) is used as the reference clock and when the bits
are ‘01’, LPRC is used as the reference clock. When
RTCLK<1:0> = 10 and 11, the external power line
(50 Hz and 60 Hz) is used as the clock source.
ALRMPTR
Note:
Note:
<1:0>
00
01
10
11
This only applies to read operations and
not write operations.
WRITE LOCK
Example
To avoid accidental writes to the timer, it is
recommended that the RTCWREN bit
(RCFGCAL1<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
SELECTING RTCC CLOCK SOURCE
ALRMVAL<15:8> ALRMVAL<7:0>
ALRMVAL REGISTER
MAPPING
 2010-2011 Microchip Technology Inc.
Alarm Value Register Window
ALRMMNTH
ALRMMIN
ALRMWD
22-1).
Example
ALRMSEC
ALRMDAY
ALRMHR
22-1.

Related parts for MA240029