Trinket Program Awareness
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- AnneBarela
- Learn User Page
- Posts: 757
- Joined: Sat Mar 24, 2012 8:56 pm
Trinket Program Awareness
Are there constants/variables to allow a Trinket/Gemma to know what its operating voltage and frequency is?
- adafruit_support_mike
- Posts: 67446
- Joined: Thu Feb 11, 2010 2:51 pm
Re: Trinket Program Awareness
WRT frequency, the file bootloaderconfig.h contains this:
and it looks like the value "LOW_VOLTAGE" is defined to indicate 3.3v operation (or, technically, any voltage too low to support a 16MHz clock).
Code: Select all
#define USB_CFG_CLOCK_KHZ (F_CPU/1000)
/* Clock rate of the AVR in MHz. Legal values are 12000, 16000 or 16500.
* The 16.5 MHz version of the code requires no crystal, it tolerates +/- 1%
* deviation from the nominal frequency. All other rates require a precision
* of 2000 ppm and thus a crystal!
* Default if not specified: 12 MHz
*/
- AnneBarela
- Learn User Page
- Posts: 757
- Joined: Sat Mar 24, 2012 8:56 pm
Re: Trinket Program Awareness
Perhaps move to the Trinket forum?
- adafruit_support_bill
- Posts: 88087
- Joined: Sat Feb 07, 2009 10:11 am
Re: Trinket Program Awareness
(Moved)
Please be positive and constructive with your questions and comments.