Real-time Interrupt on HC12 and Pulse Accumulator

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Real-time Interrupt on HC12 and Pulse Accumulator

2,891 Views
cjw
Contributor I
Hi!

I am trying to use the real-time interrupt on the HC12. Currently, it interrupts every 32 ms and after about 5 seconds it toggles Port A. However, when it gets to the part where it toggles Port A, I got a pulse accumulator overflow exception. Do I need to do anything with the pulse accumulator to use the real-time interrupt? I just set the RTI Control Register and I set the RTI Flag whenever the interrupt is called to clear the interrupt.

My code is at:

http://home.comcast.net/~cwinter/RTI_Test.asm

The first time the label TOGGLE is called, the PA overflows.

Thanks for all and any help.

Message Edited by cjw on 03-21-200606:12 PM

Labels (1)
0 Kudos
1 Reply

463 Views
cjw
Contributor I
Nevermind, I figured it out. Apparently, since I am using Acc. X for my offset, I had to reinitalize it once the ISR is called, since X will be pushed to stack and who knows what it is set to after that. It's fixed now.
0 Kudos