0
\$\begingroup\$

I compiled a hex file where the controller is supposed to blink 1 time per secound. The frequency was set to 1mHz (it is the internal generator). I programmed an Atmega 8a using avrdude 33 on default fuses and now the LED is flushing very fast. I think if I rise the frequency to 8mHz it will work ok. But I need the Atmega running as slow as possible to reduce power consumption. Because if i rise the frequency to 8mHz it will increase the power consumption 8 times! So how sould I configure the fuses?

P.S. I tried to use someone else's fuses and killed a few microcontrollers so I want to be sure that it will work 100%.

\$\endgroup\$
3
  • \$\begingroup\$ If you want to reduce power consumption, using AVR power management including SLEEP instructions and waking on timer interrupts will make a bigger difference than changing clock frequencies. Changes are your LED will consume significantly more power than the AVR anyway though... \$\endgroup\$ Commented Oct 30, 2017 at 19:07
  • \$\begingroup\$ @DeanFranks I think that using sleep and interrupt in a circuit that waits for a signal from a IR sensor isn't a good idea. \$\endgroup\$
    – Coder_fox
    Commented Oct 30, 2017 at 20:10
  • \$\begingroup\$ Connect the IR sensor to a GPIO with edge interrupt capability. Since we are not clairvoyant we can only solve the problem you present in the question, you might want to provide some more details if you want better answers. The processor you are using might also have an IRDA controller that can operate in low power mode. \$\endgroup\$ Commented Oct 30, 2017 at 23:58

1 Answer 1

1
\$\begingroup\$

You can use this website to calculate what your fuses should be: http://www.engbedded.com/fusecalc/

\$\endgroup\$
1
  • \$\begingroup\$ Ok thank you but I still do not understand why is my atmega8a working 100 times slower than it should. The code was compiled for an atmega8 chip with 1MHz internal clock. And the moust weard thing is that if I upload a Blink sketch with this parametrs it is workink OK but if I upload more complex code with timer usage my delay functions start working very unstable. \$\endgroup\$
    – Coder_fox
    Commented Nov 1, 2017 at 14:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.