arduino-volume3 icon indicating copy to clipboard operation
arduino-volume3 copied to clipboard

Atmega1284P @8MHz main loop can't execute

Open olahBalazs opened this issue 7 years ago • 0 comments

Hello,

I'm making a watch using atmega1284P @8MHz. I tried using your code. It is super easy and cool. However, I noticed that when I start playing any audio the main code stops. I mean my codes in my main while(1) {...} loop just can't do anything.

I poked around and if I change the Timer1.initialize(10); to Timer1.initialize(14); or above then everything starts working again. My guess is that the interrupts suffocated the CPU and it went straight from one interrupt routine to another.

Can I ask you why you chose that value to be 10? Is there a math behind it, or that was just a good value based on experience?

olahBalazs avatar Jun 17 '17 20:06 olahBalazs