avr-chat
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avr-chat] PWM input / register?


From: gecko gecko
Subject: [avr-chat] PWM input / register?
Date: Fri, 24 Jun 2005 07:01:05 -0500

Hi Peeps,

I'm trying to use an external interrupt, but I would like to blank it off during the periods where my PWM is outputing a pulse(high), so it only looks at the time 1 - D.

 

I mistakenly used OCR1A in an if, but of course this an output. Is there a relevant register that follows the output of the PWM? Here is the PWM setup for my Atmega8535.

 

Thanks

 

TCCR1A = (1<<COM1A1) | (1<<COM1B1) | (1<<WGM11);
TCCR1B = (1<<WGM13) | (1<<WGM12) | (1<<CS11); // timer uses main system clock with 1/8 prescale
ICR1 = 2500; //value of TOP, (makes for 30Hz PWM, period= 33ms approx)
OCR1A = 1000;


--

___________________________________________________________
Sign-up for Ads Free at Mail.com
http://www.mail.com/?sr=signup


reply via email to

[Prev in Thread] Current Thread [Next in Thread]