Line 1... |
Line 1... |
1 |
#!/bin/bash |
1 |
#!/bin/bash |
2 |
# ATprogISPUSB02A fash script |
2 |
# ATprogISPUSB02A fash script |
3 |
# Uses STK500v2 Programmer |
3 |
# Uses STK500v2 Programmer or another functioning ATprogISPUSB02A module. |
4 |
#echo "WARNING: Enables external clock. Make sure a crystal is connected to the ATmega8535! \ |
4 |
#echo "WARNING: Enables external clock. Make sure a crystal is connected to the ATmega8535! \ |
5 |
#Connect a programmer to the ATprogISPUSB02A and set a 'ISP SELECTION' jumper (J4) to 'internal' (1-2)" |
5 |
#Connect a programmer to the ATprogISPUSB02A and set a 'ISP SELECTION' jumper (J4) to 'internal' (1-2)" |
6 |
avrdude -p atmega8535 -P /dev/ttyUSB0 -c stk500v2 -B 50 -v -U lfuse:w:0xff:m -U hfuse:w:0xdb:m |
6 |
avrdude -p atmega8535 -P /dev/ttyUSB0 -c stk500v2 -B 50 -v -U lfuse:w:0xff:m -U hfuse:w:0xdb:m |
7 |
avrdude -p atmega8535 -P /dev/ttyUSB0 -c stk500v2 -B 50 -U flash:w:stk500.hex:a |
7 |
avrdude -p atmega8535 -P /dev/ttyUSB0 -c stk500v2 -B 50 -U flash:w:stk500.hex:a |
8 |
echo "If none errors above - Please set 'ISP SELECTION' jumper (J4) to 'normal' (2-3) position." |
8 |
echo "If none errors above - Please set 'ISP SELECTION' jumper (J4) to 'normal' (2-3) position." |