Arduino Forum

Using Arduino => Microcontrollers => Topic started by: pico on Oct 04, 2012, 07:11 pm

Title: atMega8L -- any external components required at all?
Post by: pico on Oct 04, 2012, 07:11 pm
I've got some atMega8L chips ordered I intend to run at 3.3V, 8MHz from the internal oscillator.

I'm not intending to use the analog ADC, but the datasheet says I should supply power to AVcc as well as Vcc anyway.

Is there any need for any external components (e.g., caps) at all in this setup? I've seen some mega8 chips setup with small filter caps on AVcc and AREF to GND, but not sure if this will be beneficial at all if not using the ADC. The datasheet itself doesn't have anything definite to say on the matter AFAICT.

Thoughts?
 
Title: Re: atMega8L -- any external components required at all?
Post by: retrolefty on Oct 04, 2012, 07:19 pm

I've got some atMega8L chips ordered I intend to run at 3.3V, 8MHz from the internal oscillator.

I'm not intending to use the analog ADC, but the datasheet says I should supply power to AVcc as well as Vcc anyway.

Is there any need for any external components (e.g., caps) at all in this setup? I've seen some mega8 chips setup with small filter caps on AVcc and AREF to GND, but not sure if this will be beneficial at all if not using the ADC. The datasheet itself doesn't have anything definite to say on the matter AFAICT.

Thoughts?
 


.1 ufd caps mounted close to Vcc and Avcc for sure. If your not going to use ADC then bypassing Aref not really required. Chip manufacures almost always recommend applying standard Vcc bypassing as standard industry practice. 

Lefty
Title: Re: atMega8L -- any external components required at all?
Post by: fungus on Oct 04, 2012, 07:42 pm

I've got some atMega8L chips ordered I intend to run at 3.3V, 8MHz from the internal oscillator.

I'm not intending to use the analog ADC, but the datasheet says I should supply power to AVcc as well as Vcc anyway.

Is there any need for any external components (e.g., caps) at all in this setup? I've seen some mega8 chips setup with small filter caps on AVcc and AREF to GND, but not sure if this will be beneficial at all if not using the ADC. The datasheet itself doesn't have anything definite to say on the matter AFAICT.


Atmel recommends a 220nF ceramic capacitor for decoupling and a 4.7k pullup resistor on RESET. That's it.

http://www.atmel.com/Images/doc0484.pdf

http://www.atmel.com/images/doc2521.pdf


Bear in mind that the internal 8mHz clock rate varies with temperature/voltage. Timing won't be very accurate, serial comms won't work except at slow speeds.
Title: Re: atMega8L -- any external components required at all?
Post by: Coding Badly on Oct 04, 2012, 08:10 pm
Timing won't be very accurate, serial comms won't work except at slow speeds.


A problem easily rectified with tuning.
Title: Re: atMega8L -- any external components required at all?
Post by: dhenry on Oct 04, 2012, 08:34 pm
Quote
Is there any need for any external components (e.g., caps) at all in this setup?


You don't have to have them. But it is better to have them.

Quote
A problem easily rectified with tuning.


It actually requires far more than that. RC oscillators suffer a few issues: temperature drift, accuracy and jitter. Accuracy at a given temperature is easy to deal with. Jitter for long-time horizon applications can be dealt with. Temperature drift is difficult to resolve. fungus is right on target on this one.

Title: Re: atMega8L -- any external components required at all?
Post by: Coding Badly on Oct 04, 2012, 08:50 pm
It actually requires far more than that.


The target accuracy is "good enough for reliable serial communication at high speeds".  I stand by what I said.
Title: Re: atMega8L -- any external components required at all?
Post by: dhenry on Oct 04, 2012, 09:06 pm
Quote
The target accuracy is "good enough for reliable serial communication at high speeds".


Not sure how "high" of a high speed you are talking about but set the mcu on internal oscillator and run it at 38400 bps. Put your solder iron to the mcu and watch what happens on the transmission.

It is not pretty.

Title: Re: atMega8L -- any external components required at all?
Post by: Coding Badly on Oct 04, 2012, 09:18 pm
Put your solder iron to the mcu and watch what happens on the transmission.


