# Vault 7: Projects

This publication series is about specific projects related to the Vault 7 main publication.

### Protego

# MPLAB XC16 C-Compiler

- 1
- 2
…
- 325
- 326
- 327
- 328
- 329
…
- 365
- 366

Built-in Functions
 2012-2013 Microchip Technology Inc. DS50002071C-page 327
__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.

- 1
- 2
…
- 325
- 326
- 327
- 328
- 329
…
- 365
- 366