Motorola MSC8101 ADS User's Guide Page 145

  • Download
  • Add to my manuals
  • Print
  • Page
    / 346
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 144
Interrupt Programming Examples
Interrupts and Interrupt Priorities 7-11
rte ;;
;; ---------------------------------------------------------------- ;
;; interrupt handle subroutine (input buffer empty) ;
;; ---------------------------------------------------------------- ;
org p:IRQ1 ;
irqs 1 ;
jsr IRQ1_SUB ;
rte ;;
;; ---------------------------------------------------------------- ;
;; interrupt handle subroutine (output buffer full) ;
;; ---------------------------------------------------------------- ;
org p:IRQ2 ;
irqs 2 ;
jsr IRQ2_SUB ;
rte ;;
;; ---------------------------------------------------------------- ;
;; interrupt handle subroutine (output buffer not empty) ;
;; ---------------------------------------------------------------- ;
org p:IRQ3 ;
irqs 3 ;
jsr IRQ3_SUB ;
rte ;;
;; ---------------------------------------------------------------- ;
;; interrupt handle subroutine (update coefficient done) ;
;; ---------------------------------------------------------------- ;
org p:IRQ4 ;
irqs 4 ;
jsr IRQ4_SUB ;
rte ;
;
;;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~;
;;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~;
;; PIC init ;
; enable VAB in PIC-SR ;
write_w #$0000,PICSR ;
;
write_w #ELIR_A,ELIRA ; irq3 enable ;
write_w #ELIR_B,ELIRB ;
write_w #$0000,ELIRC ;
write_w #$0000,ELIRD ;
write_w #$0000,ELIRE ;
write_w #$0000,ELIRF ;
;;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~;
;;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~;
;; enable interupts
bmclr #$00e0,sr.h ;
;;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~;
;;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~;
;; interrupt handle subroutine ;
Page view 144
1 2 ... 140 141 142 143 144 145 146 147 148 149 150 ... 345 346

Comments to this Manuals

No comments