Procedure to run Trinket Mini 3.3v at 1mhz?

Post here about your Arduino projects, get help - for Adafruit customers!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
twuelfing
 
Posts: 19
Joined: Mon Jul 13, 2015 4:45 pm

Procedure to run Trinket Mini 3.3v at 1mhz?

Post by twuelfing »

Hello all,

I am looking for a procedure to get my 3.3v trinkets to run at 1mhz.
I am working a project where every mA is critical.

I did some searching but nothing gave me a clear enough answer that i could muddle through given my high level of ignorance on the topic. :(

Also if anyone wants to share information about powersaving modes that would be awesome.
The short version of what I am doing is this.

push a button
timer starts to count and repeats the following loop for 10 minutes
LED turns on for 2 seconds then goes out
trinket enters low power
30 seconds later it wakes up, turns the LED on for 2 seconds
trinket enters low power mode.
10 minutes ends and trinket sleeps
2 hours later it wakes up and does the 10 minute loop again

repeat until battery is dead.

thanks!

User avatar
adafruit_support_mike
 
Posts: 67485
Joined: Thu Feb 11, 2010 2:51 pm

Re: Procedure to run Trinket Mini 3.3v at 1mhz?

Post by adafruit_support_mike »

The ATtiny85 has an internal 128kHz clock that you can use for low-power circuits. It sounds like your circuit runs on the order of seconds, so 128kHz should still be more than fast enough.

It's covered in section 6 of the ATtiny85 datasheet:
http://www.atmel.com/Images/Atmel-2586- ... asheet.pdf

You'll also want to read section 7: "Power Management and Sleep Modes"

User avatar
twuelfing
 
Posts: 19
Joined: Mon Jul 13, 2015 4:45 pm

Re: Procedure to run Trinket Mini 3.3v at 1mhz?

Post by twuelfing »

Fantastic, thanks for the info and fast reply!

User avatar
twuelfing
 
Posts: 19
Joined: Mon Jul 13, 2015 4:45 pm

Re: Procedure to run Trinket Mini 3.3v at 1mhz?

Post by twuelfing »

in reading through the datasheet and searching it as well i cannot find any reference to 128kHz anything.
Nor did I find anything about how to change the 8mHz clock to 1mHz or 128kHz.
All references to 1mHz are about troubleshooting eeprom read issues

Thanks for any help, and i apologize in advance for any confusion my ignorance of this topic creates in assisting me in solving issues and finding information. (perhaps that needs to be my signature...)

User avatar
adafruit_support_mike
 
Posts: 67485
Joined: Thu Feb 11, 2010 2:51 pm

Re: Procedure to run Trinket Mini 3.3v at 1mhz?

Post by adafruit_support_mike »

Section 6.2, Page 25, Clock Sources, has a table of sources that can be used for the system clock. The 128kHz internal oscillator is the fifth row, and is discussed in more detail on page 28.

The clock source is selected by the CKSEL fuse bits, discussed in section 20.2, page 149.

Section 7, which discusses power management and sleep modes, starts on page 34.

User avatar
twuelfing
 
Posts: 19
Joined: Mon Jul 13, 2015 4:45 pm

Re: Procedure to run Trinket Mini 3.3v at 1mhz?

Post by twuelfing »

i read through that entire thing and overlooked this somehow, thanks for the patience and extra assistance!
this fantastic support in the face of my frequent failures is why i keep coming back here for parts!

keep up the great work.

User avatar
adafruit_support_mike
 
Posts: 67485
Joined: Thu Feb 11, 2010 2:51 pm

Re: Procedure to run Trinket Mini 3.3v at 1mhz?

Post by adafruit_support_mike »

Microcontroller datasheets are pretty intimidating. We've just gone through them enough hundreds of times to know how to skip to the good parts. ;-)

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino”