Odd problem with ATMega328 and Uno Bootloader

91 views
Skip to first unread message

Ian Chilton

unread,
Nov 14, 2012, 10:52:14 AM11/14/12
to nanode...@googlegroups.com
Hi,

Got an odd problem, I wonder if anyone has seen before or had any insight into.

I have a few boards using Wi-Node PCB's.

Some have the 3.3v voltage regulator on. Others were for powering from
batteries, so rather than waste a precious 3.3v regulator just for
programming, I took a 1N4148 diode and placed it from pin 2 of the
ftdi connector (3.3v) across to the Vcc line where one of the
capacitors is normally.

These boards all work fine with the Nanode supplied ATMega328P-PU's
with the old Duemilanove bootloader.

However, I recently got a few ATMega328P-PU's from ebay, which come
with the Uno bootloader on.

The new Uno bootloader chips work fine in the Wi-nodes with the
regulators on, but will not program or run existing code on the boards
without.

Anyone come across this before?

I know there are 2x variables here - the ebay chips, and the Uno bootloader.

I plan on upgrading some of the Nanode chips with the Uno bootloader,
so it's only the power source that is different to try and narrow it
down, but I need to rig up an AVR programmer.

The only thing I can think of is that 3.3v from the programming
adapter, minus the loss through a diode, isn't enough to power either
those specific chips, or chips with the Uno bootloader...

Thanks,

Ian

Nigel Worsley

unread,
Nov 14, 2012, 11:33:10 AM11/14/12
to nanode...@googlegroups.com
The ATMega has a programmable brownout reset threshold, maybe this has
been set a little higher on the problem chips?

Nigle

Ian Chilton

unread,
Nov 14, 2012, 11:51:07 AM11/14/12
to nanode...@googlegroups.com
Ahh, good point.

Thinking about it, I seem to remember Ken talking about brownout
before - I wonder if the Nanode ones have been programmed with a lower
brownout?

Ken?

I might try bypassing the diode so it's getting the full 3.3v and see
if that helps.

Thanks,

Ian

Ken Boak

unread,
Nov 14, 2012, 11:58:30 AM11/14/12
to nanode...@googlegroups.com
Ian
 
May be a red herring - but I found that some ICs would fail to program when running on a 3V3 supply.
 
I indirectly found this out when programming a ATmega1284, which failed to program with Vcc=3.3V but was perfectly happy at Vcc=5V.
 
If you use the original duemilanove bootloader the brownout will be set to 2.7V - which is a bit close for comfort for an ICrunning on a 3V3 supply.
 
 
Ken

Ian Chilton

unread,
Nov 14, 2012, 12:06:44 PM11/14/12
to nanode...@googlegroups.com
Hi Ken,

Interesting, but it wouldn't run the code already programmed to them
in a board with a regulator either.

Is there any way of getting the current brownout value from the chip??

Thanks,

Ian

Nathan Chantrell

unread,
Nov 14, 2012, 8:41:36 PM11/14/12
to nanode...@googlegroups.com
It does sounds like the BOD might be the problem, it's easy enough to change to 1.8V

edit hardware/arduino/boards.txt and change:

uno.bootloader.extended_fuses=0x05
to
uno.bootloader.extended_fuses=0x06

and burn the Uno bootloader again.

Cheers,
Nathan

Ian Chilton

unread,
Nov 15, 2012, 10:51:47 AM11/15/12
to nanode...@googlegroups.com
Hi,

Ah, cool - thanks.

Is there a way to read the current BOD from the chip? (avrdude?)

I tried last night, replacing the diode with a wire link, and it does
work now, so i'm pretty sure it was BOD.

What I want to find out though is why those chips were different to
the older ones - whether it's the Uno bootloader defaults to a higher
BOD, there is something different in the IC's, or whether Ken programs
the Nanode chips with a lower BOD when he does the bootloader....

(Just trying to get my USBtinyISP programmer to work from the Arduino
IDE in Linux - currently it's only working from avrdude as root, even
after doing the udev stuff suggested elsewhere...)

Thanks,

Ian

Cam

unread,
Nov 15, 2012, 11:01:31 AM11/15/12
to nanode...@googlegroups.com
Hi Ian,

Have you seen this: http://www.gammon.com.au/forum/?id=11653

Cheers,

Cam

Ian Chilton

unread,
Nov 16, 2012, 5:01:26 AM11/16/12
to nanode...@googlegroups.com
Hi Cam,

That looks very interesting - thank you!

Ian
Reply all
Reply to author
Forward
0 new messages