NEW: Learning electronics? Ask your questions on the new Electronics Questions & Answers site hosted by CircuitLab.
Project Help and Ideas » power management on the AVR
December 21, 2016 by jvanderspek |
I wrote a multithreading kernel (and adapted the lcd software to be reentrant), and got a bit stuck in attempting to do good power management, particularly getting to an efficient sleep mode when all threads are idle. Which in 'typical' apps they usually are. I have a couple of questions related to this that I hope someone can help me with: 1) I use timer#0 for time slicing and thread sleeping. #0 is driven by CLKio, which is disabled in all but sleep mode idle, see page 39 of the ATmega manual. It even seems to be disabled in ADC noise reduction mode, which makes this setup less useful because this causes me to lose global wall clock time when actually reducing ADC noise. Now barring an external clock, there is also CLKasy, which can be driven by a 32 kHz external crystal. But because the XTAL and TOSC pins are shared this seems to force me to use the internal oscillator as clock source, running at most 8 MHz (pag 33), about half of what I am running now. I have the impression I am missing something, does anyone have a suggestions? 2) Using the low power crystal oscillator consumes the least amount of power, but is "not capable of driving other clock inputs" (pag 28 of the ATmega manual). What exactly are these "other" inputs that can't be driven? Inputs to chips other than the AVR processor? In other words, when using a low power crystal, will my standalone atmega328p be fully functional? 3) The Nerdkit came with a 14.x MHz crystal, and according to Chapter 8 of the ATmega manual we need capacitors C1 and C2 that do not occur on the schematics for the different Nerkkit projects. What is the effect exactly of omitting them? 4) The standard Nerdkits cable via the boot loader does not allow reading (or writing) the fuse bits. Does anyone know the fuse bit settings programmed on the processors that came from NerdKits? (I am currently unable to read them). Thanks a lot, Juul |
---|---|
December 25, 2016 by lnino |
Hi jvanderspek, sadly I am not very familiar with energy saving. I have only used the watchdog for reactive light in a geocaching Project. But I can help you with point 3 and 4. Answer to point 3: For the 14.x Mhz crystal you need two 22pF capacitors so the crystal is able to oscilate. Maybe it works on a breadboard without capacitors, but on a PCB you might get in troubles without them. So put them in every project as Standard. The Nerdkit itself is really puristic. Normally you would also need 2 pieces 100nF capicitors for the 7805 to protect them and keep it stable. Answer to point 4: The fuses of the nerdkit tutorial Looks like that:
The modified fuses by mike are like this:
Hopefully my answers are helpful for you. If you have any further questions please let me know. greetings Nino |
December 25, 2016 by jvanderspek |
Hi Nino, Thanks for your extensive answer. Yes, it helped me. Juul |
Please log in to post a reply.
Did you know that you can follow NerdKits on Facebook, YouTube, and Twitter? Learn more...
|