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.
What does it do?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.
UsageAt 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
The fuse byte for ArduinoIf 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
Caution!!!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.
Comments