Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Скачиваний:
9
Добавлен:
21.12.2020
Размер:
8.16 Mб
Скачать

PIC18F8722 FAMILY

4.6Reset State of Registers

Most registers are unaffected by a Reset. Their status is unknown on POR and unchanged by all other Resets. All other registers are forced to a “Reset state” depending on the type of Reset that occurred.

Most registers are not affected by a WDT wake-up, since this is viewed as the resumption of normal oper- ation. Status bits from the RCON register, RI, TO, PD, POR and BOR, are set or cleared differently in different Reset situations, as indicated in Table 4-3. These bits are used in software to determine the nature of the Reset.

Table 4-4 describes the Reset states for all of the Special Function Registers. These are categorized by Power-on and Brown-out Resets, Master Clear and WDT Resets and WDT wake-ups.

TABLE 4-3:

STATUS BITS, THEIR SIGNIFICANCE AND THE INITIALIZATION CONDITION

 

 

 

 

FOR RCON REGISTER

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Condition

Program

 

RCON Register

 

 

 

 

 

STKPTR Register

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Counter

SBOREN

 

RI

 

 

TO

 

PD

 

POR

BOR

STKFUL

STKUNF

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Power-on Reset

 

0000h

1

1

 

1

 

 

1

 

 

0

 

0

 

0

0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

RESET Instruction

0000h

u(2)

0

 

 

u

 

u

 

u

 

 

u

u

u

 

Brown-out Reset

 

0000h

u(2)

1

 

1

 

 

1

 

 

u

 

0

 

u

u

 

 

 

during Power-Managed

0000h

u(2)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

MCLR

 

 

u

 

1

 

 

u

 

u

 

 

u

u

u

 

Run Modes

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

during Power-Managed

0000h

u(2)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

MCLR

 

u

 

1

 

 

0

 

 

u

 

 

u

u

u

 

Idle Modes and Sleep Mode

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

WDT Time-out during Full Power

0000h

u(2)

 

u

 

0

 

 

u

 

u

 

 

u

u

u

 

or Power-Managed Run Mode

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

during Full Power

0000h

u(2)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

MCLR

 

u

 

 

u

 

u

 

u

 

 

u

u

u

 

Execution

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Stack Full Reset (STVREN = 1)

0000h

u(2)

 

u

 

 

u

 

u

 

u

 

 

u

1

u

 

Stack Underflow Reset

0000h

u(2)

 

u

 

 

u

 

u

 

u

 

 

u

u

1

 

(STVREN = 1)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Stack Underflow Error (not an

0000h

u(2)

 

u

 

 

u

 

u

 

u

 

 

u

u

1

 

actual Reset, STVREN = 0)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

WDT Time-out during

PC + 2

u(2)

 

u

 

0

 

 

0

 

 

u

 

 

u

u

u

 

Power-Managed Idle or

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Sleep Modes

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Interrupt Exit from

PC + 2(1)

u(2)

 

u

 

 

u

 

0

 

 

u

 

 

u

u

u

 

Power-Managed Modes

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Legend: u = unchanged

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Note 1: When the wake-up is due to an interrupt and the GIEH or GIEL bits are set, the PC is loaded with the interrupt vector (008h or 0018h).

2:Reset state is ‘1’ for POR and unchanged for all other Resets when software BOR is enabled (BOREN1:BOREN0 configuration bits = 01 and SBOREN = 1). Otherwise, the Reset state is ‘0’.

DS39646B-page 56

Preliminary

2004 Microchip Technology Inc.

PIC18F8722 FAMILY

TABLE 4-4:

INITIALIZATION CONDITIONS FOR ALL REGISTERS

 

 

 

 

 

 

 

 

 

 

 

 

 

 

MCLR Resets,

 

Register

 

 

Applicable Devices

 

Power-on Reset,

 

WDT Reset,

Wake-up via WDT

 

 

 

Brown-out Reset

RESET Instruction,

or Interrupt

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Stack Resets

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

TOSU

 

 

6X27

 

6X22

8X27

 

8X22

---0 0000

---0 0000

---0 uuuu(3)

TOSH

 

 

6X27

 

6X22

8X27

 

8X22

0000

0000

0000

0000

uuuu uuuu(3)

TOSL

 

 

6X27

 

6X22

8X27

 

8X22

0000

0000

0000

0000

uuuu uuuu(3)

STKPTR

 

 

6X27

 

6X22

8X27

 

8X22

00-0 0000

 

uu-u uuuu

uu-u uuuu(3)

PCLATU

 

 

6X27

 

6X22

8X27

 

8X22

---0 0000

---0 0000

---u uuuu

 

 

 

 

 

 

 

 

 

 

 

 

 

 

PCLATH

 

 

