ATmega328P: 20MIPS or 16MISP?

Go To Last Post
33 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0


Atmel 2015 datasheet for ATmega328P:

Microchip 2020 datasheet for ATmega48A/PA/88A/PA/168A/PA/328/P:

Which is true? Is it depending on date of manufacture? Or I can use 20MHz clock on any ATmega328P?

This topic has a solution.

Slow and Steady!

Last Edited: Thu. Oct 22, 2020 - 05:14 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The 2nd one states a whole range of chips & suffixes, and says "up to".

 

You can't just take that to mean that every single one of all those chip variants will all work at 20MHz - that's why they say, "up to".

 

Elsewhere in the datasheet there are the specific details for each particular model & variant.

 

EDIT

 

Similarly, that datasheet also says things like:

̶ 4/8/16/32KBytes of In-System Self-Programmable Flash program memory

̶ 256/512/512/1KBytes EEPROM

̶ 512/1K/1K/2KBytes Internal SRAM

 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
Last Edited: Wed. Oct 21, 2020 - 09:08 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Please have a look at this page:

https://www.microchip.com/wwwpro...

CPU Speed (MIPS/DMIPS) = 20

Slow and Steady!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0


Slow and Steady!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0


pajuhesh80 wrote:

Atmel 2015 datasheet for ATmega328P:

Do you mean the Automotive version:

 

http://ww1.microchip.com/downloads/en/DeviceDoc/Atmel-7810-Automotive-Microcontrollers-ATmega328P_Datasheet.pdf

 

Yes, that is a different product variant.

 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0


Both are true ....you need to know the voltage being used to find the max speed.  Also some chips no longer allow the 20MHz external xtal hookup, but you can pipe in you own 20MHz digital clock.

 

With all of the various changes & voltages, you need to look at the exact datasheet for the part you are interested in, there are many flavors.

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!

Last Edited: Wed. Oct 21, 2020 - 09:21 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Both are true - if you can only run the chip at 16MHz then because using one cycle opcodes it can run 16,000,000 opcodes per seconds it is "16 MIPS". If you have a variant of the chip that can be run at 20MHz then you can achieve 20MHz.

 

Note that one datasheet you quote says just "ATmega328P". The other lists a number of devices so perhaps some of those can be operated at 20MHz?

 

(having said that you can probably get away with 30-40MHz if you want to over-clock it in a personal project)

Last Edited: Wed. Oct 21, 2020 - 10:07 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0


clawson wrote:
one datasheet you quote says just "ATmega328P"

I think he's referring to the specific Automotive version ?

 

EDIT

 

There are two distinct documents:

 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
Last Edited: Wed. Oct 21, 2020 - 09:35 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0


Let me clarify some things:

1. The 2015 Atmel ATmega328P datasheet for both normal and automotive says "up to 16 MIPS @ 16MHz". However, you can find this graph there:

2. The 2020 Microchip ATmega48A/PA/88A/PA/168A/PA/328/P datasheet says "up to 20 MIPS @ 20MHz" and there is no exception for any of these MCUs. Also, this graph is specifically for 328P:

3. Microchip webpage for ATmega328P says CPU Speed (MIPS/DMIPS) = 20.

 

So I'm sure any new ATmega328P is capable for 20MHz. I just want to know is it true for an older (before Atmel being acquired by Microchip in 2016) ATmega328P?

Slow and Steady!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

pajuhesh80 wrote:
 The 2015 Atmel ATmega328P datasheet for both normal and automotive 

give a link to that document 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0


Curious, the history says that the plot in 31-333 was actually updated in 2014...

 

 

But yeah, the point is that datasheets are subject to constant revisions and updates.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Well, the “a” revision of the combined data sheet lists 20mhz for all the chips.  That was 2009, I think.

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

awneil wrote:

give a link to that document 

That is the one Microchip website calls it "Automotive" but it applies for both Automotive and normal. Just it is older and in Atmel-style.

Even if that datasheet is specific to automotive version, I think it doesn't make sense to set a lower maximum speed for automotive version! frown MCU should be more reliable and durable for automotive applications but shouldn't be slower.

Slow and Steady!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0


