Maxim-integrated MAXQ Family Users Guide: MAXQ2010 Supplement Instrukcja Użytkownika Strona 53

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 147
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 52
MAXQ Family Users Guide:
MAXQ2010 Supplement
6-15
6.2.3 External Interrupt Example: Handling Interrupt on INT10/P5.2
move PD5.2, #0 ; Set P5.2 to input mode
move PO5.2, #1 ; Enable weak pullup
move IV, #intHandler ; Set interrupt vector
move IMR.1, #1 ; Enable interrupts for module 1
move EIE1.2, #1 ; Enable external interrupt 10
move EIES1.2, #1 ; Set INT10 to trigger on falling edge
move EIF1.2, #0 ; Force interrupt flag cleared
nop
nop
nop
nop
move IC.0, #1 ; Enable interrupts globally
sjump $ ; Wait for int to trigger (press SW3)
intHandler:
move EIF1.2, #0 ; Clear interrupt flag
nop
nop ; [SET BREAKPOINT HERE]
nop
reti
Przeglądanie stron 52
1 2 ... 48 49 50 51 52 53 54 55 56 57 58 ... 146 147

Komentarze do niniejszej Instrukcji

Brak uwag