Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
spiffchorder:using_the_atmega8 [2009/05/04 15:04] – created priestdo | spiffchorder:using_the_atmega8 [2023/02/09 23:32] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 3: | Line 3: | ||
If you build your SpiffChorder with an ATmega8 instead of the ATmega168 you will need to make one or two changes to the Makefile. | If you build your SpiffChorder with an ATmega8 instead of the ATmega168 you will need to make one or two changes to the Makefile. | ||
- | If you like me, build the hex file, then program by using avrdude or some other program directly, you only need to make the first change below. | + | If you like me, build the hex file, then program by using avrdude or some other program directly, |
- | ===== Makefile changes ===== | + | ===== 1 Makefile changes ===== |
- | ==== 1 - Change the MCU name ==== | + | ==== 1.1 Change the MCU name ==== |
Where for the ATmega168 it says: | Where for the ATmega168 it says: | ||
Line 20: | Line 20: | ||
</ | </ | ||
- | ==== 2 - Change the fuse settings ==== | + | ==== 1.2 Change the fuse settings ==== |
If you are not using the usb bootloader and want to use the Makefile to program your chip, you will also need to change the fuse settings in the Makefile as follows. | If you are not using the usb bootloader and want to use the Makefile to program your chip, you will also need to change the fuse settings in the Makefile as follows. | ||
Line 33: | Line 33: | ||
$(AVRDUDE) $(AVRDUDE_FLAGS) -U hfuse: | $(AVRDUDE) $(AVRDUDE_FLAGS) -U hfuse: | ||
</ | </ | ||
+ | |||
+ | ===== 2 Fuse Settings For the ATmega8 ===== | ||
+ | |||
+ | | | ||
+ | ^ no bootloader| | ||
+ | ^ usb bootloader| | ||
+ | |||
+ | |||
+ | ===== 3 Prebuilt code with bootloader ===== | ||
+ | |||
+ | If you want to start by downloading a known working hexfile with the usb bootloader on it which you can then change by downloading your new program over the usb connection to your spiffchorder, | ||
+ | |||
+ | |||
+ | ==== 3.1 Known working Spiffchorder for ATmega8 with usb bootloader in place ==== | ||
+ | |||
+ | |||
+ | ^Known working spiffchorder for ATmega8|{{spiffchorder: | ||
+ | ^ MD5 checksum| dc681522d0af047330e82347b6343b34 | ||
+ | |||
+ | ==== 3.2 avrdude commands for above ATmega8 hex file ==== | ||
+ | |||
+ | When loading a hex image on to the atmega8 do: | ||
+ | |||
+ | avrdude -p m8 -c avrusb500 -e -U flash: | ||
+ | avrdude -p m8 -c avrusb500 -u -v -U hfuse: | ||
+ | avrdude -p m8 -c avrusb500 -u -v -U lfuse: | ||
+ | |||
+ | You will need to change the ``-c avrusb500`` to match your programmer. | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | --- // | ||