Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
10/28/04 15:29
Read: times


 
#79943 - RE: Prog.CounterArray irq problem
Responding to: ???'s previous message
Here we talk about two different things:
- interrupt request which is generated when the match occurs;
- ISR execution which is possible at the corresponded conditions.


So, thahks, your question is a kind of answer :)
As I understand, not all
corresponded conditions for ISR execution
are in progress.

Details:
code of PCA ISR

; if (CCF0){
JNB CCF0,?C0001
; CCF0 = 0;
CLR CCF0
; EA = 0;
CLR EA
; DISABLE_PCA_IT;
CLR EC
;
;//increase CCAP0
MOV A,PCACompareValues+01H
ADD A, CCAP0L
MOV CCAP0L,A

MOV A,PCACompareValues
ADDC A,CCAP0H
MOV CCAP0H,A

; ENABLE_PCA_IT;
SETB EC
; EA = 1;
SETB EA
; }

If PCACompareValues rather small
i can see such a situation (when ISR execution starts):
for ex. (PCACompareValues == 0x100)
CH/CL = 0x0100
CCAP0H/L = 0x0102
That's right
After ISR I see:
CH/CL = 0x0120
CCAP0H/L = 0x0200
That's right too


But after some ISR execution I can see that:
CH/CL = 0x0400
CCAP0H/L = 0x0500
later:
CH/CL = 0x0400
CCAP0H/L = 0x1xxx ...
later:
CH/CL = 0x0400
CCAP0H/L = 0xFFFF ...

I.e. in unkown (for me) situation CH/CL == CCAP0H but ISR doesn't execute...
As the result CH/CL becomes more, more... Until CH/CL becomes 0x0000, after this 0x04000... And only after this ISR is executed.

What's this?

List of 15 messages in thread
TopicAuthorDate
Prog.CounterArray irq problem            01/01/70 00:00      
   RE: Prog.CounterArray irq problem            01/01/70 00:00      
   RE: Prog.CounterArray irq problem            01/01/70 00:00      
      RE: Prog.CounterArray irq problem            01/01/70 00:00      
         RE: Prog.CounterArray irq problem            01/01/70 00:00      
            RE: Prog.CounterArray irq problem            01/01/70 00:00      
               RE: Prog.CounterArray irq problem            01/01/70 00:00      
            RE: Prog.CounterArray irq problem            01/01/70 00:00      
               RE: Prog.CounterArray irq problem            01/01/70 00:00      
               RE: Prog.CounterArray irq problem            01/01/70 00:00      
                  RE: Prog.CounterArray irq problem            01/01/70 00:00      
                     RE: Prog.CounterArray irq problem            01/01/70 00:00      
                     RE: Prog.CounterArray irq problem            01/01/70 00:00      
                     RE: Prog.CounterArray irq problem            01/01/70 00:00      
                        RE: Prog.CounterArray irq problem            01/01/70 00:00      

Back to Subject List