0

Pro trinket 3v3/12MHz question
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Pro trinket 3v3/12MHz question

by heesup0119 on Fri May 03, 2019 2:57 pm

Hello,

I have been using Pro trinket 3V3/12MHz for a while without any issues.
But recently I found that 12MHz is not a standard clock frequency for ATmega328p, and some Arduino functions using a clock frequency might be messed up because all Arduino functions are written based off on 8 and 16 MHz.
I'm just curious whether Pro trinket 3V3 also falls under it or not.

Thanks!

heesup0119
 
Posts: 3
Joined: Tue Feb 20, 2018 2:08 am

Re: Pro trinket 3v3/12MHz question

by adafruit_support_mike on Fri May 03, 2019 9:33 pm

The time functions rely on a macro called CPU_FREQUENCY, which tells the code the number of CPU ticks per second. The board support package has the correct value for each variant.

There's no actual connection between the hardware clock and the macro though. You can compile and upload code for either variant, but if you use the wrong one, the time functions will be off.

adafruit_support_mike
 
Posts: 59156
Joined: Thu Feb 11, 2010 2:51 pm

Please be positive and constructive with your questions and comments.