pajuhesh80 wrote:
it applies for both Automotive and normal

No, it doesn't:

 

 

 

 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

pajuhesh80 wrote:
I think it doesn't make sense to set a lower maximum speed for automotive version! frown 

Yes it does - they are guaranteeing performance over a wider temperature range.

 

Temperature is a big limiting factor of maximum operating speed - so, if you're going to guarantee operation to a higher temperature, it's likely to be at a lower speed.

 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

So, you mean maximum clock for automotive version is 16MHz and for normal version is 20MHz? Why the Figure 29-1 in automotive datasheet is continued to 20MHz?

Slow and Steady!

Last Edited: Wed. Oct 21, 2020 - 10:41 AM
This reply has been marked as the solution. 
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yes - that is exactly what those datasheets are telling you!

 

pajuhesh80 wrote:
Atmel 2015 datasheet for ATmega328P:

This datasheet refers only to the ATmega328P, and only the Automotive temperature range

 

 

pajuhesh80 wrote:
Microchip 2020 datasheet for ATmega48A/PA/88A/PA/168A/PA/328/P:

This datasheet refers to the ATmega328P among others, and only the Industrial temperature range

 

Which is true?

Both - in their different stated conditions

 

 

Is it depending on date of manufacture?

No - it's the different temperature ranges.

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0


pajuhesh80 wrote:
maximum clock for automotive version is 16MHz

To be precise, that is the maximum speed for which they guarantee performance over the full Automotive temperature range.

 

Undoubtedly, the chips would work at the higher frequency provided you restricted them to the narrower Industrial temperature range.

 

EDIT

 

It's similar to saying that the maximum speed is 8MHz over the full 2.7 - 5.5 V supply voltage range;

 

If you restrict the supply voltage range to 4.5 - 4.5 V, then you can use 16 MHz:

 

 

 

 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
Last Edited: Wed. Oct 21, 2020 - 10:48 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Note that doing the Automotive Qualification is a very expensive process.

 

That's why there's only a limited number of the chips which have it, and why the datasheets are not updated so frequently.

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I think that when you look in the datasheets that there are different order/manufacturer part numbers too.

So you are talking about a different chip, they have the same prefix " AtMega328B"  but from there the part number will be different. same as with capacitors, resistors and inductors.... You have a family and then specific part information.

Not to mention the difference in package, that also is a "AtMega328B" but different order number thus different part.

Also keep in mind that pricing will be different, with the automotive one most likely being much more expensive.

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

meslomp wrote:
... with the automotive one most likely being much more expensive.
For temperature grade 0 or 1, less so for grade 2 (105C max, extended industrial)

https://www.microchipdirect.com/product/search/all/ATmega328P (search for Automotive)

FAILURE MECHANISM BASED STRESS TEST QUALIFICATION FOR INTEGRATED CIRCUITS | AEC-Q100 | Automotive Electronics Council (page 9)

 

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

with the automotive one most likely being much more expensive.

maybe...maybe not ...due to very high volumes (compared to equiv non-automotive), some automotive parts are very cheap.  Generically, more testing (automotive) should be higher cost.

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

avrcandies wrote:

with the automotive one most likely being much more expensive.

maybe...maybe not ...due to very high volumes (compared to equiv non-automotive), some automotive parts are very cheap.  Generically, more testing (automotive) should be higher cost.

Which "some automotive parts" can we use as examples?  The commented phrase specifically dealt with AVR microcontrollers, didn't it?  Can you give some examples of automotive-tagged AVR microcontrollers that are "very cheap" compared to the other suffixes that we might purchase from a distributor?  Most of us don't deal in millions; include examples of e.g. 100 quantity that we might use in our production AVR apps.

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

I used some rather high power automotive rated diodes that were extremely cheap for their ratings, even cheaper than std non-automotive of equiv capacity.....maybe they were used by the gazillion for alternators or in wire harnesses.   Just because it is automotive doesn't mean higher pricing, if you can find a part that is used in very high volume.    The same might be applied to AVRs--don't automatically assume the price will be higher.

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!

Last Edited: Thu. Oct 22, 2020 - 04:14 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

avrcandies wrote:

