Forum Menu




 


Log in Problems?
New User? Sign Up!
AVR Freaks Forum Index

Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
societyofrobots
PostPosted: Apr 15, 2008 - 12:10 AM
Hangaround


Joined: Nov 29, 2007
Posts: 134


I forgot to put a pull-up resistor on my ATmega2560 and for design reasons it will cause me a lot of trouble to solder one on between power and reset.

Is there a pull up resistor I can turn on in software?

(couldn't find any info on this in the datasheet, so I'm thinking no, but just in case)

_________________
How do YOU make a robot?
http://www.societyofrobots.com
 
 View user's profile Send private message Visit poster's website 
Reply with quote Back to top
theusch
PostPosted: Apr 15, 2008 - 12:13 AM
10k+ Postman


Joined: Feb 19, 2001
Posts: 28907
Location: Wisconsin USA

Quote:

for design reasons it will cause me a lot of trouble to solder one on between power and reset.

You should have both those signals on the ISP header, and the pads are probably near each other.
 
 View user's profile Send private message  
Reply with quote Back to top
societyofrobots
PostPosted: Apr 15, 2008 - 12:18 AM
Hangaround


Joined: Nov 29, 2007
Posts: 134


I realize that, but:
Quote:
for design reasons it will cause me a lot of trouble to solder one on between power and reset

Mr. Green

_________________
How do YOU make a robot?
http://www.societyofrobots.com
 
 View user's profile Send private message Visit poster's website 
Reply with quote Back to top
dbc
PostPosted: Apr 15, 2008 - 12:48 AM
Resident


Joined: Jul 08, 2006
Posts: 504
Location: Sunnyvale, CA

You're being a little cryptic. But... assuming you have an ISP header (do you?) then you really don't need it when the ISP is connected, so you could solder a resister to two female pins and plug in the reset pull-up when the ISP isn't connected.
 
 View user's profile Send private message  
Reply with quote Back to top
js
PostPosted: Apr 15, 2008 - 12:52 AM
10k+ Postman


Joined: Mar 28, 2001
Posts: 22556
Location: Sydney, Australia (Gum trees, Koalas and Kangaroos, No Edelweiss)

