Thursday, December 10, 2009

PIC10 SFR STATUS Register

The STATUS register contains the status of arithmetic or logical operations. Depending on the instruction executed, the ALU may affect the values of the Carry (C), Digit Carry (DC) and Zero (Z) bits in the STATUS register. For example, the C and DC bits operate as a borrow and digit borrow out bit, respectively, in subtraction.

CLRF STATUS instruction clears the upper three bits of STATUS register. /TO & /PD bit are not writable.

It is recommended that only BCF, BSF and MOVWF instructions be used to alter the STATUS register.

These instructions do not affect the Z, DC or C bits from the STATUS register


Bit-0

C

  • Carry/Borrow Bit
  • 0 = No Carry or Borrow occurred
  • 1 = Carry occurred or No Borrow or Load bit with MSB/LSB

Bit-1

DC

  • Digit Carry/Borrow Bit
  • 0 = 4th low-order bit of result did not occur Carry or a borrow occurred.
  • 1 = 4th low-order bit of result occurred carry or did not borrowed.

Bit-2

Z

  • Zero Bit
  • 0 = Result of Arithmetic or Logical operation is not zero
  • 1 = Result of Arithmetic or Logical operation is zero.

Bit-3

/PD

  • Power-down Bit
  • 0 = Execution of SLEEP instruction.
  • 1 = After Power-up, Clearing Watchdog Timer.

Bit-4

/TO

  • Time-out Bit
  • 0 = WDT Time-out occurred.
  • 1 = After Power-up, Clearing Watchdog Timer or on SLEEP.

Bit-5

--


Bit-6

CWUF (PIC10F204/ 206 only)

  • Comparator wake-up on Change in Flag Bit
  • 0 = Default or on reset.
  • 1 = Reset due to wake-up from sleep on comparator change.

Bit-7

GPWUF

  • GPIO Reset Bit
  • 0 = Default or on reset.
  • 1 = Reset due to wake-up from sleep on pin change.

No comments:

Post a Comment