DPRG
DPRG List  



[DPRG] ISR questions

Subject: [DPRG] ISR questions
From: montgomery f. tidwell mtidwell at practicalmatters.com
Date: Fri Jun 1 11:07:58 CDT 2001

Howdy,

thanks, this helped me find the problem.

the interrupts (in the ISR routines) are cleared by setting a bit
in TFLG1. which i was doing sortof. i was clearing the interrupt
with "TFLG1 |= 0x10" when i should have been doing "TFLG1 = 0x10".


                                  \\//_


Joe Whitmore wrote:
> 
> It's been a while for me, and I don't have my books with me at the
> momemt. But, your assumptions are mostly correct.
> What this sounds like is that your ISR is setup to block other
> Interupts. So until the ISR completes and the interupt registers is
> restored the second ISR will not run. To minimize the time X, the first
> line in the ISR of both can be CLI? to clear the interupt.
> Assume TOC3 and TOC4 are triggered simultaneously, 2 interupts will be
> thrown and what should happen is this:
>         TOC3 ISR starts and CLI's
>         TOC4 ISR starts and CLI's
>         TOC4 ISR runs to completion and exits
>         TOC3 ISR runs to completion and exits
> 
> I had originally used the TOCx ports for Pulse Width control for servos
> and H-bridges.
> to do this there are I think 2 registers that need to be setup. There is
> a setting to determine what happens when the timer overflows, and and
> then separate bits to set each of the TOC when it interupts, and another
> register to set enables.
> What I had was on the timer overflow, toggle all high. And on TOC
> trigger, the output was pulled low.
> 
> If you have access to the pink books, or motorola's website, you can get
> a much better discription of this whole process.
> 
> Joe
> 
> "montgomery f. tidwell" wrote:
> >
> > Howdy,
> >
> > using icc 0.50 i created a (HC11) program with two ISRs. based on TOC3
> > and TOC4. the TOC3 ISR blinks a green LED on PA5, and the TOC4 ISR
> > blinks
> > a red LED on PA6.
> >
> > when i set both TOC3 and TOC4 to 2000, only the green LED blinked. i
> > then changed TOC4 to 2010, and still only the green LED blinked. when
> > TOC4 was set to 2100, both LEDs blinked.
> >
> > this leads me to believe that:
> >
> > 1) the TOC3 ISR is "activated" before the TOC4 ISR.
> >
> > 2) the TOC4 ISR will not "activate" until some X period of time after
> >    the TOC3 ISR "activates".
> >
> > are these assumptions correct?
> >
> > if (2) is correct then what determines the value of X?
> >
> > if (2) is wrong then how can two (or more) ISR be "activated" at the
> > same time?
> >
> > TIA
> >
> >                              \\//_
> >
> > _______________________________________________
> > DPRGlist mailing list
> > DPRGlist at dprg.org
> > http://nimon.ncc.com/mailman/listinfo/dprglist
> 
> --
> Joseph L. Whitmore
> Consulting Group
> e-Publishing Corp.
> 120 Bishops Way
> Ste. 165
> Brookfield, WI 53005
> 
> P: 262-782-0007
> F: 262-782-7006
> joe.whitmore at e-pubcorp.com
> IM: "Garion Joe"
> ICQ: 3592419
> 
> e-Publishing Corp. is a BroadVision company
> URL: http://www.e-pubcorp.com
> 
> ***This message is intended only for the use of the Addressee and may
> contain information that is PRIVILEGED and CONFIDENTIAL. If you are not
> the
> intended recipient, dissemination of this communication is prohibited.
> If
> you have received this communication in error, please erase all copies
> of
> the message and its attachments and notify us immediately.***


More information about the DPRG mailing list