16F676 Support Information

XC8-CC #pragma config Usage

#pragma config <setting>=<named value>
For example:
// Oscillator Selection bits : RC oscillator: CLKOUT function on RA4/OSC2/CLKOUT pin, RC on RA5/OSC1/CLKIN
// Watchdog Timer Enable bit : WDT enabled
// Power-up Timer Enable bit : PWRT disabled
// RA3/MCLR pin function select : RA3/MCLR pin function is MCLR
// Brown-out Detect Enable bit : BOD enabled
// Code Protection bit : Program Memory code protection is disabled
// Data Code Protection bit : Data memory code protection is disabled
#pragma config FOSC = EXTRCCLK, WDTE = ON, PWRTE = OFF, MCLRE = ON, BOREN = ON, CP = OFF, CPD = OFF
#pragma config <setting>=<literal constant>
For example:
// Oscillator Selection bits : RC oscillator: CLKOUT function on RA4/OSC2/CLKOUT pin, RC on RA5/OSC1/CLKIN
// Watchdog Timer Enable bit : WDT enabled
// Power-up Timer Enable bit : PWRT disabled
// RA3/MCLR pin function select : RA3/MCLR pin function is MCLR
// Brown-out Detect Enable bit : BOD enabled
// Code Protection bit : Program Memory code protection is disabled
// Data Code Protection bit : Data memory code protection is disabled
#pragma config FOSC = 0x7, WDTE = 0x1, PWRTE = 0x1, MCLRE = 0x1, BOREN = 0x1, CP = 0x1, CPD = 0x1
#pragma config <register>=<literal constant>
For example:
// Oscillator Selection bits : RC oscillator: CLKOUT function on RA4/OSC2/CLKOUT pin, RC on RA5/OSC1/CLKIN
// Watchdog Timer Enable bit : WDT enabled
// Power-up Timer Enable bit : PWRT disabled
// RA3/MCLR pin function select : RA3/MCLR pin function is MCLR
// Brown-out Detect Enable bit : BOD enabled
// Code Protection bit : Program Memory code protection is disabled
// Data Code Protection bit : Data memory code protection is disabled
#pragma config CONFIG = 0x3FFF
For example:
// IDLOC @ 0x2000
#pragma config IDLOC0 = 0x127

PIC-AS config Usage

config "<setting>"="<named value>"
For example:
; Oscillator Selection bits : RC oscillator: CLKOUT function on RA4/OSC2/CLKOUT pin, RC on RA5/OSC1/CLKIN
; Watchdog Timer Enable bit : WDT enabled
; Power-up Timer Enable bit : PWRT disabled
; RA3/MCLR pin function select : RA3/MCLR pin function is MCLR
; Brown-out Detect Enable bit : BOD enabled
; Code Protection bit : Program Memory code protection is disabled
; Data Code Protection bit : Data memory code protection is disabled
config "FOSC" = "EXTRCCLK", "WDTE" = "ON", "PWRTE" = "OFF", "MCLRE" = "ON", "BOREN" = "ON", "CP" = "OFF", "CPD" = "OFF"
config "<setting>"=<literal constant>
For example:
; Oscillator Selection bits : RC oscillator: CLKOUT function on RA4/OSC2/CLKOUT pin, RC on RA5/OSC1/CLKIN
; Watchdog Timer Enable bit : WDT enabled
; Power-up Timer Enable bit : PWRT disabled
; RA3/MCLR pin function select : RA3/MCLR pin function is MCLR
; Brown-out Detect Enable bit : BOD enabled
; Code Protection bit : Program Memory code protection is disabled
; Data Code Protection bit : Data memory code protection is disabled
config "FOSC" = 0x7, "WDTE" = 0x1, "PWRTE" = 0x1, "MCLRE" = 0x1, "BOREN" = 0x1, "CP" = 0x1, "CPD" = 0x1
config "<register>"=<literal constant>
For example:
; Oscillator Selection bits : RC oscillator: CLKOUT function on RA4/OSC2/CLKOUT pin, RC on RA5/OSC1/CLKIN
; Watchdog Timer Enable bit : WDT enabled
; Power-up Timer Enable bit : PWRT disabled
; RA3/MCLR pin function select : RA3/MCLR pin function is MCLR
; Brown-out Detect Enable bit : BOD enabled
; Code Protection bit : Program Memory code protection is disabled
; Data Code Protection bit : Data memory code protection is disabled
config "CONFIG" = 0x3FFF
For example:
; IDLOC @ 0x2000
config "IDLOC0" = 0x127

Configuration Registers & Settings

Register: CONFIG @ 0x2007
FOSC Oscillator Selection bits
EXTRCCLK RC oscillator: CLKOUT function on RA4/OSC2/CLKOUT pin, RC on RA5/OSC1/CLKIN
EXTRCIO RC oscillator: I/O function on RA4/OSC2/CLKOUT pin, RC on RA5/OSC1/CLKIN
INTRCCLK INTOSC oscillator: CLKOUT function on RA4/OSC2/CLKOUT pin, I/O function on RA5/OSC1/CLKIN
INTRCIO INTOSC oscillator: I/O function on RA4/OSC2/CLKOUT pin, I/O function on RA5/OSC1/CLKIN
EC EC: I/O function on RA4/OSC2/CLKOUT pin, CLKIN on RA5/OSC1/CLKIN
HS HS oscillator: High speed crystal/resonator on RA4/OSC2/CLKOUT and RA5/OSC1/CLKIN
XT XT oscillator: Crystal/resonator on RA4/OSC2/CLKOUT and RA5/OSC1/CLKIN
LP LP oscillator: Low power crystal on RA4/OSC2/CLKOUT and RA5/OSC1/CLKIN
WDTE Watchdog Timer Enable bit
ON WDT enabled
OFF WDT disabled
PWRTE Power-up Timer Enable bit
OFF PWRT disabled
ON PWRT enabled
MCLRE RA3/MCLR pin function select
ON RA3/MCLR pin function is MCLR
OFF RA3/MCLR pin function is digital I/O, MCLR internally tied to VDD
BOREN Brown-out Detect Enable bit
ON BOD enabled
OFF BOD disabled
CP Code Protection bit
OFF Program Memory code protection is disabled
ON Program Memory code protection is enabled
CPD Data Code Protection bit
OFF Data memory code protection is disabled
ON Data memory code protection is enabled
Register: IDLOC0 @ 0x2000
Register: IDLOC1 @ 0x2001
Register: IDLOC2 @ 0x2002
Register: IDLOC3 @ 0x2003