6X27

 

6X22

8X27

 

8X22

0000

0000

0000

0000

uuuu uuuu

 

 

 

 

 

 

 

 

 

 

 

 

 

 

PCL

 

 

6X27

 

6X22

8X27

 

8X22

0000

0000

0000

0000

PC + 2(2)

TBLPTRU

 

 

6X27

 

6X22

8X27

 

8X22

--00 0000

--00 0000

--uu uuuu

 

 

 

 

 

 

 

 

 

 

 

 

 

 

TBLPTRH

 

 

6X27

 

6X22

8X27

 

8X22

0000

0000

0000

0000

uuuu uuuu

 

 

 

 

 

 

 

 

 

 

 

 

 

 

TBLPTRL

 

 

6X27

 

6X22

8X27

 

8X22

0000

0000

0000

0000

uuuu uuuu

 

 

 

 

 

 

 

 

 

 

 

 

 

 

TABLAT

 

 

6X27

 

6X22

8X27

 

8X22

0000

0000

0000

0000

uuuu uuuu

 

 

 

 

 

 

 

 

 

 

 

 

 

PRODH

 

 

6X27

 

6X22

8X27

 

8X22

xxxx xxxx

 

uuuu uuuu

uuuu uuuu

 

 

 

 

 

 

 

 

 

 

 

 

 

PRODL

 

 

6X27

 

6X22

8X27

 

8X22

xxxx xxxx

 

uuuu uuuu

uuuu uuuu

 

 

 

 

 

 

 

 

 

 

 

 

 

 

INTCON

 

 

6X27

 

6X22

8X27

 

8X22

0000

000x

0000

000u

uuuu uuuu(1)

INTCON2

 

 

6X27

 

6X22

8X27

 

8X22

1111

1111

1111

1111

uuuu uuuu(1)

INTCON3

 

 

6X27

 

6X22

8X27

 

8X22

1100

0000

1100

0000

uuuu uuuu(1)

INDF0

 

 

6X27

 

6X22

8X27

 

8X22

N/A

 

N/A

N/A

 

 

 

 

 

 

 

 

 

 

 

 

 

POSTINC0

 

 

6X27

 

6X22

8X27

 

8X22

N/A

 

N/A

N/A

 

 

 

 

 

 

 

 

 

 

 

 

 

POSTDEC0

 

 

6X27

 

6X22

8X27

 

8X22

N/A

 

N/A

N/A

 

 

 

 

 

 

 

 

 

 

 

 

 

PREINC0

 

 

6X27

 

6X22

8X27

 

8X22

N/A

 

N/A

N/A

 

 

 

 

 

 

 

 

 

 

 

 

 

PLUSW0

 

 

6X27

 

6X22

8X27

 

8X22

N/A

 

N/A

N/A

 

 

 

 

 

 

 

 

 

 

 

 

FSR0H

 

 

6X27

 

6X22

8X27

 

8X22

---- 0000

---- 0000

---- uuuu

 

 

 

 

 

 

 

 

 

 

 

 

 

FSR0L

 

 

6X27

 

6X22

8X27

 

8X22

xxxx xxxx

 

uuuu uuuu

uuuu uuuu

 

 

 

 

 

 

 

 

 

 

 

 

 

WREG

 

 

6X27

 

6X22

8X27

 

8X22

xxxx xxxx

 

uuuu uuuu

uuuu uuuu

 

 

 

 

 

 

 

 

 

 

 

 

 

INDF1

 

 

6X27

 

6X22

8X27

 

8X22

N/A

 

N/A

N/A

 

 

 

 

 

 

 

 

 

 

 

 

 

POSTINC1

 

 

6X27

 

6X22

8X27

 

8X22

N/A

 

N/A

N/A

 

 

 

 

 

 

 

 

 

 

 

 

 

POSTDEC1

 

 

6X27

 

6X22

8X27

 

8X22

N/A

 

N/A

N/A

 

 

 

 

 

 

 

 

 

 

 

 

 

PREINC1

 

 

6X27

 

6X22

8X27

 

8X22

N/A

 

N/A

N/A

 

 

 

 

 

 

 

 

 

 

 

 

 

PLUSW1

 

 

6X27

 

6X22

8X27

 

8X22

N/A

 

N/A

N/A

 

 

 

 

 

 

 

 

 

Legend:

u = unchanged, x = unknown, - = unimplemented bit, read as ‘0’, q = value depends on condition.

 

Shaded cells indicate conditions do not apply for the designated device.

 

 

Note 1:

One or more bits in the INTCONx or PIRx registers will be affected (to cause wake-up).

 

2:When the wake-up is due to an interrupt and the GIEL or GIEH bit is set, the PC is loaded with the interrupt vector (0008h or 0018h).

