OpenSprinkler Forums OpenSprinkler Unified Firmware Programming a new Atmega328-PU Re: Re: Programming a new Atmega328-PU

#23801

Bambam
Participant

Excellent, it now works! Thank you ever so much, Ray.

1) I set the fuse bits with the following results:

c:>avrdude -c usbtiny -p m328p -B 250 -F -U lfuse:w:0xe2:m -U hfuse:w:0xd1:m -U efuse:w:0x06:m

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.09s

avrdude: Device signature = 0x1e9514
avrdude: reading input file “0xe2”
avrdude: writing lfuse (1 bytes):

Writing | ################################################## | 100% 0.08s

avrdude: 1 bytes of lfuse written
avrdude: verifying lfuse memory against 0xe2:
avrdude: load data lfuse data from input file 0xe2:
avrdude: input file 0xe2 contains 1 bytes
avrdude: reading on-chip lfuse data:

Reading | ################################################## | 100% 0.03s

avrdude: verifying …
avrdude: 1 bytes of lfuse verified
avrdude: reading input file “0xd1”
avrdude: writing hfuse (1 bytes):

Writing | ################################################## | 100% 0.09s

avrdude: 1 bytes of hfuse written
avrdude: verifying hfuse memory against 0xd1:
avrdude: load data hfuse data from input file 0xd1:
avrdude: input file 0xd1 contains 1 bytes
avrdude: reading on-chip hfuse data:

Reading | ################################################## | 100% 0.03s

avrdude: verifying …
avrdude: 1 bytes of hfuse verified
avrdude: reading input file “0x06”
avrdude: writing efuse (1 bytes):

Writing | ################################################## | 100% 0.08s

avrdude: 1 bytes of efuse written
avrdude: verifying efuse memory against 0x06:
avrdude: load data efuse data from input file 0x06:
avrdude: input file 0x06 contains 1 bytes
avrdude: reading on-chip efuse data:

Reading | ################################################## | 100% 0.03s

avrdude: verifying …
avrdude: 1 bytes of efuse verified

avrdude: safemode: Fuses OK

avrdude done. Thank you.

2. flashing the firmware


c:>avrdude -c usbtiny -p m328p -F -U flash:w:firmware1.8.3.hex

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.02s

avrdude: Device signature = 0x1e9514
avrdude: NOTE: FLASH memory has been specified, an erase cycle will be performed

To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: reading input file “firmware1.8.3.hex”
avrdude: input file firmware1.8.3.hex auto detected as Intel Hex
avrdude: writing flash (32384 bytes):

Writing | ################################################## | 100% 12.87s

avrdude: 32384 bytes of flash written
avrdude: verifying flash memory against firmware1.8.3.hex:
avrdude: load data flash data from input file firmware1.8.3.hex:
avrdude: input file firmware1.8.3.hex auto detected as Intel Hex
avrdude: input file firmware1.8.3.hex contains 32384 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 9.92s

avrdude: verifying …
avrdude: 32384 bytes of flash verified

avrdude: safemode: Fuses OK

avrdude done. Thank you.