mitxela.com forum
Welcome. Please log in or register.

attiny85 at 128 khz
DAVID Posted: 19 Sep 2018, 05:02 PM
Avatar
I love mcus

Member
Posts: 237
Joined: 10-September 17
hi, i want to make a low power protect with the attiny85 and there are so many ways to accomplish this through the low power modes of the attiny but when it enters in to a deep sleep the only way to wake it up is reseting the mcu or using interrupts and that will be a problem in mi project.
Is there a way to use the internal 128khz crystal oscillator for the clock?

-------------
[top]
mit Posted: 25 Sep 2018, 11:45 AM
Avatar
yeah whatever

Admin
Posts: 538
Joined: 4-May 16
Oh hi, sorry for the slow response.

Yeah you can set the ATtiny to use the 128khz oscillator as its main clock, if you go to the avr fuse calculator webpage and look at attiny85 some of the options in the drop down menu are for "WD. Osc. 128kHz". I guess you could combine this with the clk div8 fuse to go even slower.

I never tried anything like that though, normally I find it's best to run fast, but then sleep for long periods. You can configure it to sleep until it's woken up by the watchdog timer which can be up to I think 16 seconds.

-------------
[top]
DAVID Posted: 25 Sep 2018, 11:04 PM
Avatar
I love mcus

Member
Posts: 237
Joined: 10-September 17
well it seems to work but it is completely useless for my diy watch,
i was hoping a current draw around 0.1 miliamps but i get the same current as if it was running at 1 mhz (around 20 miliamps at 5v) (and for using interfaces with the internal 128khz clock signal such as i2c it will be horribly slow)

-------------
[top]
DAVID Posted: 25 Sep 2018, 11:13 PM
Avatar
I love mcus

Member
Posts: 237
Joined: 10-September 17
and i wanted to use a timer to count seconds since those are extremely precise and don´t wanted to use external devices like a RTC (Real Time Clock).
the watchdog timer is used to wake up the mcu on a certain time but it is not precise enough to be use as a seconds counter

-------------
[top]
alesterq1 Posted: 8 Oct 2018, 07:26 AM
Avatar


Member
Posts: 1
Joined: 8-October 18
spam

Last edit by mit at 8 Oct 2018, 11:53 AM

-------------
[top]
kinzad9 Posted: 15 Feb 2020, 05:53 PM
Avatar


Member
Posts: 1
Joined: 15-February 20
spam

Last edit by mit at 15 Feb 2020, 06:06 PM

-------------
[top]

Sign in to post a reply.