3:When the wake-up is due to an interrupt and the GIEL or GIEH bit is set, the TOSU, TOSH and TOSL are updated with the current value of the PC. The STKPTR is modified to point to the next location in the hardware stack.

4:See Table 4-3 for Reset value for specific condition.

5:Bits 6 and 7 of PORTA, LATA and TRISA are enabled, depending on the oscillator mode selected. When not enabled as PORTA pins, they are disabled and read ‘0’.

2004 Microchip Technology Inc.

Preliminary

DS39646B-page 57

PIC18F8722 FAMILY

TABLE 4-4:

INITIALIZATION CONDITIONS FOR ALL REGISTERS (CONTINUED)

 

 

 

 

 

 

 

 

 

 

 

 

 

MCLR Resets,

 

 

Register

 

 

Applicable Devices

 

Power-on Reset,

 

WDT Reset,

 

Wake-up via WDT

 

 

 

Brown-out Reset

RESET Instruction,

 

or Interrupt

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Stack Resets

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

FSR1H

 

 

6X27

 

6X22

8X27

 

8X22

---- 0000

---- 0000

 

---- uuuu

 

 

 

 

 

 

 

 

 

 

 

 

 

 

FSR1L

 

 

6X27

 

6X22

8X27

 

8X22

xxxx xxxx

 

uuuu uuuu

 

uuuu uuuu

 

 

 

 

 

 

 

 

 

 

 

 

 

BSR

 

 

6X27

 

6X22

8X27

 

8X22

---- 0000

---- 0000

 

---- uuuu

 

 

 

 

 

 

 

 

 

 

 

 

 

 

INDF2

 

 

6X27

 

6X22

8X27

 

8X22

N/A

 

N/A

 

N/A

 

 

 

 

 

 

 

 

 

 

 

 

 

 

POSTINC2

 

 

6X27

 

6X22

8X27

 

8X22

N/A

 

N/A

 

N/A

 

 

 

 

 

 

 

 

 

 

 

 

 

 

POSTDEC2

 

 

6X27

 

6X22

8X27

 

8X22

N/A

 

N/A

 

N/A

 

 

 

 

 

 

 

 

 

 

 

 

 

 

PREINC2

 

 

6X27

 

6X22

8X27

 

8X22

N/A

 

N/A

 

N/A

 

 

 

 

 

 

 

 

 

 

 

 

 

 

PLUSW2

 

 

6X27

 

6X22

8X27

 

8X22

N/A

 

N/A

 

N/A

 

 

 

 

 

 

 

 

 

 

 

 

 

FSR2H

 

 

6X27

 

6X22

8X27

 

8X22

---- 0000

---- 0000

 

---- uuuu

 

 

 

 

 

 

 

 

 

 

 

 

 

 

FSR2L

 

 

6X27

 

6X22

8X27

 

8X22

xxxx xxxx

 

uuuu uuuu

 

uuuu uuuu

 

 

 

 

 

 

 

 

 

 

 

 

 

 

STATUS

 

 

6X27

 

6X22

8X27

 

8X22

---x xxxx

 

---u uuuu

 

---u uuuu

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

TMR0H

 

 

6X27

 

6X22

8X27

 

8X22

0000

0000

0000

0000

 

uuuu uuuu

 

 

 

 

 

 

 

 

 

 

 

 

 

 

TMR0L

 

 

6X27

 

6X22

8X27

 

8X22

xxxx xxxx

 

uuuu uuuu

 

uuuu uuuu

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

T0CON

 

 

6X27

 

6X22

8X27

 

8X22

1111

1111

1111

1111

 

uuuu uuuu

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

OSCCON

 

 

6X27

 

6X22

8X27

 

8X22

0100

q000

0100

q000

 

uuuu uuqu

 

 

 

 

 

 

 

 

 

 

 

 

 

HLVDCON

 

 

6X27

 

6X22

8X27

 

8X22

0-00 0101

0-00 0101

 

u-uu uuuu

 

 

 

 

 

 

 

 

 

 

 

 

 

WDTCON

 

 

6X27

 

6X22

8X27

 

8X22

---- ---0

---- ---0

 

---- ---u

 

 

 

 

 

 

 

 

 

 

 

 

 

 

RCON(4)

 

 

6X27

 

6X22

8X27

 

8X22

0q-1 11q0

 

0q-q qquu

 

uq-u qquu

TMR1H

 

 

6X27

 

6X22

8X27

 

8X22

xxxx xxxx

 

uuuu uuuu

 

uuuu uuuu

 

 

 

 

 

 

 

 

 

 

 

 

 

 

TMR1L

 

 

6X27

 

6X22

8X27

 

8X22

xxxx xxxx

 