All new chips have a weak pull up on reset anyway. The 2 pins, in a standard ISP header, are at the opposite ends. (maybe you don't need one? Use the BOD for reset)

Is the header through hole? An 1/8w resistor could be mounted under the pcb....like the good professional equipments do....

_________________
John Samperi
Ampertronics Pty. Ltd.
www.ampertronics.com.au
* Electronic Design * Custom Products * Contract Assembly
 
 View user's profile Send private message Visit poster's website 
Reply with quote Back to top
microcarl
PostPosted: Apr 15, 2008 - 01:34 AM
Raving lunatic


Joined: May 30, 2004
Posts: 8502
Location: Cincinnati, Ohio

societyofrobots wrote:
...for design reasons it will cause me a lot of trouble to solder one on between power and reset.

Evidently, you didn't study the Maga2560 data-sheet well enough!


societyofrobots wrote:
Is there a pull up resistor I can turn on in software?

(couldn't find any info on this in the datasheet, so I'm thinking no, but just in case)

Look at page 60, Figure 12.2.1. The drawing clearly shows an internal pull-up resistor connected between VCC and the RESET line.

On Page 370, Table 31.1, at the bottom of the page, it states... The internal RESET Pull-Up resistor is specified to be between 30K Ohms and 60K Ohms.

I think you've learned something for your next design, I hope.

As a suggestion...

On your next design, you might want to consider adding just a 0.1uF to 1.0uF capacitor between RESET and GND. But in addition, add a "Split Pad " style shorting jumper between the end of the capacitor that connects to RESET and RESET proper. Then, without the "Split Pad " jumper shorted, you can use ISP programming without interference by the capacitor. When the program is complete and fully debugged, you simply place a solder short across the "Split Pads " and you're good to go. I really don't think an external Pull-Up resistor is required in most cases - especially if there is a capacitor holding the RESET input steady.

_________________
Carl W. Livingston, KC5OTL
microcarl@roadrunner.com

"There are only two ways to sleep well at night... be ignorant or be prepared."

The original Dragon Slayer !

Long live the AVR!!!


Last edited by microcarl on Apr 15, 2008 - 01:39 AM; edited 2 times in total
 
 View user's profile Send private message Send e-mail  
Reply with quote Back to top
Mike B
PostPosted: Apr 15, 2008 - 01:35 AM
Raving lunatic


Joined: Jun 22, 2004
Posts: 3849
Location: South West Utah, USA

The internal pull-ups are only available on I/O Port pins. The Reset pin is not listed as an I/O Port pin on your AVR, therefore it has no software selectable internal pull-up. However, as john pointed out it does have a non-selectable internal weak pull-up. See this application note for more information:

AVR042: AVR Hardware Design Considerations
http://www.atmel.com/dyn/resources/prod ... oc2521.pdf
 
 View user's profile Send private message  
Reply with quote Back to top
societyofrobots
PostPosted: Apr 15, 2008 - 02:03 AM
Hangaround


Joined: Nov 29, 2007
Posts: 134


Unfortunately that weak pull up resistor wasn't enough on this design - it always was before so I left out adding one . . . lesson learned.

Thanks Mike, looks like I'll be soldering a resistor to a thousand boards. Yeap, you read that right! I was hoping for a simple software solution . . .

For everyone else, next time trust me when I say its not feasible Wink

_________________
How do YOU make a robot?
http://www.societyofrobots.com
 
 View user's profile Send private message Visit poster's website 
Reply with quote Back to top
tpappano
PostPosted: Apr 15, 2008 - 02:57 AM
Raving lunatic


Joined: Dec 01, 2003
Posts: 2626


Quote:
Unfortunately that weak pull up resistor wasn't enough on this design - it always was before so I left out adding one . . . lesson learned.


I'm more curious as to *why* the internal pullup isn't enough. Makes me suspect other problems with the design. Can you elaborate on the problems you are having?

Quote:
For everyone else, next time trust me when I say its not feasible Wink


But see, it turned out to be feasible, just not very pleasant Cool

_________________
Tom Pappano
Tulsa, Oklahoma
 
 View user's profile Send private message  
Reply with quote Back to top
Mike B
PostPosted: Apr 15, 2008 - 03:19 AM
Raving lunatic


Joined: Jun 22, 2004
Posts: 3849
Location: South West Utah, USA

tpappano wrote:
I'm more curious as to *why* the internal pullup isn't enough. Makes me suspect other problems with the design.
The ATMEL application note has an answer.
AVR042 wrote:
The reset line has an internal pull-up resistor, but if the environment is noisy it can be insufficient and reset can therefore occur sporadically......
A discussion of different solutions depending on how you use the AVR reset pin follows.
 
 View user's profile Send private message  
Reply with quote Back to top
microcarl
PostPosted: Apr 15, 2008 - 03:26 AM
Raving lunatic


Joined: May 30, 2004
Posts: 8502
Location: Cincinnati, Ohio

tpappano wrote:
Quote:
Unfortunately that weak pull up resistor wasn't enough on this design - it always was before so I left out adding one . . . lesson learned.


I'm more curious as to *why* the internal pullup isn't enough. Makes me suspect other problems with the design. Can you elaborate on the problems you are having?

Quote:
For everyone else, next time trust me when I say its not feasible Wink


But see, it turned out to be feasible, just not very pleasant Cool

I think Tom has it right.

But thinking out loud here, I'd like to offer the following...

My personal feeling is that 40K Ohms to 60K Ohms is quite enough of a pull-up resistor for all but the noisiest of environments. After all, the intent of the internal pull-up resister between VCC and the RESET line is to get that RESET line up to VCC, or at least very close. So, if the input impedance of the RESET input is say, 1Meg Ohm, the internal pull-up resistor 40K Ohm and VCC = 5 Volts, then:
Code:

                1Meg
Vreset = VCC ---------- = 4.8 VDC.
             40K + 1Meg

This is plenty good to pull the RESET up to a proper logic high level.


And even if you treated the RESET input in Thevenin:
Code:

                500K
Vreset = VCC ---------- = 4.6 VDC.
             40K + 500K

Still plenty good!


A capacitor of sufficient value will filter out any noise that might cause the RESET line to go low enough to trigger a valid RESET sequence.

Obviously, the Atmel engineers must be of at least close to the same opinion, else they would have used internal pull-up resistor values in the range of 4.7K Ohm to 10K Ohm.

_________________
Carl W. Livingston, KC5OTL
microcarl@roadrunner.com

"There are only two ways to sleep well at night... be ignorant or be prepared."

The original Dragon Slayer !

Long live the AVR!!!
 
 View user's profile Send private message Send e-mail  
Reply with quote Back to top
societyofrobots
PostPosted: Apr 15, 2008 - 03:34 AM
Hangaround


Joined: Nov 29, 2007
Posts: 134


Quote:
I'm more curious as to *why* the internal pullup isn't enough. Makes me suspect other problems with the design. Can you elaborate on the problems you are having?

This is why I was cryptic, didn't want these additional questions Razz

When I keep my mk2 programmer powered up and plugged in, the resets never occur. And they randomly occur otherwise about 30% of the time. Touching the reset pin with my hand can sometimes trigger it. When I multimeter it, it says about 3.5V. Nothing else is connected to the reset line, or even near it. I have a ton of noise filter caps throughout my circuit.

My circuit needs to handle unpredictable interference, abuse, and a broad range of noisy input voltages. Probably best not to trust the internal resistor, anyway. And yes, I'm being cryptic again Razz

_________________
How do YOU make a robot?
http://www.societyofrobots.com
 
 View user's profile Send private message Visit poster's website 
Reply with quote Back to top
microcarl
PostPosted: Apr 15, 2008 - 04:03 AM
Raving lunatic


Joined: May 30, 2004
Posts: 8502
Location: Cincinnati, Ohio

I'm thinking that you need to look at the problem from another perspective...

If the RESET line has no other connection when the programmer is disconnected, and if the programming header is pretty close to the RESET input, I really doubt that the issue is with the RESET input, per Se'.

Touching the RESET input with your finger and having the controller go into RESET isn't anything near a valid test to be drawing conclusions from. If effect, you become an antenna that simply won't exist in the real world. Can you make the controller reset by introducing noise via a long wire in near proximity - without touching the RESET input? That would be closer to the real life scenario.

Touching your finger on the RESET input simply doesn't represent anything near a reasonable test to determine the appropriateness of the internal RESET pull-up resistor.

I'd be looking at other sources where noise can be introduced. Places like I/O lines going off-board and the incoming VCC and GND.


I've designed several controllers that only use the internal pull-up resistor, and that were placed in quite harsh electrically noisy industrial environments. None of these ever had any issues with with the controller being falsely triggered into a reset because of the lack of any external pull-up resistor in the RESET input.

_________________
Carl W. Livingston, KC5OTL
microcarl@roadrunner.com

"There are only two ways to sleep well at night... be ignorant or be prepared."

The original Dragon Slayer !

Long live the AVR!!!
 
 View user's profile Send private message Send e-mail  
Reply with quote Back to top
theusch
PostPosted: Apr 15, 2008 - 07:33 AM
10k+ Postman


Joined: Feb 19, 2001
Posts: 28907
Location: Wisconsin USA

Quote:

I'm more curious as to *why* the internal pullup isn't enough.

In our experience, and that of others that have posted in the past: In the real world, the internal pullup is not enough. On the bench, do whatever you want to.

Are there really a lot of production designs that get away without it? I'm willing to be out-voted.

Lee
 
 View user's profile Send private message  
Reply with quote Back to top
Mike B
PostPosted: Apr 15, 2008 - 08:22 AM
Raving lunatic


Joined: Jun 22, 2004
Posts: 3849
Location: South West Utah, USA

theusch wrote:
I'm willing to be out-voted.
Since ATMEL agrees with Lee, I think they carry at least as many votes as Lee has posts Wink.

BTW, congratulations on exceeding 10k. I miss the avatar though. Hopefully, that bug will get fixed sooner than later.
 
 View user's profile Send private message  
Reply with quote Back to top
danni
PostPosted: Apr 15, 2008 - 09:04 AM
Raving lunatic


Joined: Sep 05, 2001
Posts: 2610


I put the reset pin always direct on VCC, if not used as IO.
I faced newer problems with it.

Reprogramming was done per bootloader (no reset pin, no SPI pins needed, any single IO-pin can do it).


Peter
 
 View user's profile Send private message  
Reply with quote Back to top
js
PostPosted: Apr 15, 2008 - 12:53 PM
10k+ Postman


Joined: Mar 28, 2001
Posts: 22556
Location: Sydney, Australia (Gum trees, Koalas and Kangaroos, No Edelweiss)

Quote:
I miss the avatar though. Hopefully, that bug will get fixed sooner than later.
...by then he would have mutated into who knows what...a "pot plant", a monkey or wabbit with glasses, perhaps a "froggy" with glasses??

His appearance as been defined as "volatile" . Mr. Green

_________________
John Samperi
Ampertronics Pty. Ltd.
www.ampertronics.com.au
* Electronic Design * Custom Products * Contract Assembly
 
 View user's profile Send private message Visit poster's website 
Reply with quote Back to top
societyofrobots
PostPosted: Apr 15, 2008 - 03:19 PM
Hangaround


Joined: Nov 29, 2007
Posts: 134


Quote:
My personal feeling is that 40K Ohms to 60K Ohms is quite enough of a pull-up resistor for all but the noisiest of environments. After all, the intent of the internal pull-up resister between VCC and the RESET line is to get that RESET line up to VCC, or at least very close. So, if the input impedance of the RESET input is say, 1Meg Ohm, the internal pull-up resistor 40K Ohm and VCC = 5 Volts, then:

Im sure there is some upper bound resistance based on required current, no? I'll use 300k ohms since I have some around.

_________________
How do YOU make a robot?
http://www.societyofrobots.com
 
 View user's profile Send private message Visit poster's website 
Reply with quote Back to top
microcarl
PostPosted: Apr 15, 2008 - 05:56 PM
Raving lunatic


Joined: May 30, 2004
Posts: 8502
Location: Cincinnati, Ohio

societyofrobots wrote:
I'll use 300k ohms since I have some around.


Well, using an external 300K Ohm resistor tied between VCC and the RESET pin really doesn't add appreciably to noise immunity...
Code:

         40K * 300K
Rreset = ---------- = 35.25K Ohms.
         40K + 300K

With using an external 300K Ohm pull-up resister between VCC and the RESET input, it would be a better traid-off to just use a decent size capacitor of say, 1uF to 10uF.

_________________
Carl W. Livingston, KC5OTL
microcarl@roadrunner.com

"There are only two ways to sleep well at night... be ignorant or be prepared."

The original Dragon Slayer !

Long live the AVR!!!
 
 View user's profile Send private message Send e-mail  
Reply with quote Back to top
tpappano
PostPosted: Apr 15, 2008 - 06:33 PM
Raving lunatic


Joined: Dec 01, 2003
Posts: 2626


Ditto to Carl's comments.

Quote:
When I multimeter it, it says about 3.5V. Nothing else is connected to the reset line, or even near it. I have a ton of noise filter caps throughout my circuit.


This is why I made my query. I would expect the voltage measured to be much closer to Vcc. If your circuit runs on 5 volts, (maybe it doesn't) and if your voltmeter is a typical instrument with a relatively high input impedance, (maybe it isn't) you could have some other problem causing resistance that shunts the reset line to ground or to some other track. It could be, for example, flux contamination, incomplete etching, or contamination from being handled, pencil marks, water, sweat, etc. Try sticking you meter from Vcc to reset. You should see zero volts. If you don't, you clearly have a problem. It is obviously good practice to add a bypass cap and a lower value pullup to the reset line as "boiler plate" against unintentional resets. However, during initial testing my personal preference is to leave them (and sometimes other filtering components) unmounted to determine where any potential sensitivity to environmental noise may lie. Obviously one designs in various noise protections from the start, but I somewhat compulsively evaluate the effects of various noises sources on the different parts of the system without some of the filtering installed. This way I can observe that the filter elements perform as desired. So far I have not observed resets caused by noise using only the integral pullup. Like Carl, most of what I do is in the "high noise" arena, and has been for many years.

Quote:
Im sure there is some upper bound resistance based on required current, no? I'll use 300k ohms since I have some around.


If you don't already have a bypass cap on reset, you may get better value for your rework labor adding one.

_________________
Tom Pappano
Tulsa, Oklahoma
 
 View user's profile Send private message  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT + 1 Hour
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2006 The PNphpBB Group
Credits