problems after burning bootloaders and fuses

Hi there,

I have an arduino nano 328,

i have been conducting some experiments, trying to get the arduino nano to run from 3.3v with an internal clock.

in a future project i will be using a stand along ATmega328 TQFP chip, and i am using the nano for test purposes.

i used the arduino breadboard bootloader, and used the following fuse bits:

atmega328bb.bootloader.low_fuses=0xE2
atmega328bb.bootloader.high_fuses=0xDA
atmega328bb.bootloader.extended_fuses=0x07

now i burnt the bootloader using my AVRISP MkII, everything went well and the nano would run on a single coin cell and blink its status light.

but i put an LED on pin 12, and changed the blink example to use pin 12 (all three instances of the pin number btw) and it didn't work. the LEDs were already there from a previous project and worked fine before i started messing with bootloaders and fuses.

the bink sketch didn't work on pin 11 or pin 2. those are the pins i have tested so far because they already had LEDs on them. the only pin that seems to work at the moment is pin 13,

when i am programming the arduino via the AVRISP, the LEDs on pins 11, 12 and 13 flash, which means they are not broken, it also suggests that those pins on the ATmega, do work (unless there is a difference between using the pins as an output and programming the chip with them)

i have tried several different boot loaders, even putting it back to the original nano bootloader, but it still doesn't work.

the chip itself seems to be working, pin 13, blinks every second, i can use the serial examples and talk to the chip via the USB port, no problems,

it just seems that the IOs are not working, i also have a switch on pin 9 which has a pull up resistor, the switch drives it low, the multimeter proves the switch is working and the pin is seeing a difference when the button is pushed, but serial debugging says the pin is always low even when the button is not pushed.

what i would like to know is, is there any way to damage a chip in this way? what could i have done? i don't want to repeat the tests on another arduino in case i "brick" that one too.

any help would be really great, thanks!

Several of the pins you mention are SPI pins and might be affected by having something connected to the ICSP connector. Can you confirm that when you run these tests you have nothing at all connected except the power supply and the LED + resistor? Have you also tested with some digital pins that don't have any other associated functions? If not, I suggest you do that.

PeterH:
Several of the pins you mention are SPI pins and might be affected by having something connected to the ICSP connector. Can you confirm that when you run these tests you have nothing at all connected except the power supply and the LED + resistor? Have you also tested with some digital pins that don't have any other associated functions? If not, I suggest you do that.

thanks for the reply,

i was thinking that as well, but i detached the programmer and ran it directly from a coin battery, no luck, same from running it from the USB, or powering it from the programmer.

also i tried the LED on digital pin 2, analog 2 and analog 5 but no luck

the weird one is pin 12, because that works with some code and not with others, doesn't work with the blink sketch, and as far as i can tell its nothing to do with the SPI

Are you able to communicate serially with your Nano? Do you upload the sketch over the USB or using the programmer? What bootloader did you install on your Arduino?

pylon:
Are you able to communicate serially with your Nano? Do you upload the sketch over the USB or using the programmer? What bootloader did you install on your Arduino?

i can communicate serially, i uploaded the ASCII Table, example sketch and it returned a table with no errors in the serial window. that was via USB and the on board FTDI

I can't actually upload code via the USB any more, it seems like the arduino does not go into reset via USB, the program continues to run and the RX light flashes a few times, and then i get an "out of sync" error in the IDE. but i can program fine via the AVRISP and i can communicate serially via USB fine

the bootloader i installed was the breadboard version: http://arduino.cc/en/Tutorial/ArduinoToBreadboard

the one in the minimal example labeled breadboard.zip

but i changed the "boards.txt" file to:

atmega328bb.bootloader.low_fuses=0xE2
atmega328bb.bootloader.high_fuses=0xDA
atmega328bb.bootloader.extended_fuses=0x07

i made sure to put each section on a new line when editing in note pad as i know that causes errors in the IDE.

These fuses enable the internal 8MHz oscillator, so are you using the minimal circuit as described in the lower port of the tutorial page?

Why did you disable the brownout detection?

Have you checked the voltage of the Vcc pin? What do you get?