I used some rather high power automotive rated diodes that were extremely cheap for their ratings, even cheaper than std non-automotive of equiv capacity.....maybe they were used by the gazillion for alternators or in wire harnesses.   Just because it is automotive doesn't mean higher pricing, if you can find a part that is used in very high volume.    The same might be applied to AVRs.

Please give examples of this claim that you made about AVRs -- that is what the thread is dealing with, isn't it?

 

theusch wrote:

The commented phrase specifically dealt with AVR microcontrollers, didn't it?  Can you give some examples of automotive-tagged AVR microcontrollers that are "very cheap" compared to the other suffixes that we might purchase from a distributor?  Most of us don't deal in millions; include examples of e.g. 100 quantity that we might use in our production AVR apps.

 

If you want to expound on generic availability using your anecdotal evidence, please have the moderators move the comments to e.g. General Electronics.  Otherwise, I'd appreciate that you not revert to your old habit of spewing unrelated fantastic claims in AVR-topiced threads.

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The notion that simply because a part is automotive (whether is an AVR , switch, or connector, etc) means it is more expensive is a bad line of reasoning & must be noted--in fact it can be cheaper if you find one that is used in very high volumes.   I'd suspect some under the hood relays might fit this category, maybe some AVR's too.  Now it might be fair to argue this is because such parts have multiple sources, whereas an AVR might not.  Automotive parts typically need to drive the costs down to dirt-low levels.  So it is related to the line of thought, not an unrelated claim.

Can you give some examples of automotive-tagged AVR microcontrollers that are 

No. I didn't say there were definitely such AVRs, nor did I make a claim to the AVR in particular.  I said prior experience actually using automotive parts may apply--don't simply assume they will be higher priced.

 

Maxim Integrated's Automotive Buck-Boost Controller Enables Automotive USB Power Delivery Ports with Industry's Smallest Solution Size and Lowest Cost (could be mktg hype).   AEC-Q100 and AEC-Q006 Qualified

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!

Last Edited: Thu. Oct 22, 2020 - 05:12 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Then stop throwing unrelated thoughts in a thread about AVRs. Misleading to op at best. (Based on the previous times I called you on the, I bet 20 bucks that Hawkeye will insist on the last word. Anyone want to take the other side?) The last irk I recall had you chastising a newbie for wasting time using a debugger. That was helpful to the op as well?

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Not sure why you seem a completely mortified about this--- my thought was indeed related to the category of automotive components---which is being discussed (if its an automotive type, it must inherently cost a lot more).  NO they are not always the most expensive, sometimes they are the lowest cost.  There is nothing misleading in my message.  Implicitly implying automotive electronic parts will cost more, is misleading.  This is based on factual experience. 

 

One needs to check the actual parts & not automatically rule out automotive devices based on a notion that they will be costly.  We don't want to send the OP off saying forget about even considering automotive devices when choosing parts for a design.

Here is a simplistic example I did without extensive searching.

with the automotive one most likely being much more expensive.

Now have yourself a nice dinner & no more coffee.

 

Note the digikeys are obs, so it may be a bad example, but the mouser is an active part with a very reasonable price

 

 

 

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!

Last Edited: Thu. Oct 22, 2020 - 07:00 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

theusch and avrcandies Please be calm and end this fight. angel

Slow and Steady!

Last Edited: Fri. Oct 23, 2020 - 07:55 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

can the general pricing argument be split-out to a separate thread?

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I'm not sure why he was upset or arguing about a low pricing comment unless he's been burned by those parts availability. Many times they can be rock bottom when a part is widely used. So to say an automotive part is automatically going to be much more expensive is simply not true & was being actively discussed.  We used to have a short list with strangely odd part numbers that were used specifically because they were extremely low cost--due to being high-volume automotive types. In fact as being discussed in this thread and shown above, the automotive 556-MEGA328PB-MBTVAO is not much more expensive.  So what's to argue about?

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

pajuhesh80 wrote:

theusch and avrcandies Please be calm and end this fight. angel

+1000

 

(can't you do as my wife does and bury the hatchet - but then keep in mind where you buried it? ;-)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

so long as she doesn't bury it in your head ... ?!

 

surprise

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...