Teensey 2 timers

Status
Not open for further replies.

wb8nbs

Active member
I want to port a morse code program I wrote for an Arduino Uno to the 32u4. Most of the code won't change excpet maybe pin numbers but I'm using a DDS sine wave generator using the Mega328 timer 2. I used timer 2 because the DDS supersedes the standard Arduino tone(). Grepping around the teensy modifications to the Arduino IDE, I believe tone() in teenseyduino uses timer 3. Is that correct? Timer 0 would port easier because it's 8 bit but will I be stepping on any other functions there?
 
Teensy 2 timers

I want to port a morse code program I wrote for an Arduino Uno to the 32u4. Most of the code won't change excpet maybe pin numbers but I'm using a DDS sine wave generator using the Mega328 timer 2. I used timer 2 because the DDS supersedes the standard Arduino tone(). Grepping around the teensy modifications to the Arduino IDE, I believe tone() in teenseyduino uses timer 3. Is that correct? Timer 0 would port easier because it's 8 bit but will I be stepping on any other functions there?

I got the DDS sine wave working on timer 3. My notes are at https://wb8nbs.wordpress.com/2015/12/08/more-fun-with-direct-digital-synthesis-32u4-and-fast-pwm/
 
Status
Not open for further replies.
Back
Top