pylon:
These fuses enable the internal 8MHz oscillator, so are you using the minimal circuit as described in the lower port of the tutorial page?

Why did you disable the brownout detection?

Have you checked the voltage of the Vcc pin? What do you get?

its an arduino nano, so its not the minimum circuit, but my understanding is that by disabling the external oscillator, it turns the Xtl pins into I/O pins so the fact that there is still a crystal on it, shouldn't make any difference.

i disabled the brown out detection to get the arduino to run on a coin cell battery, if the brown out detection is active then it will hold the arduino in reset if the voltage is too low.

the voltage from the coin cell is 3.2v with no load, at Vcc its about 2.8v

Are you running your tests on the coin battery? What type is it? How have you connected that battery to the Nano?

pylon:
Are you running your tests on the coin battery? What type is it? How have you connected that battery to the Nano?

the tests are on all power supplies, AVRISP, USB and the coin cell. the coin cell is a 1220, but i have tried a CR2032, the battery is connected to the 5v pin, but i have also tried it on Vin, and 3.3v

the results are all the same, all power supplies and power input points will start the arduino and run the program, the problem is that the pins are not responding like they should.

unless there is a difference between using the pins as an output and programming the chip with them

There are. If you overloaded the outputs (put too much current on them) you may have destroyed the output drivers but the SPI hardware may have survived that. You may also destroy the GPIO's when accessing them with 5V while you drive the chip with 3V. Is it possible that this happened?

but i have tried a CR2032

The max. current you should draw from a CR2032 is 10mA, an UNO draws over 30mA (the Nano is probably a bit lower) so driving the processor and an LED is too much for the cell.
For a CR1220 the max. current rating is only 2.5mA so forget driving an Arduino with them.

pylon:

unless there is a difference between using the pins as an output and programming the chip with them

There are. If you overloaded the outputs (put too much current on them) you may have destroyed the output drivers but the SPI hardware may have survived that. You may also destroy the GPIO's when accessing them with 5V while you drive the chip with 3V. Is it possible that this happened?

but i have tried a CR2032

The max. current you should draw from a CR2032 is 10mA, an UNO draws over 30mA (the Nano is probably a bit lower) so driving the processor and an LED is too much for the cell.
For a CR1220 the max. current rating is only 2.5mA so forget driving an Arduino with them.

the nano was fine before i burnt the new fuses, so basically it had LEDs on some of the pins and they all worked fine, there was no heavy current on any of the pins, none were grounded accidentally, they weren't back fed with 5v, so i can't see how the pins could have been damaged. also it seems to be all the pins other than pin 13, every pin i have tried, even the analog pins do not work.

the atMega doesn't draw more than a couple of mA especially at 8Mhz, but the limit of 10ma is just for the life expectancy of the battery so if the chip is only active for a few seconds per use then the battery will still last a long time. but either way it doesn't explain the problem because the problem is still there when using 5v as well

What happens if you put the fuses back to the Nano settings? Have you tried reading the fuse settings? Are they set as you expect it?

pylon:
What happens if you put the fuses back to the Nano settings? Have you tried reading the fuse settings? Are they set as you expect it?

no idea how to read the fuses, i am setting the fuses via the arduino IDE by editing the boards file. I burnt the original bootloader which i assume also burns the fuses but it still has the same problem

no idea how to read the fuses

Using avrdude (as the IDE does)? AVRDUDE: 2.2 Programmers accepting extended parameters

I burnt the original bootloader which i assume also burns the fuses but it still has the same problem

I'd assume the same. If the fuses really got written correctly (check that by reading them) I'm out of ideas, sorry!

pylon:

no idea how to read the fuses

Using avrdude (as the IDE does)? AVRDUDE: 2.2 Programmers accepting extended parameters

I burnt the original bootloader which i assume also burns the fuses but it still has the same problem

I'd assume the same. If the fuses really got written correctly (check that by reading them) I'm out of ideas, sorry!

i will check the fuse reading thing, see if that explains anything,

thanks very much for the help, i will keep at this problem, maybe try another nano and see if it happens again or if it was a bad chip maybe