uuuu uuuu

 

uuuu uuuu

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

T1CON

 

 

6X27

 

6X22

8X27

 

8X22

0000

0000

 

u0uu uuuu

 

uuuu uuuu

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

TMR2

 

 

6X27

 

6X22

8X27

 

8X22

0000

0000

0000

0000

 

uuuu uuuu

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

PR2

 

 

6X27

 

6X22

8X27

 

8X22

1111

1111

 

uuuu uuuu

 

uuuu uuuu

 

 

 

 

 

 

 

 

 

 

 

 

 

T2CON

 

 

6X27

 

6X22

8X27

 

8X22

-000 0000

-000 0000

 

-uuu uuuu

 

 

 

 

 

 

 

 

 

 

 

 

 

 

SSP1BUF

 

 

6X27

 

6X22

8X27

 

8X22

xxxx xxxx

 

uuuu uuuu

 

uuuu uuuu

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

SSP1ADD

 

 

6X27

 

6X22

8X27

 

8X22

0000

0000

0000

0000

 

uuuu uuuu

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

SSP1STAT

 

 

6X27

 

6X22

8X27

 

8X22

0000

0000

0000

0000

 

uuuu uuuu

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

SSP1CON1

 

 

6X27

 

6X22

8X27

 

8X22

0000

0000

0000

0000

 

uuuu uuuu

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

SSP1CON2

 

 

6X27

 

6X22

8X27

 

8X22

0000

0000

0000

0000

 

uuuu uuuu

 

 

 

 

 

 

 

 

 

Legend:

u = unchanged, x = unknown, - = unimplemented bit, read as ‘0’, q = value depends on condition.

 

Shaded cells indicate conditions do not apply for the designated device.

 

 

 

Note 1:

One or more bits in the INTCONx or PIRx registers will be affected (to cause wake-up).

 

2:When the wake-up is due to an interrupt and the GIEL or GIEH bit is set, the PC is loaded with the interrupt vector (0008h or 0018h).

3:When the wake-up is due to an interrupt and the GIEL or GIEH bit is set, the TOSU, TOSH and TOSL are updated with the current value of the PC. The STKPTR is modified to point to the next location in the hardware stack.

4:See Table 4-3 for Reset value for specific condition.

5:Bits 6 and 7 of PORTA, LATA and TRISA are enabled, depending on the oscillator mode selected. When not enabled as PORTA pins, they are disabled and read ‘0’.

DS39646B-page 58

Preliminary

2004 Microchip Technology Inc.

PIC18F8722 FAMILY

TABLE 4-4:

INITIALIZATION CONDITIONS FOR ALL REGISTERS (CONTINUED)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

MCLR Resets,

 

 

 

Register

 

 

Applicable Devices

 

Power-on Reset,

 

WDT Reset,

 

Wake-up via WDT

 

 

 

Brown-out Reset

RESET Instruction,

 

or Interrupt

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Stack Resets

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

ADRESH

 

 

6X27

 

6X22

8X27

 

8X22

xxxx xxxx

 

uuuu uuuu

 

uuuu uuuu

 

 

 

 

 

 

 

 

 

 

 

 

 

 

ADRESL

 

 

6X27

 

6X22

8X27

 

8X22

xxxx xxxx

 

uuuu uuuu

 

uuuu uuuu

 

 

 

 

 

 

 

 

 

 

 

 

 

ADCON0

 

 

6X27

 

6X22

8X27

 

8X22

--00 0000

--00 0000

 

--uu uuuu

 

 

 

 

 

 

 

 

 

 

 

 

 

ADCON1

 

 

6X27

 

6X22

8X27

 

8X22

--00 0000

--00 0000

 

--uu uuuu

 

 

 

 

 

 

 

 

 

 

 

 

 

ADCON2

 

 

6X27

 

6X22

8X27

 

8X22

0-00 0000

0-00 0000

 

u-uu uuuu

 

 

 

 

 

 

 

 

 

 

 

 

 

 

CCPR1H

 

 

6X27

 

6X22

8X27

 

8X22

xxxx xxxx

 

uuuu uuuu

 

uuuu uuuu

 

 

 

 

 

 

 

 

 

 

 

 

 

 

CCPR1L

 

 

6X27

 

6X22

8X27

 

8X22

xxxx xxxx

 

uuuu uuuu

 

uuuu uuuu

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

CCP1CON

 

 

6X27

 

6X22

8X27

 

8X22

0000

0000

0000

0000

 

uuuu uuuu

 

 

 

 

 

 

 

 

 

 

 

 

 

 

CCPR2H

 

 

6X27

 

6X22

8X27

 

8X22

xxxx xxxx

 

uuuu uuuu

 

