Rainbow-electronics ATmega64L Manuel d'utilisateur Page 21

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 298
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 20
21
ATmega16(L)
2466B09/01
I/O Memory The I/O space definition of the ATmega16 is shown in Register Summary on page 290.
All ATmega16 I/Os and peripherals are placed in the I/O space. The I/O locations are
accessed by the IN and OUT instructions, transferring data between the 32 general pur-
pose working registers and the I/O space. I/O registers within the address range $00 -
$1F are directly bit-accessible using the SBI and CBI instructions. In these registers, the
value of single bits can be checked by using the SBIS and SBIC instructions. Refer to
the Instruction Set section for more details. When using the I/O specific commands IN
and OUT, the I/O addresses $00 - $3F must be used. When addressing I/O registers as
data space using LD and ST instructions, $20 must be added to these addresses.
For compatibility with future devices, reserved bits should be written to zero if accessed.
Reserved I/O memory addresses should never be written.
Some of the status flags are cleared by writing a logical one to them. Note that the CBI
and SBI instructions will operate on all bits in the I/O register, writing a one back into any
flag read as set, thus clearing the flag. The CBI and SBI instructions work with registers
$00 to $1F only.
The I/O and peripherals control registers are explained in later sections.
Vue de la page 20
1 2 ... 16 17 18 19 20 21 22 23 24 25 26 ... 297 298

Commentaires sur ces manuels

Pas de commentaire