Atmel AVR AT90S8515-4 Bedienungsanleitung Seite 16

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 17
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 15
AN INTRODUCTION INTENDED FOR PEOPLE WITH NO PRIOR AVR KNOWLEDGE - AVRFREAKS.NET
15
Press [ F11 ]. DDRB is now 0xFF, As shown in the IO View above this is
represented as black squares in the IO View. So, a white square represents
logical low "0" and black squares are logical high "1". By setting DDRB high, all
bits of PORTB is configured as outputs.
Press [ F11 ]. 0xFF is now written to PORTB register, and the arrows points to the
DEC instruction. Note that PORTB is equal to 0xFF. Note also that the PINB
register is still 0x00!
Press [ F11 ]. The Temp variable is decremented (0xFF - 1 = 0xFE). In addition
the PINB register changes from 0x00 to 0xFF! Why? To find out why this happens
you have to look at the PORT sections of the datasheet. The explanation is that
the PORTB is first latched out onto the pin, then latched back to the PIN register
giving you a 1 clock cycle delay. As you can see, the simulator behaves like the
actual part! The next instruction is a relative jump back to the Loop label.
Press [ F11 ]. The RJMP is now executed, and the arrow is back pointing at the
Seitenansicht 15
1 2 ... 11 12 13 14 15 16 17

Kommentare zu diesen Handbüchern

Keine Kommentare