Skip to content

Commit

Permalink
use ATMega328 for power switch to allow more features and debugging o…
Browse files Browse the repository at this point in the history
…utput
  • Loading branch information
breaker27 committed Jan 6, 2014
1 parent 1dda5f2 commit bcd7b4d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion firmware/shc_powerswitch/Makefile
Expand Up @@ -17,7 +17,7 @@
#

# CPU config
MCU = atmega168
MCU = atmega328
F_CPU = 8000000
UART_BAUD_RATE = 4800
#UART_DEBUG = 1
Expand Down
13 changes: 6 additions & 7 deletions firmware/shc_powerswitch/fuses.c
Expand Up @@ -20,11 +20,10 @@

FUSES =
{
// value 0xE2 - use internal oscillator with 8 MHz
.low = (FUSE_CKSEL0 & FUSE_CKSEL2 & FUSE_CKSEL3 & FUSE_SUT0),
// value 0xD6 - set EESAVE, set BOD to 1.8V to prevent accidentially
// FLASH garbage, others are default
.high = (FUSE_EESAVE & FUSE_SPIEN & FUSE_BODLEVEL0),
// should be value F9 at ATMega168
.extended = EFUSE_DEFAULT,
// value 0xE2 - disable clock divider for 8 MHz clock, the other fuses are default for ATMega328
.low = (FUSE_CKSEL0 & FUSE_CKSEL2 & FUSE_CKSEL3 & FUSE_SUT0),
// value 0xD1 - EESAVE is 0, others are default
.high = (FUSE_SPIEN & FUSE_EESAVE & FUSE_BOOTSZ1 & FUSE_BOOTSZ0),
// value 0xFD - set BOD to 2.7V to prevent accidentially FLASH garbage
.extended = FUSE_BODLEVEL1,
};
2 changes: 1 addition & 1 deletion tools/shc_e2p_editor/e2p_layout.xml
Expand Up @@ -151,7 +151,7 @@
<MaxVal>16777215</MaxVal>
</UIntValue>
<Reserved>
<Bits>3424</Bits>
<Bits>7520</Bits>
</Reserved>
</Block>
<Block>
Expand Down

0 comments on commit bcd7b4d

Please sign in to comment.