1 / 22

Interrupts CML-12C32

Interrupts CML-12C32. Lecture L4.2. References. S12CPUV2 Reference Manual Section 7. S12CPUV2.pdf. CML-12C32 Development Board for Motorola MC9S12C32. CML12C32_UG.pdf. Interrupt (INT) Module V1. S12INTV1.pdf. S12CRGV4.pdf. CRG Block User Guide V04.05. Interrupts.

Télécharger la présentation

Interrupts CML-12C32

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. InterruptsCML-12C32 Lecture L4.2

  2. References S12CPUV2 Reference Manual Section 7 S12CPUV2.pdf CML-12C32 Development Board for Motorola MC9S12C32 CML12C32_UG.pdf Interrupt (INT) Module V1 S12INTV1.pdf S12CRGV4.pdf CRG Block User Guide V04.05

  3. Interrupts • 68HC12 Interrupts • Real-Time Interrupts

  4. HCS12 Interrupts

  5. Register Stacking for Interrupts

  6. Interrupt Vector Table Ref: MC9S12C Family Device User Guide 9S12C128DGV1.pdf

  7. Interrupt Vector Table (cont.)

  8. Interrupt Vector Table (cont.)

  9. Interrupt (INT) Module V1 S12INTV1.pdf

  10. Monitor Interrupt Vector Table Off by 2

  11. S12MEBIV3.pdf Multiplexed External Bus Interface (MEBI) Block User Guide Module V3

  12. S12MEBIV3.pdf

  13. Interrupts • 68HC12 Interrupts • Real-Time Interrupts

  14. Real-Time Interrupt Registers $0037

  15. $0038

  16. $003B

  17. ; RTI test outa equ $FF4F rti_ivec equ $0FF2 crgflg equ $0037 crgint equ $0038 rtictl equ $003b org $800 ticks dw 0 Note: Should be $0FF0. Monitor error Interrupt routine increments ticks

  18. rti_init sei ;disable interrupts ldaa #$59 staa rtictl ;set rti to 10.24 ms ldaa #$80 staa crgint ;enable rti ldx #rti_intser stx rti_ivec ;store rti int vector cli ;enable interrupts rts rti_intser ldd ticks addd #1 ;inc ticks std ticks ldaa #$80 staa crgflg ;clear rti flag rti

  19. ORG $4000 main jsr rti_init ldab #10 mn1 tba jsr hexasc jsr outa bsr sec_delay decb bne mn1 swi

  20. sec_delay pshb ;save B ldd ticks std 2,-sp ;store tick0 sd1 ldd ticks ;read ticks subd 0,sp ;diff = ticks-ticks0 cpd #100 ;repeat until 100 ticks blo sd1 leas 2,sp ;fix stack pulb ;restore B rts

More Related