Motorola Axiom CMD11E1 Betriebsanweisung Seite 85

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 101
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 84
7.5. THE OUTPUT COMPARE INTERRUPT 85
SERVICE
; TOGGLE PA4
LDAA #%00010000
EORA PORTA
STAA PORTA
; TURN OFF THE FLAG!
LDAA #%01000000 <= This is different
STAA TFLG1
; END WITH AN RTI
RTI
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Connect the service to the interrupt ;
ORG $00DC ; $00DC WHERE THE SERVICE STARTS
JMP SERVICE ; JUMP TO WHERE THE SERVICE CODE ACTUALLY IS
Verify that the above code also generates a 30.5 Hz square wave. Now we can
reset the alarm to get a different frequency. For example, if we modify the service
routine as follows, we will get an interrupt every 2000 clock ticks or every 1 ms
for a 1 K Hz signal.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; INTERRUPT SERVICE
SERVICE
; TOGGLE PA4
LDAA #%00010000
EORA PORTA
STAA PORTA
; TURN OFF THE FLAG!
LDAA #%01000000
STAA TFLG1
Seitenansicht 84
1 2 ... 80 81 82 83 84 85 86 87 88 89 90 ... 100 101

Kommentare zu diesen Handbüchern

Keine Kommentare