Rainbow-electronics ATmega128L Instrukcja Użytkownika Strona 64

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 331
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 63
64
ATmega128(L)
2467B09/01
Figure 31. Synchronization when Reading a Software Assigned Pin Value
The following code example shows how to set port B pins 0 and 1 high, 2 and 3 low, and
define the port pins from 4 to 7 as input with pull-ups assigned to port pins 6 and 7. The
resulting pin values are read back again, but as previously discussed, a nop instruction
is included to be able to read back the value recently assigned to some of the pins.
nop in r17, PINx
0xFF
0x00
0xFF
t
pd
out PORTx, r16
SYSTEM CLK
r16
INSTRUCTIONS
SYNC LATCH
PINxn
r17
Przeglądanie stron 63
1 2 ... 59 60 61 62 63 64 65 66 67 68 69 ... 330 331

Komentarze do niniejszej Instrukcji

Brak uwag