The AVR mcu has the fuse byte but we do not see it at the arduino operation with the original state intact ordinarily. It to configure the operating state of the chip. If you are developing the AVR microcontroller in the native state with the ATMEL Studio, In rare cases it may inadvertently would rewrite the fuse bit. If its operation would rewrite the bits related to the reset vector for the clock source and the boot loader, the MCU cannot not be able to communicate with the outside by ISP or it is no longer able to be the ISP programming. At the Arduino IDE, it will take a error for the sketch writing such as below.
avrdude: stk500_recv(): programmer is not responding
This error will appear when the boot loader written into the ATmega328 chip of Arduino does not respond. There are various causes. Even if the fuse bytes of ATmega328 is not consistent with the circuit of Arduino and the chip itself does not start, it will occur such errors. When it happen, it will not be able to return the original state of the chip by the serial programming method because the chip itself is locked. it cannot be written the boot loader. But the chip can be used if undo the fuse bytes because it not been destroyed yet. In order to do this you need to write an 8-bit parallel the fuse bytes while applying a voltage of +12V.
ATmega88/168/328 datasheet has described high-voltage parallel programming specification and the chip will be a good state by writing the correct value of the fuse in accordance with the procedure. To do this you must have some kind of circuit and software for writing the fuse.
ATmega88 High-voltage parallel fuse writer for Arduino is the shield and sketch for the high-voltage parallel fuse write.
- Supports ATmega88A/88PA/168A/168PA/328/328P 28pin DIP
- Arduino shield (required Arduino Uno)
- Interactively manipulating using the serial communication from the PC
- Arduino as ISP also can be used as a writer shield (Switch the fuse writer and ISP writer by slide switch on the shield)
Also, it has the following features as a high-voltage parallel fuse writer.
- Fuse byte and extended fuse byte read / write
- Fuse byte write for Arduino boot loader
- Lock bit read / write
- Chip erase
The circuit is simple. It has the charge-pump to generate +12V from Arduino +5V for parallel programming, also it has 2-Ch analog multiplexer to select ISP writer or high-voltage programmer. The charge-pump MC34063 is used but you can use the second source device as NJM2360. Gate selection terminal of analog multiplexer has led to +5V/GND selectable of the slide switch and the RESET of ATmega88 chip should be the target. When the gate +5V is selected, the all signal lines necessary to the parallel programming connect to Arduino and the target chip. And when the gate GND is selected, the signal lines for Arduino ISP connect to the target chip.
It operates in the only one sketch if you want to use as Arduino as ISP writer also if you use as a high-voltage parallel programmer too. Arduino sketch of high-voltage parallel programmer consists of three modules.
- ISPFuseRescue: The Main sketch
- FuseRescue: High voltage parallel programming sketch
- ArduinoISP: Arduino as ISP sketch (Example sketch itself that comes with the Arduino IDE)
ISPFuseRescue sketch would be stored into the sketch folder of Arduino, also FuseRescure and ArduinoISP stores to user library folder of Arduino.
At first, you compile ISPFuseRescure and write to Arduino Uno that will be used to the writer. After that, set the high-voltage parallel fuse writer shield on the Arduino Uno and it connect with PC by USB serial.
L : The lower fuse byte write H : The upper fuse byte write X : The extended fuse byte write K : Lock bit write W : Default (factory value) fuse byte write A : Arduino fuse byte write E : Chip erase V : Verify the fuse byte or lock-bit
If you want ATmega328 behavior as Arduino, you will need to specify a clock source and a boot loader in the fuse bytes. Its value has been described in the
<Arduino system folder>\hardware\arduino\avr\boards.txt
file. (Path in the case of Arduino IDE 1.6.0)
uno.bootloader.low_fuses=0xFF uno.bootloader.high_fuses=0xDE uno.bootloader.extended_fuses=0x05 uno.bootloader.unlock_bits=0x3F uno.bootloader.lock_bits=0x0F
You can not operate the switch for changing High-voltage parallel fuse writer and the ISP writer while connect with PC by USB. It is short-circuited. Changing operation must be in the state where power is not supplied.
C1 330μ Aluminum Electrolytic Capacitor SMD Φ6.3mm x 7.7mm C2 100μ Aluminum Electrolytic Capacitor SMD Φ8.0mm x 10.2mm C3 680pF Ceramic Capacitor 2012 SMD C4 0.1μF Ceramic Capacitor 2012 SMD C5 22pF Ceramic Capacitor 1608 SMD C6 22pF Ceramic Capacitor 1608 SMD C7 0.1μF Ceramic Capacitor 2012 SMD C8 0.1μF Ceramic Capacitor 2012 SMD D1 RSX101VA-30TR Shottky Barrier Diode TUMD2 PGM Green LED 2012 SMD PWR Green LED 2012 SMD ERR Red LED 2012 SMD HB Yellow LED 2012 SMD RX Yellow LED 2012 SMD TX Yellow LED 2012 SMD IC1 74HC4053 ANALOG MULTIPLEXER TSSOP-16 IC2 74HC4053 ANALOG MULTIPLEXER TSSOP-16 L1 100μH Inductor 3225 SMD Q1 SI6544DQ N- and P-Channel MOSFET TSSOP-8 Q2 16MHz Crystal HS-49/S R1 1Ω Registor 2012 SMD R2 1Ω Registor 2012 SMD R3 200Ω Registor 2012 SMD R4 1.1KΩ Registor 2012 SMD R5 100KΩ Registor 2012 SMD R6 130kΩ Registor 2012 SMD R7 3.3KΩ Registor 2012 SMD R8 10KΩ Registor 2012 SMD R9 15KΩ Registor 2012 SMD R10 10KΩ Registor 2012 SMD R11 1KΩ Registor 2012 SMD R12 1KΩ Registor 2012 SMD R13 1KΩ Registor 2012 SMD R14 1KΩ Registor 2012 SMD R15 1MΩ Registor 2012 SMD R16 1KΩ Registor 2012 SMD R17 1KΩ Registor 2012 SMD R18 1KΩ Registor 2012 SMD R19 10KΩ Registor 2012 SMD R20 10KΩ Registor 2012 SMD R21 10KΩ Registor 2012 SMD S1 SS-22SDP2 On-On Double Pole slide switch NKK SS22SDP2 S2 RESET Tactile Switch T1 2SC4116 NPN Transistor SOT-23(SC-70) T2 2SC4116 NPN Transistor SOT-23(SC-70) U2 MC34063ADG Charge-pump DC-DC converter SIOC-8 U3 IC-socket 28pin IC Socket 300MIL DIP