Switch to ~33% duty cycle

This commit is contained in:
Justin R. Cutler 2014-04-19 14:02:34 -04:00
parent 73f65f26c6
commit 414ad4f61f
1 changed files with 2 additions and 2 deletions

4
main.c
View File

@ -94,10 +94,10 @@ void setup(void)
* IR transmitter setup
*/
/* enable IR modulation (50% duty cycle) via Timer1 */
/* enable IR modulation (~33% duty cycle) via Timer1 */
TCCR1 = _BV(PWM1A) | _BV(CS12);
OCR1C = (((F_CPU / 8 / IR_MODULATION)) - 1);
OCR1A = OCR1C / 2;
OCR1A = OCR1C / 3;
/* set IR_TX as output */
DDRB |= _BV(IR_TX);
/* turn IR_TX off when not enabled */