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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
11/01/04 21:13
Read: times


 
#80220 - Strange Counter Behavior
I have a 192-kHz clock signal input into p3.4 (t0) of an Atmel AT89S8252. From this clock, I'm trying to derive an 8-kHz interrupt (to sample audio) by counting 24 transitions on p3.4. I'm using the following code to initialize timer0:

RELOAD_8K EQU 232
timer_init:
mov tl0,#RELOAD_8K
mov th0,#RELOAD_8K
mov tmod,#00100010b
setb tr0

I'm using the following code to initialize interrupts:

interrupt_init:
setb ea
setb et0
setb pt0

And for now, here's all I'm doing in the interrupt handler:

ORG 0Bh
cpl p2.2
reti

However, I'm not getting anything out on p2.2. I have verified that my program is actually executing (by toggling a port pin in my main routine). I have also simulated this in Keil, and everything seems to work fine there. Does anyone know of any strange hardware conditions that may prevent interrupts from occurring?

Thanks in advance.
Drew Rainwater

List of 14 messages in thread
TopicAuthorDate
Strange Counter Behavior            01/01/70 00:00      
   RE: Strange Counter Behavior            01/01/70 00:00      
   RE: Strange Counter Behavior            01/01/70 00:00      
   RE: Strange Counter Behavior            01/01/70 00:00      
      RE: Strange Counter Behavior            01/01/70 00:00      
   RE: Strange Counter Behavior            01/01/70 00:00      
      RE: Strange Counter Behavior            01/01/70 00:00      
         RE: Strange Counter Behavior            01/01/70 00:00      
            RE: Strange Counter Behavior            01/01/70 00:00      
   RE: Strange Counter Behavior            01/01/70 00:00      
   Set IT0 in TCON            01/01/70 00:00      
      RE: Set IT0 in TCON            01/01/70 00:00      
   RE: Strange Counter Behavior            01/01/70 00:00      
   RE: just a thought            01/01/70 00:00      

Back to Subject List