Microchip Technology SW006022-2 데이터 시트

다운로드
페이지 338
Built-in Functions
 2012 Microchip Technology Inc.
DS52071B-page 303
__
builtin_write_RTCWEN
Description:
Used to write to the RTCC Timer by implementing the unlock sequence by writing the cor-
rect unlock values to NVMKEY and then setting the RTCWREN bit of RCFGCAL SFR.
Interrupts may need to be disable for proper operation.
This builtin function can be used as a part of a complex sequence discussed in the data 
sheet or family reference manual. 
See this documentation for more information.
Prototype:
void 
__builtin_write_RTCWEN(void);
Argument:
None.
Return Value:
None.
Assembler Operator/ 
Machine Instruction:
mov #0x55, Wn
mov Wn, _NVMKEY
mov #0xAA, Wn
mov Wn, _NVMKEY
bset _RCFGCAL, #13
nop
nop
Error Messages
None.
__
builtin_write_OSCCONL
Description:
Unlocks and writes its argument to OSCCONL.
Interrupts may need to be disable for proper operation.
This builtin function can be used as a part of a complex sequence discussed in the data 
sheet or family reference manual. 
See this documentation for more information.
Prototype:
void 
__builtin_write_OSCCONL(unsigned char value);
Argument:
value
character to be written
Return Value:
None.
Assembler Operator/ 
Machine Instruction*:
mov #0x46, w0
mov #0x57, w1
mov 
#_
OSCCON, w2
mov.b w0, [w2]
mov.b w1, [w2]
mov.b value, [w2]
Error Messages
None.
* The exact sequence may be different.