EasyManua.ls Logo

Atmel AVR

Atmel AVR
191 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
41. CLI – Clear Global Interrupt Flag
41.1. Description
Clears the Global Interrupt Flag (I) in SREG (Status Register). The interrupts will be immediately
disabled. No interrupt will be executed after the CLI instruction, even if it occurs simultaneously with the
CLI instruction.
Operation:
(i) I ← 0
Syntax: Operands: Program Counter:
(i) CLI None PC ← PC + 1
16-bit Opcode:
1001 0100 1111 1000
41.2. Status Register (SREG) and Boolean Formula
I T H S V N Z C
0
I 0
Global Interrupt Flag cleared.
Example:
in temp, SREG ; Store SREG value (temp must be defined by user)
cli ; Disable interrupts during timed sequence
sbi EECR, EEMWE ; Start EEPROM write
sbi EECR, EEWE
out SREG, temp ; Restore SREG value (I-Flag)
Words 1 (2 bytes)
Cycles 1
Atmel AVR Instruction Set Manual [OTHER]
Atmel-0856L-AVR-Instruction-Set-Manual_Other-11/2016
69

Table of Contents

Related product manuals