uuuu uuuu

 

 

 

 

 

 

 

 

 

 

 

 

 

 

CCPR2L

 

 

6X27

 

6X22

8X27

 

8X22

xxxx xxxx

 

uuuu uuuu

 

uuuu uuuu

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

CCP2CON

 

 

6X27

 

6X22

8X27

 

8X22

0000

0000

0000

0000

 

uuuu uuuu

 

 

 

 

 

 

 

 

 

 

 

 

 

 

CCPR3H

 

 

6X27

 

6X22

8X27

 

8X22

xxxx xxxx

 

uuuu uuuu

 

uuuu uuuu

 

 

 

 

 

 

 

 

 

 

 

 

 

 

CCPR3L

 

 

6X27

 

6X22

8X27

 

8X22

xxxx xxxx

 

uuuu uuuu

 

uuuu uuuu

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

CCP3CON

 

 

6X27

 

6X22

8X27

 

8X22

0000

0000

0000

0000

 

uuuu uuuu

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

ECCP1AS

 

 

6X27

 

6X22

8X27

 

8X22

0000

0000

0000

0000

 

uuuu uuuu

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

CVRCON

 

 

6X27

 

6X22

8X27

 

8X22

0000

0000

0000

0000

 

uuuu uuuu

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

CMCON

 

 

6X27

 

6X22

8X27

 

8X22

0000

0111

0000

0111

 

uuuu uuuu

 

 

 

 

 

 

 

 

 

 

 

 

 

 

TMR3H

 

 

6X27

 

6X22

8X27

 

8X22

xxxx xxxx

 

uuuu uuuu

 

uuuu uuuu

 

 

 

 

 

 

 

 

 

 

 

 

 

 

TMR3L

 

 

6X27

 

6X22

8X27

 

8X22

xxxx xxxx

 

uuuu uuuu

 

uuuu uuuu

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

T3CON

 

 

6X27

 

6X22

8X27

 

8X22

0000

0000

 

uuuu uuuu

 

uuuu uuuu

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

PSPCON

 

 

6X27

 

6X22

8X27

 

8X22

0000

----

0000

----

 

uuuu ----

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

SPBRG1

 

 

6X27

 

6X22

8X27

 

8X22

0000

0000

0000

0000

 

uuuu uuuu

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

RCREG1

 

 

6X27

 

6X22

8X27

 

8X22

0000

0000

0000

0000

 

uuuu uuuu

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

TXREG1

 

 

6X27

 

6X22

8X27

 

8X22

0000

0000

0000

0000

 

uuuu uuuu

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

TXSTA1

 

 

6X27

 

6X22

8X27

 

8X22

0000

0010

0000

0010

 

uuuu uuuu

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

RCSTA1

 

 

6X27

 

6X22

8X27

 

8X22

0000

000x

0000

000x

 

uuuu uuuu

 

 

 

 

 

 

 

 

 

 

 

 

 

EEADRH

 

 

6X27

 

6X22

8X27

 

8X22

---- --00

---- --00

 

---- --uu

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

EEADR

 

 

6X27

 

6X22

8X27

 

8X22

0000

0000

0000

0000

 

uuuu uuuu

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

EEDATA

 

 

6X27

 

6X22

8X27

 

8X22

0000

0000

0000

0000

 

uuuu uuuu

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

EECON2

 

 

6X27

 

6X22

8X27

 

8X22

0000

0000

0000

0000

 

0000

0000

 

 

 

 

 

 

 

 

 

 

 

 

 

 

EECON1

 

 

6X27

 

6X22

8X27

 

8X22

xx-0 x000

 

uu-0 u000

 

uu-u uuuu

 

 

 

 

 

 

 

 

 

 

Legend:

u = unchanged, x = unknown, - = unimplemented bit, read as ‘0’, q = value depends on condition.

 

 

Shaded cells indicate conditions do not apply for the designated device.

 

 

 

 

Note 1:

One or more bits in the INTCONx or PIRx registers will be affected (to cause wake-up).

 

 

2:When the wake-up is due to an interrupt and the GIEL or GIEH bit is set, the PC is loaded with the interrupt vector (0008h or 0018h).

3:When the wake-up is due to an interrupt and the GIEL or GIEH bit is set, the TOSU, TOSH and TOSL are updated with the current value of the PC. The STKPTR is modified to point to the next location in the hardware stack.

4:See Table 4-3 for Reset value for specific condition.

5:Bits 6 and 7 of PORTA, LATA and TRISA are enabled, depending on the oscillator mode selected. When not enabled as PORTA pins, they are disabled and read ‘0’.

2004 Microchip Technology Inc.

Preliminary

DS39646B-page 59

PIC18F8722 FAMILY

TABLE 4-4:

