- Download the avrusb500v2-1.5.tar.gz package from http://tuxgraphics.org/common/src2/article07052/ and save it on a USB key
- Make a CD from the iso image systemrescuecd-x86-2.8.1.iso and boot on it
- Wait until the system has fully booted and then insert your USB key with the avrusb500v2-1.5.tar.gz software.
- Type "dmesg | tail -25" to see the name of the disk that the USB key is connected to (sda1, sdb1, sdc1,...)
root@sysresccd /root % dmesg | tail -25
[ 88.429682] ftdi_sio: v1.6.0:USB FTDI Serial Converters Driver
[ 113.499043] usb 2-1.2: new high-speed USB device number 4 using ehci_hcd
[ 113.589441] usb 2-1.2: New USB device found, idVendor=13fe, idProduct=3600
[ 113.589451] usb 2-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 113.589457] usb 2-1.2: Product: USB DISK Pro
[ 113.589462] usb 2-1.2: Manufacturer:
[ 113.589466] usb 2-1.2: SerialNumber: 90B70500E94F10E8
[ 115.402609] Initializing USB Mass Storage driver...
[ 115.402805] usb-storage 2-1.2:1.0: Quirks match for vid 13fe pid 3600: 4000
[ 115.402861] scsi6 : usb-storage 2-1.2:1.0
[ 115.403145] usbcore: registered new interface driver usb-storage
[ 115.403154] USB Mass Storage support registered.
[ 116.426626] scsi 6:0:0:0: Direct-Access USB DISK Pro PMAP PQ: 0 ANSI: 0 CCS
[ 116.428685] sd 6:0:0:0: Attached scsi generic sg2 type 0
[ 117.167611] sd 6:0:0:0: [sdb] 7831552 512-byte logical blocks: (4.00 GB/3.73 GiB)
[ 117.168857] sd 6:0:0:0: [sdb] Write Protect is off
[ 117.168867] sd 6:0:0:0: [sdb] Mode Sense: 23 00 00 00
[ 117.170074] sd 6:0:0:0: [sdb] No Caching mode page present
[ 117.170080] sd 6:0:0:0: [sdb] Assuming drive cache: write through
[ 117.175213] sd 6:0:0:0: [sdb] No Caching mode page present
[ 117.175222] sd 6:0:0:0: [sdb] Assuming drive cache: write through
[ 117.191274] sdb: sdb1
[ 117.195893] sd 6:0:0:0: [sdb] No Caching mode page present
[ 117.195903] sd 6:0:0:0: [sdb] Assuming drive cache: write through
[ 117.195910] sd 6:0:0:0: [sdb] Attached SCSI removable disk
#
The disk (or device) is in the above example sdb1
- Make a mount-point and mount the usb key:
mkdir /mnt/usbka
mount /dev/sdb1 /mnt/usbka
Copy the avrusb500v2-1.5.tar.gz file from the usb key to /root:
cp /mnt/usbka/avrusb/avrusb500v2-1.5.tar.gz /root
Un-mount the usb key and then take it out:
umount /mnt/usbka
- Un-pack avrusb500v2-1.5.tar.gz:
cd /root
tar zxvf avrusb500v2-1.5.tar.gz
Go into the directory that was created while unpacking:
cd avrusb500v2-1.5
- Insert the avrusb500 key in the usb port of your computer and
insert a wire bridge in the avrusb500 key to enable flashing of
the firmware:
- Test that flashing would work by checking if the fuses can be read (command make rdfuse):
root@sysresccd /root/avrusb500v2-1.5 make rdfuse
./bin/uisp_bbpg -dprog=bbpg --rd_fuses -dt_sck=1000
OK: bitbang mode on
NOTE: bbpg is a bit slow. Be patient....
Atmel AVR ATmega8 is found.
Fuse Low Byte = 0xae
Fuse High Byte = 0xc9
Fuse Extended Byte = 0xff
Calibration Byte = 0xa9 -- Read Only
Lock Bits = 0xff
BLB12 -> 1
BLB11 -> 1
BLB02 -> 1
BLB01 -> 1
LB2 -> 1
LB1 -> 1
disabling bitbang mode...
For correct operation of the avrusb500 v2 the fuses should be set
as follows. Please compare them with the above readings from your
atmega8:
Low Byte = 0xae (factory default=0xe1)
High Byte = 0xc9 (factory default=0xd9)
Extended Byte = 0xff (default)
Lock Bits = 0xff (default)
#
- Flash the firmware (command make load_pre takes about 30min):
root@sysresccd /root/avrusb500v2-1.5 make load_pre
./bin/uisp_bbpg --erase -dprog=bbpg -v=3
OK: bitbang mode on
NOTE: bbpg is a bit slow. Be patient....
SCK Delay (t_sck): 50
Reset inactive time (t_reset) 1000 us
AVR Direct Parallel Access succeeded after 31 retries.
Vendor Code: 0x1e
Part Family: 0x93
Part Number: 0x07
Atmel AVR ATmega8 is found.
Page Write Enabled, size=64
FLASH Write Delay (t_wd_flash): 12500 us
EEPROM Write Delay (t_wd_eeprom): 25000 us
Erasing device ...
Reinitializing device
AVR Direct Parallel Access succeeded after 31 retries.
Vendor Code: 0x1e
Part Family: 0x93
Part Number: 0x07
Atmel AVR ATmega8 is found.
Page Write Enabled, size=64
FLASH Write Delay (t_wd_flash): 12500 us
EEPROM Write Delay (t_wd_eeprom): 25000 us
disabling bitbang mode...
./bin/uisp_bbpg --upload if=avrusb500_pre.hex -dprog=bbpg -v=3 --hash=8 --verify -dno-poll -dt_sck=1000
OK: bitbang mode on
NOTE: bbpg is a bit slow. Be patient....
SCK Delay (t_sck): 1000
Reset inactive time (t_reset) 1000 us
AVR Direct Parallel Access succeeded after 31 retries.
Vendor Code: 0x1e
Part Family: 0x93
Part Number: 0x07
Atmel AVR ATmega8 is found.
Page Write Enabled, size=64
FLASH Write Delay (t_wd_flash): 12500 us
EEPROM Write Delay (t_wd_eeprom): 25000 us
Uploading: flash
###############################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
(total 4720 bytes transferred in 715.27 s (7 bytes/s)
Verifying: flash
###############################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
(total 4720 bytes transferred in 703.15 s (7 bytes/s)
disabling bitbang mode...
echo "OK: set high fuse to 0xc9 (full swing cryst)..."
OK: set high fuse to 0xc9 (full swing cryst)...
./bin/uisp_bbpg -dprog=bbpg --wr_fuse_h=0xc9
OK: bitbang mode on
NOTE: bbpg is a bit slow. Be patient....
Atmel AVR ATmega8 is found.
Fuse High Byte set to 0xc9
disabling bitbang mode...
echo "OK: set lower fuse to 0xAE (external crystal and BOD on atmega8)..."
OK: set lower fuse to 0xAE (external crystal and BOD on atmega8)...
./bin/uisp_bbpg -dprog=bbpg --wr_fuse_l=0xae
OK: bitbang mode on
NOTE: bbpg is a bit slow. Be patient....
Atmel AVR ATmega8 is found.
Fuse Low Byte set to 0xae
disabling bitbang mode...
Please disconnect the usb cable and re-connect again
#
- That's it. Take the avrusb500 key out and remove the wire bridge. Reboot your PC.