Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
даташитина PIC 12F683 .pdf
Скачиваний:
15
Добавлен:
02.02.2015
Размер:
3.06 Mб
Скачать

PIC12F683

12.0SPECIAL FEATURES OF THE CPU

The PIC12F683 has a host of features intended to maximize system reliability, minimize cost through elimination of external components, provide power saving features and offer code protection.

These features are:

Reset

-Power-on Reset (POR)

-Power-up Timer (PWRT)

-Oscillator Start-up Timer (OST)

-Brown-out Reset (BOR)

Interrupts

Watchdog Timer (WDT)

Oscillator Selection

Sleep

Code Protection

ID Locations

In-Circuit Serial Programming™

The PIC12F683 has two timers that offer necessary delays on power-up. One is the Oscillator Start-up Timer (OST), intended to keep the chip in Reset until the crystal oscillator is stable. The other is the Power-up Timer (PWRT), which provides a fixed delay of 64 ms (nominal) on power-up only, designed to keep the part in Reset while the power supply stabilizes. There is also circuitry to reset the device if a brown-out occurs, which can use the Power-up Timer to provide at least a 64 ms Reset. With these three functions on-chip, most applications need no external Reset circuitry.

The Sleep mode is designed to offer a very low-current Power-down mode. The user can wake-up from Sleep through:

External Reset

Watchdog Timer Wake-up

An interrupt

Several oscillator options are also made available to allow the part to fit the application. The INTOSC option saves system cost while the LP crystal option saves power. A set of Configuration bits are used to select various options (see Register 12-1).

Note: Address 2007h is beyond the user program memory space. It belongs to the special configuration memory space (2000h-3FFFh), which can be accessed only during programming. See “PIC12F6XX/16F6XX Memory Programming Specification” (DS41204) for more information.

12.1Configuration Bits

The Configuration bits can be programmed (read as ‘0’), or left unprogrammed (read as ‘1’) to select various device configurations as shown in Register 12-1. These bits are mapped in program memory location 2007h.

2007 Microchip Technology Inc.

DS41211D-page 83

PIC12F683

REGISTER 12-1: CONFIG: CONFIGURATION WORD REGISTER

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

FCMEN

 

IESO

 

BOREN1

 

BOREN0

bit 15

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

bit 8

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

CPD

 

 

 

 

 

 

CP

 

 

 

 

MCLRE

 

PWRTE

 

 

 

WDTE

 

FOSC2

 

FOSC1

 

FOSC0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

bit 7

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

bit 0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Legend:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

R = Readable bit

 

 

 

 

 

 

 

 

W = Writable bit

 

 

 

 

P = Programmable’

 

 

U = Unimplemented bit, read as ‘0’

-n = Value at POR

 

 

 

 

 

 

 

 

‘1’ = Bit is set

 

 

 

 

‘0’ = Bit is cleared

 

 

x = Bit is unknown

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

bit 15-12

 

 

Unimplemented: Read as ‘1

 

 

 

 

 

 

 

 

 

 

 

 

bit 11

 

 

FCMEN: Fail-Safe Clock Monitor Enabled bit

 

 

 

 

 

 

 

 

 

 

1

= Fail-Safe Clock Monitor is enabled

 

 

 

 

 

 

 

 

 

 

0

= Fail-Safe Clock Monitor is disabled

 

 

 

 

 

 

 

 

bit 10

 

 

IESO: Internal External Switchover bit

 

 

 

 

 

 

 

 

 

 

1

= Internal External Switchover mode is enabled

 

 

 

 

 

 

 

0

= Internal External Switchover mode is disabled

 

 

 

 

 

bit 9-8

 

 

BOREN<1:0>: Brown-out Reset Selection bits(1)

 

 

 

 

 

 

 

 

 

 

 

 

11 = BOR enabled

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

10 = BOR enabled during operation and disabled in Sleep

 

 

 

 

 

 

 

 

 

01 = BOR controlled by SBOREN bit of the PCON register

 

 

 

 

 

 

 

 

 

00 = BOR disabled

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Data Code Protection bit(2)

 

 

 

 

 

 

 

 

 

 

 

 

bit 7

 

 

CPD:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

1

= Data memory code protection is disabled

 

 

 

 

 

 

 

 

 

 

0

= Data memory code protection is enabled

 

 

 

 

 

 

 

 

 

 

 

 

Code Protection bit(3)

 

 

 

 

 

 

 

 

 

 

 

 

bit 6

 

 

CP:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

1

= Program memory code protection is disabled

 

 

 

 

 

 

 

 

 

 

0

= Program memory code protection is enabled

 

 

 

 

 

 

 

 

bit 5

 

 

MCLRE: GP3/

 

 

pin function select bit(4)

 

 

 

 

 

 

 

 

 

 

MCLR

 

 

 

 

 

 

 

 

 

 

1

= GP3/MCLR pin function is MCLR

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

pin function is digital input,

 

 

internally tied to VDD

 

 

 

 

 

0

= GP3/MCLR

MCLR

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

bit 4

 

 

PWRTE: Power-up Timer Enable bit

 

 

 

 

 

 

 

 

 

 

1

= PWRT disabled

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

0

= PWRT enabled

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

bit 3

 

 

WDTE: Watchdog Timer Enable bit

 

 

 

 

 

 

 

 

 

 

 

 

 

 

1

= WDT enabled

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

0

= WDT disabled and can be enabled by SWDTEN bit of the WDTCON register

 

 

 

bit 2-0

 

 

FOSC<2:0>: Oscillator Selection bits

 

 

 

 

 

 

 

 

 

 

 

 

111 = RC oscillator: CLKOUT function on GP4/OSC2/CLKOUT pin, RC on GP5/OSC1/CLKIN

 

 

 

 

 

110 = RCIO oscillator: I/O function on GP4/OSC2/CLKOUT pin, RC on GP5/OSC1/CLKIN

 

 

 

 

 

101 = INTOSC oscillator: CLKOUT function on GP4/OSC2/CLKOUT pin, I/O function on GP5/OSC1/CLKIN

 

 

 

 

100 = INTOSCIO oscillator: I/O function on GP4/OSC2/CLKOUT pin, I/O function on GP5/OSC1/CLKIN

 

 

 

 

011 = EC: I/O function on GP4/OSC2/CLKOUT pin, CLKIN on GP5/OSC1/CLKIN

 

 

 

 

 

010 = HS oscillator: High-speed crystal/resonator on GP4/OSC2/CLKOUT and GP5/OSC1/CLKIN

 

 

 

 

 

001 = XT oscillator: Crystal/resonator on GP4/OSC2/CLKOUT and GP5/OSC1/CLKIN

 

 

 

 

 

000 = LP oscillator: Low-power crystal on GP4/OSC2/CLKOUT and GP5/OSC1/CLKIN

 

Note 1:

Enabling Brown-out Reset does not automatically enable Power-up Timer.

 

 

 

2:The entire data EEPROM will be erased when the code protection is turned off.

3:The entire program memory will be erased when the code protection is turned off.

4:When MCLR is asserted in INTOSC or RC mode, the internal clock oscillator is disabled.

DS41211D-page 84

2007 Microchip Technology Inc.