upload
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

POWER.txt 2.0KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. Time to Sleep
  2. =============
  3. USB suspend no activity on USB line for 3ms
  4. No Interaction no user interaction
  5. matrix has no change
  6. matrix has no switch on
  7. AVR Power Management
  8. ====================
  9. V-USB suspend
  10. USB suspend
  11. http://vusb.wikidot.com/examples
  12. MCUSR MCU Status Register
  13. WDRF Watchdog Reset Flag
  14. BORF
  15. EXTRF
  16. PORF Power-on Reset Flag
  17. SMCR Sleep Mode Control Register
  18. SE Sleep Enable
  19. SM2:0
  20. #define set_sleep_mode(mode) \
  21. #define SLEEP_MODE_IDLE (0)
  22. #define SLEEP_MODE_ADC _BV(SM0)
  23. #define SLEEP_MODE_PWR_DOWN _BV(SM1)
  24. #define SLEEP_MODE_PWR_SAVE (_BV(SM0) | _BV(SM1))
  25. #define SLEEP_MODE_STANDBY (_BV(SM1) | _BV(SM2))
  26. #define SLEEP_MODE_EXT_STANDBY (_BV(SM0) | _BV(SM1) | _BV(SM2))
  27. ACSR Analog Comparator Control and Status Register
  28. To disable Analog Comparator
  29. ACSR = 0x80;
  30. or
  31. ACSR &= ~_BV(ACIE);
  32. ACSR |= _BV(ACD);
  33. ACD: Analog Comparator Disable
  34. When this bit is written logic one, the power to the Analog Comparator is
  35. switched off. This bit can be set at any time to turn off the Analog
  36. Comparator. This will reduce power consumption in Active and Idle mode.
  37. When changing the ACD bit, the Analog Comparator Interrupt must be disabled
  38. by clearing the ACIE bit in ACSR. Otherwise an interrupt can occur when
  39. the bit is changed.
  40. DIDR1 Digital Input Disable Register 1
  41. AIN1D
  42. AIN0D
  43. When this bit is written logic one, the digital input buffer on the AIN1/0 pin is disabled. The corresponding PIN Register bit will always read as zero when this bit is set. When an analog signal is applied to the AIN1/0 pin and the digital input from this pin is not needed, this bit should be written logic one to reduce power consumption in the digital input buffer.
  44. PRR Power Reduction Register
  45. PRTWI
  46. PRTIM2
  47. PRTIM0
  48. PRTIM1
  49. PRSPI
  50. PRUSART0
  51. PRADC