Still very new to microcontrollers, and having trouble deciphering the information in the data sheets and app notes. It's a little too generic and broad for me to adapt to my project at this point.
Basically, looking to output a 38kHz signal to drive an IR LED. It's for proximity detection with an IR reciever module.
I need to set a pin on PORTB for output with DDRB.
Select the clock source (internal oscillator) TCCR0
And TCNT0 to set the frequency.
I'm under the impression that once it's started, the timer will generate a square wave and output it to the selected pin, independent of the program.
Just having trouble figuring out which bits are which, and whether they need to be set or cleared. I'm not familiar enough with all the labels, to get this figured out.
Oh, I'm working in assembler, and don't much 'C' (not enough to be useful). O know this has to super-simpler, just need to see it.
Basically, looking to output a 38kHz signal to drive an IR LED. It's for proximity detection with an IR reciever module.
I need to set a pin on PORTB for output with DDRB.
Select the clock source (internal oscillator) TCCR0
And TCNT0 to set the frequency.
I'm under the impression that once it's started, the timer will generate a square wave and output it to the selected pin, independent of the program.
Just having trouble figuring out which bits are which, and whether they need to be set or cleared. I'm not familiar enough with all the labels, to get this figured out.
Oh, I'm working in assembler, and don't much 'C' (not enough to be useful). O know this has to super-simpler, just need to see it.