Motorola Axiom CMD11E1 Guide de l'utilisateur Page 85

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 101
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 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
Vue de la page 84
1 2 ... 80 81 82 83 84 85 86 87 88 89 90 ... 100 101

Commentaires sur ces manuels

Pas de commentaire