W takim wypadku potrzebujemy WinAVR:
http://sourceforge.net/projects/winavr/files/WinAVR/20100110/WinAVR-20100110-install.exe/download
Zapewne wypakuje się do standardowej lokalizacji
C:\WinAVR-20100110 i aby ułatwić sprawę wypakujmy plik hex z programem przedwzmacniacza do folderu
C:\WinAVR-20100110\bin. Otwieramy
start menu, wpisujemy
cmd w pole wyszukiwania i klikamy enter. Powinna otworzyć się konsola w której wpisujemy
cd C:\WinAVR-20100110\bin w celu przejście do folderu z programem
avrdude. Zakładam tutaj, że program przedwzmacniacza rozpakowaliśmy do podanego wcześniej folderu z nazwą np.
preamp.hex.
Zakładam, że programator to najtańszy
usbasp więc po pierwszym jego podłączeniu (sterowniki muszą być zainstalowane) warto sprawdzić czy komunikacja z nim jest możliwa:
Kod:
avrdude -c usbasp -p m32 -F
Nawet jak procesora nie ma, to powinno pokazać się coś takiego:
Kod:
avrdude: error: programm enable: target doesn't answer. 1
avrdude: initialization failed, rc=-1
avrdude: AVR device initialized and ready to accept instructions
avrdude: Device signature = 0x000000
avrdude: Yikes! Invalid device signature.
avrdude done. Thank you.
Jeśli pokaże się coś takiego:
Kod:
avrdude: error: could not find USB device "USBasp" with vid=0x16c0 pid=0x5dc
To mamy problem. Sterowniki nie zostały poprawnie zainstalowane.
Teraz podłączony poprawnie programator do przedwzmacniacza i sprawdzamy tą samą komendę. Tym razem powinno pojawić się coś takiego:
Kod:
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.03s
avrdude: Device signature = ...
avrdude: safemode: Fuses OK
avrdude done. Thank you.
Tego kroku nie trzeba wykonywać jeśli już mamy poprzednią wersję oprogramowania wgraną przez
taz'a. Chodzi oczywiście o ustawienie fuse-bitów, które są już ustawione w Waszym wypadku.
Kod:
avrdude -c usbasp -p m32 -F -U lfuse:w:0xff:m -U hfuse:w:0xd9:m
Powinno się pokazać:
Kod:
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.04s
avrdude: Device signature = 0x1e9514
avrdude: Expected signature for ATMEGA328P is 1E 95 0F
avrdude: reading input file "0xff"
avrdude: writing lfuse (1 bytes):
Writing | ################################################## | 100% 0.01s
avrdude: 1 bytes of lfuse written
avrdude: verifying lfuse memory against 0xff:
avrdude: load data lfuse data from input file 0xff:
avrdude: input file 0xff contains 1 bytes
avrdude: reading on-chip lfuse data:
Reading | ################################################## | 100% 0.01s
avrdude: verifying ...
avrdude: 1 bytes of lfuse verified
avrdude: reading input file "0xd9"
avrdude: writing hfuse (1 bytes):
Writing | ################################################## | 100% 0.01s
avrdude: 1 bytes of hfuse written
avrdude: verifying hfuse memory against 0xd9:
avrdude: load data hfuse data from input file 0xd9:
avrdude: input file 0xd9 contains 1 bytes
avrdude: reading on-chip hfuse data:
Reading | ################################################## | 100% 0.01s
avrdude: verifying ...
avrdude: 1 bytes of hfuse verified
avrdude: safemode: Fuses OK
avrdude done. Thank you.
Przejdźmy teraz do załadowania programu:
Kod:
avrdude -c usbasp -p m32 -F -U flash:w:preamp.hex
Otrzymuje wiadomość:
Kod:
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.04s
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 "preamp.hex"
avrdude: input file preamp.hex auto detected as Intel Hex
avrdude: writing flash (17368 bytes):
Writing | ################################################## | 100% 129.31s
avrdude: 17368 bytes of flash written
avrdude: verifying flash memory against preamp.hex:
avrdude: load data flash data from input file preamp.hex:
avrdude: input file preamp.hex auto detected as Intel Hex
avrdude: input file preamp.hex contains 17368 bytes
avrdude: reading on-chip flash data:
Reading | ################################################## | 100% 98.34s
avrdude: verifying ...
avrdude: 17368 bytes of flash verified
avrdude: safemode: Fuses OK
avrdude done. Thank you.
Generalnie to tyle, program załadowany.