INITIALIZATION CONDITIONS FOR ALL REGISTERS (CONTINUED)

 

 

 

 

 

 

 

 

 

 

 

 

 

MCLR Resets,

 

 

Register

 

 

Applicable Devices

 

Power-on Reset,

 

WDT Reset,

 

Wake-up via WDT

 

 

 

Brown-out Reset

RESET Instruction,

 

or Interrupt

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Stack Resets

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

IPR3

 

 

6X27

 

6X22

8X27

 

8X22

1111

1111

1111

1111

 

uuuu uuuu

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

PIR3

 

 

6X27

 

6X22

8X27

 

8X22

0000

0000

0000

0000

 

uuuu uuuu(1)

PIE3

 

 

6X27

 

6X22

8X27

 

8X22

0000

0000

0000

0000

 

uuuu uuuu

 

 

 

 

 

 

 

 

 

 

 

 

 

IPR2

 

 

6X27

 

6X22

8X27

 

8X22

11-1 1111

11-1 1111

 

uu-u uuuu

 

 

 

 

 

 

 

 

 

 

 

 

 

PIR2

 

 

6X27

 

6X22

8X27

 

8X22

00-0 0000

00-0 0000

 

uu-u uuuu(1)

PIE2

 

 

6X27

 

6X22

8X27

 

8X22

00-0 0000

00-0 0000

 

uu-u uuuu

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

IPR1

 

 

6X27

 

6X22

8X27

 

8X22

1111

1111

1111

1111

 

uuuu uuuu

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

PIR1

 

 

6X27

 

6X22

8X27

 

8X22

0000

0000

0000

0000

 

uuuu uuuu(1)

PIE1

 

 

6X27

 

6X22

8X27

 

8X22

0000

0000

0000

0000

 

uuuu uuuu

 

 

 

 

 

 

 

 

 

 

 

 

 

 

MEMCON

 

 

6X27

 

6X22

8X27

 

8X22

0-00 --00

0-00 --00

 

u-uu --uu

OSCTUNE

 

 

6X27

 

6X22

8X27

 

8X22

00-0 0000

00-0 0000

 

uu-u uuuu

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

TRISJ

 

 

6X27

 

6X22

8X27

 

8X22

1111

1111

1111

1111

 

uuuu uuuu

TRISH

 

 

6X27

 

6X22

8X27

 

8X22

1111

1111

1111

1111

 

uuuu uuuu

TRISG

 

 

6X27

 

6X22

8X27

 

8X22

---1 1111

---1 1111

 

---u uuuu

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

TRISF

 

 

6X27

 

6X22

8X27

 

8X22

1111

1111

1111

1111

 

uuuu uuuu

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

TRISE

 

 

6X27

 

6X22

8X27

 

8X22

1111

1111

1111

1111

 

uuuu uuuu

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

TRISD

 

 

6X27

 

6X22

8X27

 

8X22

1111

1111

1111

1111

 

uuuu uuuu

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

TRISC

 

 

6X27

 

6X22

8X27

 

8X22

1111

1111

1111

1111

 

uuuu uuuu

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

TRISB

 

 

6X27

 

6X22

8X27

 

8X22

1111

1111

1111

1111

 

uuuu uuuu

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

TRISA(5)

 

 

6X27

 

6X22

8X27

 

8X22

1111

1111(5)

1111

1111(5)

 

uuuu uuuu(5)

LATJ

 

 

6X27

 

6X22

8X27

 

8X22

xxxx xxxx

 

uuuu uuuu

 

uuuu uuuu

LATH

 

 

6X27

 

6X22

8X27

 

8X22

xxxx xxxx

 

uuuu uuuu

 

uuuu uuuu

LATG

 

 

6X27

 

6X22

8X27

 

8X22

--xx xxxx

 

--uu uuuu

 

--uu uuuu

 

 

 

 

 

 

 

 

 

 

 

 

 

 

LATF

 

 

6X27

 

6X22

8X27

 

8X22

xxxx xxxx

 

uuuu uuuu

 

uuuu uuuu

 

 

 

 

 

 

 

 

 

 

 

 

 

 

LATE

 

 

6X27

 

6X22

8X27

 

8X22

xxxx xxxx

 

uuuu uuuu

 

uuuu uuuu

 

 

 

 

 

 

 

 

 

 

 

 

 

 

LATD

 

 

6X27

 

6X22

8X27

 

8X22

xxxx xxxx

 

uuuu uuuu

 

uuuu uuuu

 

 

 

 

 

 

 

 

 

 

 

 

 

 

LATC

 

 

6X27

 

6X22

8X27

 

8X22

xxxx xxxx

 

uuuu uuuu

 

uuuu uuuu

 

 

 

 

 

 

 

 

 

 

 

 

 

 

