16.04.2014 Views

STM8S and STM8A microcontroller families

STM8S and STM8A microcontroller families

STM8S and STM8A microcontroller families

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Central processing unit (CPU)<br />

RM0016<br />

Table 1.<br />

Interrupt levels<br />

Interruptability Priority I1 I0<br />

Interruptable main<br />

Lowest<br />

1 0<br />

Interruptable level 1 0 1<br />

Interruptable level 2 0 0<br />

Non interruptable Highest<br />

1 1<br />

●<br />

H: Half carry bit<br />

The H bit is set to 1 when a carry occurs between the bits 3 <strong>and</strong> 4 of the ALU during an ADD<br />

or ADC instruction. The H bit is useful in BCD arithmetic subroutines.<br />

● I0: Interrupt mask level 0<br />

See Flag I1.<br />

● N: Negative<br />

When set to 1, this bit indicates that the result of the last arithmetic, logical or data<br />

manipulation is negative (i.e. the most significant bit is a logic 1).<br />

● Z: Zero<br />

When set to 1, this bit indicates that the result of the last arithmetic, logical or data<br />

manipulation is zero.<br />

● C: Carry<br />

When set, C indicates that a carry or borrow out of the ALU occurred during the last<br />

arithmetic operation on the MSB operation result bit. This bit is also affected during bit test,<br />

branch, shift, rotate <strong>and</strong> load instructions. See the ADD, ADC, SUB, <strong>and</strong> SBC instructions.<br />

In a division operation, C indicates if trouble occurred during execution (quotient overflow or<br />

zero division). See the DIV instruction.<br />

In bit test operations, C is the copy of the tested bit. See the BTJF <strong>and</strong> BTJT instructions.<br />

In shift <strong>and</strong> rotate operations, the carry is updated. See the RRC, RLC, SRL, SLL, <strong>and</strong> SRA<br />

instructions.<br />

This bit can be set, reset or complemented by software using the SCF, RCF, <strong>and</strong> CCF<br />

instructions.<br />

26/449 Doc ID 14587 Rev 8<br />

www.BDTIC.com/ST

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!