Maxim-integrated MAXQ Family Users Guide: MAXQ8913 Supplement Instrukcja Użytkownika Strona 47

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 114
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 46
MAXQ Family Users Guide:
MAXQ8913 Supplement
11-2
11.2.2 SPI Example 2: Receiving Data in Slave Mode
move SPICN, #01h ; Enable SPI in slave mode
move SPICF, #00h ; Sample data at clock rising edge, 8 bit character
call getByte
move A[0], GR
call getByte
move A[1], GR
call getByte
move A[2], GR
call getByte
move A[3], GR
...
getByte:
move C, SPICN.6 ; Wait for transfer to complete
jump NC, getByte
move SPICN.6, #0 ; Clear transfer flag
move GR, SPIB ; Get character
ret
Maxim Integrated
Przeglądanie stron 46
1 2 ... 42 43 44 45 46 47 48 49 50 51 52 ... 113 114

Komentarze do niniejszej Instrukcji

Brak uwag