LATB

 

 

6X27

 

6X22

8X27

 

8X22

xxxx xxxx

 

uuuu uuuu

 

uuuu uuuu

 

 

 

 

 

 

 

 

 

 

 

 

 

 

LATA(5)

 

 

6X27

 

6X22

8X27

 

8X22

xxxx xxxx(5)

 

uuuu uuuu(5)

 

uuuu uuuu(5)

PORTJ

 

 

6X27

 

6X22

8X27

 

8X22

xxxx xxxx

 

uuuu uuuu

 

uuuu uuuu

PORTH

 

 

6X27

 

6X22

8X27

 

8X22

0000

xxxx

 

uuuu uuuu

 

uuuu uuuu

PORTG

 

 

6X27

 

6X22

8X27

 

8X22

--xx xxxx

 

--uu uuuu

 

--uu uuuu

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

PORTF

 

 

6X27

 

6X22

8X27

 

8X22

x000

0000

 

u000

0000

 

uuuu uuuu

 

 

 

 

 

 

 

 

 

 

 

 

 

 

PORTE

 

 

6X27

 

6X22

8X27

 

8X22

xxxx xxxx

 

uuuu uuuu

 

uuuu uuuu

 

 

 

 

 

 

 

 

 

 

 

 

 

 

PORTD

 

 

6X27

 

6X22

8X27

 

8X22

xxxx xxxx

 

uuuu uuuu

 

uuuu uuuu

 

 

 

 

 

 

 

 

 

 

 

 

 

 

PORTC

 

 

6X27

 

6X22

8X27

 

8X22

xxxx xxxx

 

uuuu uuuu

 

uuuu uuuu

 

 

 

 

 

 

 

 

 

 

 

 

 

 

PORTB

 

 

6X27

 

6X22

8X27

 

8X22

xxxx xxxx

 

uuuu uuuu

 

uuuu uuuu

 

 

 

 

 

 

 

 

 

Legend:

u = unchanged, x = unknown, - = unimplemented bit, read as ‘0’, q = value depends on condition.

 

Shaded cells indicate conditions do not apply for the designated device.

 

 

 

Note 1:

One or more bits in the INTCONx or PIRx registers will be affected (to cause wake-up).

 

2:When the wake-up is due to an interrupt and the GIEL or GIEH bit is set, the PC is loaded with the interrupt vector (0008h or 0018h).

3:When the wake-up is due to an interrupt and the GIEL or GIEH bit is set, the TOSU, TOSH and TOSL are updated with the current value of the PC. The STKPTR is modified to point to the next location in the hardware stack.

4:See Table 4-3 for Reset value for specific condition.

5:Bits 6 and 7 of PORTA, LATA and TRISA are enabled, depending on the oscillator mode selected. When not enabled as PORTA pins, they are disabled and read ‘0’.

DS39646B-page 60

Preliminary

2004 Microchip Technology Inc.

PIC18F8722 FAMILY

TABLE 4-4:

INITIALIZATION CONDITIONS FOR ALL REGISTERS (CONTINUED)

 

 

 

 

 

 

 

 

 

 

 

 

 

MCLR Resets,

 

 

Register

 

 

Applicable Devices

 

Power-on Reset,

 

WDT Reset,

 

Wake-up via WDT

 

 

 

Brown-out Reset

RESET Instruction,

 

or Interrupt

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Stack Resets

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

PORTA(5)

 

 

6X27

 

6X22

8X27

 

8X22

xx0x 0000(5)

 

uu0u 0000(5)

 

uuuu uuuu(5)

SPBRGH1

 

 

6X27

 

6X22

8X27

 

8X22

0000

0000

0000

0000

 

uuuu uuuu

 

 

 

 

 

 

 

 

 

 

 

 

BAUDCON1

 

6X27

 

6X22

8X27

 

8X22

01-0 0-00

01-0 0-00

 

uu-u u-uu

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

SPBRGH2

 

 

6X27

 

6X22

8X27

 

8X22

0000

0000

0000

0000

 

uuuu uuuu

 

 

 

 

 

 

 

 

 

 

 

 

BAUDCON2

 

6X27

 

6X22

8X27

 

8X22

01-0 0-00

01-0 0-00

 

uu-u u-uu

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

ECCP1DEL

 

 

6X27

 

6X22

8X27

 

8X22

0000

0000

0000

0000

 

uuuu uuuu

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

TMR4

 

 

6X27

 

6X22

8X27

 

8X22

0000

0000

0000

0000

 

uuuu uuuu

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

PR4

 

 

6X27

 

6X22

8X27

 

8X22

1111

1111

 

uuuu uuuu

 

uuuu uuuu

 

 

 

 

 

 

 

 

 

 

 

 

 

