Tuesday, May 26, 2015

BROKEN YOUR AVR CHIP?

While working the avr for the first time it is always confusing while programing the fuse bits as wrong configuration of this can damage the chip or may be lock the chip so you cannot program it normally.

If your making a bare bone arduino or burning arduino boot loader the fuse bits if programmed wrong can lock the device. This often happens due to some of the following fuse bits.
A. First thing you are being greedy of that single reset pin to use it as gpio. But you will be programming it only once as after that fuse setting to use reset as gpio avr can't be programmed using ISP as ISP programming requires external reset operations . so you need to do the high voltage programming either serial or parallel.
For the he high voltage programming you can consult the avr data sheet where it is described crystal clear and also there are many tutorials available online for this problem.




Also choosing external clock source can also result avr to not work using ISP in this case high voltage programming can be used or a external TTL clock should be used for the programming.

Heres the line copied from datasheet of high voltage programming. 

The following algorithm puts the device in Parallel (High-voltage) Programming mode:

1. Set Prog_enable pins listed in Table 28-12 on page 290 to “0000”, RESET pin to 0V and
VCC to 0V.

2. Apply 4.5V - 5.5V between VCC and GND.
Ensure that VCC reaches at least 1.8V within the next 20μs.

3. Wait 20μs - 60μs, and apply 11.5V - 12.5V to RESET.

4. Keep the Prog_enable pins unchanged for at least 10μs after the High-voltage has been
applied to ensure the Prog_enable Signature has been latched.

5. Wait at least 300μs before giving any parallel programming commands.

6. Exit Programming mode by power the device down or by bringing RESET pin to 0V.

If the rise time of the VCC is unable to fulfill the requirements listed above, the following alternative
algorithm can be used.

1. Set Prog_enable pins listed in Table 28-12 on page 290 to “0000”, RESET pin to 0V and
VCC to 0V.

2. Apply 4.5V - 5.5V between VCC and GND.

3. Monitor VCC, and as soon as VCC reaches 0.9V - 1.1V, apply 11.5V - 12.5V to RESET.

4. Keep the Prog_enable pins unchanged for at least 10μs after the High-voltage has been
applied to ensure the Prog_enable Signature has been latched.

5. Wait until VCC actually reaches 4.5V - 5.5V before giving any parallel programming
commands.

6. Exit Programming mode by power the device down or by bringing RESET pin to 0V.



No comments:

Post a Comment