I can't tell if you're serious so I'll assume you are.  Grossly exceeding the temperature specification is not a valid test.
Title: Re: atMega8L -- any external components required at all?
Post by: dhenry on Oct 04, 2012, 09:21 pm
Quote
Grossly exceeding the temperature specification is not a valid test.


Which part of it exceeded the temperature specification?
Title: Re: atMega8L -- any external components required at all?
Post by: lemming on Oct 05, 2012, 01:50 am
The data sheet specifies an operating temperature way below the ~300C degrees of a soldering iron.

Unless the OP's application requires a soldering iron to be constantly applied (while on) to the micro, I don't think this will pose a problem for its day-to-day operation. 
Title: Re: atMega8L -- any external components required at all?
Post by: dhenry on Oct 05, 2012, 02:36 am
You can get a peek at the internal rc's performance by looking an atmel app note (053), figure 2-1, p4.
Title: Re: atMega8L -- any external components required at all?
Post by: dhenry on Oct 05, 2012, 02:37 am
Most people do not understand the distinction between the internal rc's accuracy vs. (thermal) drift.
Title: Re: atMega8L -- any external components required at all?
Post by: Coding Badly on Oct 05, 2012, 02:58 am

Over the entire voltage-temperature envelope of the 328P processor, with a goal of 38400 baud, the error is -6.73% to 3.92%.  Well within range for serial communications to work.

Assuming the application does not require the full voltage range (1.8 to 5.5), the error over the temperature range drops to -3.60% to 2.66%.  Low enough for serial communications to be considered reliable.
Title: Re: atMega8L -- any external components required at all?
Post by: pico on Oct 05, 2012, 04:19 am

and a 4.7k pullup resistor on RESET.


The internal pullup by itself isn't reliable? Surprising.

Quote

http://www.atmel.com/Images/doc0484.pdf

http://www.atmel.com/images/doc2521.pdf


Thanks for the links! Useful reference material there.

BTW, just for some context, the discussion regarding the internal clock accuracy is interesting and useful for the general situation, but in this particular application I won't be using serial comms at all. Actually, I'll be using the atMega8L to replace an atTiny85, which works fine with an internal oscillator at 8MHz for this application, so I had assumed the atMega8L would too.

In this situation, since I'm not using ADC, or anything requiring a high clock accuracy, I was just wondering what external components (if any) I must/would be advised to have for an atMega8L.

Title: Re: atMega8L -- any external components required at all?
Post by: Coding Badly on Oct 05, 2012, 04:32 am
and a 4.7k pullup resistor on RESET.


The internal pullup by itself isn't reliable? Surprising.


It's "weak".  30K to 60K ohms.  In some situations that makes it unreliable.

And, the cost of a single 4.7K to 10K resistor is how much?
Title: Re: atMega8L -- any external components required at all?
Post by: pico on Oct 05, 2012, 04:35 am


It's "weak".  30K to 60K ohms.  In some situations that makes it unreliable.

And, the cost of a single 4.7K to 10K resistor is how much?



It's not the cost, it's the understanding. ;-)
Title: Re: atMega8L -- any external components required at all?
Post by: dhenry on Oct 05, 2012, 11:17 am
Quote
I was just wondering what external components (if any) I must/would be advised to have for an atMega8L.


Must have: none.
Advised to have: a decoupling capacitor on AVref.
What I would have: a decoupling capacitor on Vcc, and a rc or lc filter on Avref.

Title: Re: atMega8L -- any external components required at all?
Post by: fungus on Oct 05, 2012, 11:37 am

and a 4.7k pullup resistor on RESET.


The internal pullup by itself isn't reliable? Surprising.


It's "weak".  30K to 60K ohms.  In some situations that makes it unreliable.

And, the cost of a single 4.7K to 10K resistor is how much?



I was quite surprised by this, too. The only thing I can think of is Atmels obsession with power consumption. I'm guessing the extra microamp that a lower resistor would consume keeps Atmel engineers awake at night.

Only unwashed people with filthy, dirty power supplies would need 4.7k pullups.
Title: Re: atMega8L -- any external components required at all?
Post by: dhenry on Oct 05, 2012, 11:50 am
Even 30k pull-up can be considered too low for some applications - touch sensing for example.

Many newer chips tend to go closer to 100k - many times they are actually 1ua current sources. A 4.7k pull-up inside a chip would have been a marketing / application disaster.