T4CON

 

 

6X27

 

6X22

8X27

 

8X22

-000 0000

-000 0000

 

-uuu uuuu

 

 

 

 

 

 

 

 

 

 

 

 

 

 

CCPR4H

 

 

6X27

 

6X22

8X27

 

8X22

xxxx xxxx

 

uuuu uuuu

 

uuuu uuuu

 

 

 

 

 

 

 

 

 

 

 

 

 

 

CCPR4L

 

 

6X27

 

6X22

8X27

 

8X22

xxxx xxxx

 

uuuu uuuu

 

uuuu uuuu

 

 

 

 

 

 

 

 

 

 

 

 

 

CCP4CON

 

 

6X27

 

6X22

8X27

 

8X22

--00 0000

--00 0000

 

--uu uuuu

 

 

 

 

 

 

 

 

 

 

 

 

 

 

CCPR5H

 

 

6X27

 

6X22

8X27

 

8X22

xxxx xxxx

 

uuuu uuuu

 

uuuu uuuu

 

 

 

 

 

 

 

 

 

 

 

 

 

 

CCPR5L

 

 

6X27

 

6X22

8X27

 

8X22

xxxx xxxx

 

uuuu uuuu

 

uuuu uuuu

 

 

 

 

 

 

 

 

 

 

 

 

 

CCP5CON

 

 

6X27

 

6X22

8X27

 

8X22

--00 0000

--00 0000

 

--uu uuuu

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

SPBRG2

 

 

6X27

 

6X22

8X27

 

8X22

0000

0000

0000

0000

 

uuuu uuuu

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

RCREG2

 

 

6X27

 

6X22

8X27

 

8X22

0000

0000

0000

0000

 

uuuu uuuu

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

TXREG2

 

 

6X27

 

6X22

8X27

 

8X22

0000

0000

0000

0000

 

uuuu uuuu

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

TXSTA2

 

 

6X27

 

6X22

8X27

 

8X22

0000

0010

0000

0010

 

uuuu uuuu

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

RCSTA2

 

 

6X27

 

6X22

8X27

 

8X22

0000

000x

0000

000x

 

uuuu uuuu

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

ECCP3AS

 

 

6X27

 

6X22

8X27

 

8X22

0000

0000

0000

0000

 

uuuu uuuu

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

ECCP3DEL

 

 

6X27

 

6X22

8X27

 

8X22

0000

0000

0000

0000

 

uuuu uuuu

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

ECCP2AS

 

 

6X27

 

6X22

8X27

 

8X22

0000

0000

0000

0000

 

uuuu uuuu

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

ECCP2DEL

 

 

6X27

 

6X22

8X27

 

8X22

0000

0000

0000

0000

 

uuuu uuuu

 

 

 

 

 

 

 

 

 

 

 

 

 

 

SSP2BUF

 

 

6X27

 

6X22

8X27

 

8X22

xxxx xxxx

 

uuuu uuuu

 

uuuu uuuu

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

SSP2ADD

 

 

6X27

 

6X22

8X27

 

8X22

0000

0000

0000

0000

 

uuuu uuuu

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

SSP2STAT

 

 

6X27

 

6X22

8X27

 

8X22

0000

0000

0000

0000

 

uuuu uuuu

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

SSP2CON1

 

 

6X27

 

6X22

8X27

 

8X22

0000

0000

0000

0000

 

uuuu uuuu

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

SSP2CON2

 

 

6X27

 

6X22

8X27

 

8X22

0000

0000

0000

0000

 

uuuu uuuu

 

 

 

 

 

 

 

 

 

Legend:

u = unchanged, x = unknown, - = unimplemented bit, read as ‘0’, q = value depends on condition.

 

Shaded cells indicate conditions do not apply for the designated device.

 

 

 

Note 1:

One or more bits in the INTCONx or PIRx registers will be affected (to cause wake-up).

 

2:When the wake-up is due to an interrupt and the GIEL or GIEH bit is set, the PC is loaded with the interrupt vector (0008h or 0018h).

3:When the wake-up is due to an interrupt and the GIEL or GIEH bit is set, the TOSU, TOSH and TOSL are updated with the current value of the PC. The STKPTR is modified to point to the next location in the hardware stack.

4:See Table 4-3 for Reset value for specific condition.

5:Bits 6 and 7 of PORTA, LATA and TRISA are enabled, depending on the oscillator mode selected. When not enabled as PORTA pins, they are disabled and read ‘0’.

2004 Microchip Technology Inc.

Preliminary

DS39646B-page 61

PIC18F8722 FAMILY

NOTES:

DS39646B-page 62

Preliminary

2004 Microchip Technology Inc.

Соседние файлы в папке Склад