-
Hi, I wanted to use the fast PWM mode with the timer 0 on the Arduino Uno using TCCR0A and TCCR0B, but I suspect that it kinda breaks receiving midi. I want to do this because I am using pin 11 for SPI, and already using pins 3, 9, and 10 for other PWM, so I wanted to use pin 6 PWM. I know that Arduino uses timer0 to keep track of time, so is this possible to set it to fast PWM mode with this library or not? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
The MIDI layer itself does not make use of time tracking or AVR timers, but the transports (Hardware serial, USB etc) may rely upon it and cause issues. I'd suggest you do a test run without any MIDI involved, just with hardware serial, and if it works fine there should be no reason for MIDI to go wrong. |
Beta Was this translation helpful? Give feedback.
-
You are right, my problem was with something else, (probably sketchy contacts on my breadboard), it totally works. just coincidently broke when I added the timer 0 code. sorry about that. |
Beta Was this translation helpful? Give feedback.
The MIDI layer itself does not make use of time tracking or AVR timers, but the transports (Hardware serial, USB etc) may rely upon it and cause issues.
I'd suggest you do a test run without any MIDI involved, just with hardware serial, and if it works fine there should be no reason for MIDI to go wrong.