Add support for ATmega168p CPU
[pub/USBasp.git] / firmware / Makefile
index cdf9d0b..d80018f 100755 (executable)
@@ -9,6 +9,9 @@
 # TARGET=atmega8    HFUSE=0xc9  LFUSE=0xef F_CPU=12000000
 # TARGET=atmega8    HFUSE=0xc9  LFUSE=0xef F_CPU=16000000
 # TARGET=atmega48   HFUSE=0xdd  LFUSE=0xff
+# TARGET=atmega168  HFUSE=0xdd  LFUSE=0xef EFUSE=0x01 F_CPU=12000000
+# TARGET=atmega168  HFUSE=0xdd  LFUSE=0xef EFUSE=0x01 F_CPU=16000000
+# TARGET=atmega168  HFUSE=0xdd  LFUSE=0xe7 EFUSE=0x01 F_CPU=18000000
 # TARGET=atmega328  HFUSE=0xd9  LFUSE=0xef EFUSE=0x05 F_CPU=12000000
 # TARGET=atmega328  HFUSE=0xd9  LFUSE=0xef EFUSE=0x05 F_CPU=16000000
 # TARGET=atmega328  HFUSE=0xd9  LFUSE=0xe7 EFUSE=0x05 F_CPU=18000000
@@ -138,6 +141,33 @@ avrdude:
 # 0xe0 = divide/1,no clock output,fast raising power,external Oszil.
 # 0xff = divide/1,no clock output,slow raising power,low Pw Oszil 8..  Mhz
 #
+# Fuse atmega168p high byte hfuse:
+# 0xdf = 1 1 0 1   1 1 1 1     factory setting
+#        ^ ^ ^ ^   ^ \-+-/
+#        | | | |   |   +------ BODLEVEL (Brown out disabled)
+#        | | | |   + --------- EESAVE (don't preserve EEPROM over chip erase)
+#        | | | +-------------- WDTON (WDT not always on)
+#        | | +---------------- SPIEN (allow serial programming)
+#        | +------------------ DWEN (debug wire is disabled)
+#        +-------------------- RSTDISBL (reset pin is enabled)
+# 0xdd = ext.reset, no DW, SPI, no watchdog, no save eeprom, BOD 2.7V
+# Fuse atmega168p low byte lfuse:
+# 0x62 = 0 1 1 0   0 0 1 0     factory setting
+#        ^ ^ \ /   \--+--/
+#        | |  |       +------- CKSEL 3..0 (internal 8Mhz Oszillator)
+#        | |  +--------------- SUT 1..0 (start-up time)
+#        | +------------------ CKOUT (no clock output)
+#        +-------------------- CKDIV8 (divide clock by 8)
+# 0xef = divide/1,no clock output,fast raising power,low Pw Oszil 8..  Mhz
+# Fuse atmega168p extended byte efuse:
+# 0xf9 = 1 1 1 1   1 0 0 1     factory setting
+#        \-+-+-+---/ ^ ^ ^---- BOOTRST (boot reset vector at 0x0000)
+#              ^     | +------ BOOTSZ0
+#              |     +-------- BOOTSZ1
+#              +-------------- not used
+# Note: avrdude masks not used fuse bits to zero. Therefore use only
+#       the lower three bits to define the BOOTSZx and BOOTRST
+#
 # Fuse atmega328p high byte hfuse:
 # 0xd9 = 1 1 0 1   1 0 0 1 <-- BOOTRST (boot reset vector at 0x0000)
 #        ^ ^ ^ ^   ^ ^ ^------ BOOTSZ0