Take the 2-minute tour ×
Electrical Engineering Stack Exchange is a question and answer site for electronics and electrical engineering professionals, students, and enthusiasts. It's 100% free, no registration required.

This is a general question regarding Atmega328P.

While I was reading the datasheet of Atmega328P, I see that it has Ports B, C, and D.

So, I'm surprised to see that there is no PortA.

Is there a specific reason for it?

Datasheet for Atmega328P: http://www.atmel.com/Images/doc8161.pdf

share|improve this question
    
AVRs are available in different packages where a single core may be available in packages with different numbers of available pins. Depending on the number of available pins certain ports/functions may be available or not in otherwise identical microcontroller models. (DIP usually has the lowest pin count.) –  Hanno Binder Jul 20 at 12:22

3 Answers 3

up vote 7 down vote accepted

When a chip manufacturer designs a family of chips they will often start with an all singing, all dancing design with all the bells and whistles. They will then create cut-down versions of the chip by removing portions of the design, or sometimes just not connecting pins up.

The internals of the 328P will be based on a larger chip which does have a port A (as well as other ports). The removal of port A as opposed to another port would have had two considerations:

  1. What functions are shared with which port, and which can we do away with
  2. How easy would it be to move any extra functions to other pins
  3. How easy would it be to remove the port from the design

I would surmise that port A had few extra functions shared with its pins, and the port was simple to remove from the design and leave the chip suitable for use in a low pin count package.

And yes, the port A reference in the ADC section should read port C.

share|improve this answer

It does, but isn't clearly mentioned in the datasheet. Port A is the ADC 'port'.

It shares most of the pins of Port C (some packages have two extra ADC pins though). I think Atmel uses the Port C moniker for the 'digital' inputs on those pins, and Port A for the analog input. I agree it is confusing.

From page 251 of the datasheet: "The ADC is connected to an 8-channel Analog Multiplexer which allows eight single-ended voltage inputs constructed from the pins of Port A."

As such, my guess is that Port A represents the internal 8 connections to the ADC.

I just had a look at the Atmega16 Datasheet (http://www.atmel.com/Images/doc2466.pdf). This does have Port A dedicated to the ADC. As such, I think the CPU core is similar but the external pins are multiplexed. I guess for the Atmega8 series they should have dropped the Port A moniker completely to avoid confusion, or maybe they did and the ADC chapter in the datasheet is a typo as you mentioned in the comments.

share|improve this answer
    
If Port A is the ADC port, how does it compare to Port C? –  jippie Jul 20 at 8:24
    
I suspect that reference to Port A is just a typo. Other ATmegas missing port A don't have corresponding language in their data sheets. –  microtherion Jul 20 at 8:52
    
Hmm, that's entirely possible. I wonder why the two extra ADC ports on the SMD versions aren's part of port C. –  RJR Jul 20 at 9:59
    
Ah now I see where you are going 'wrong'. Always download the most recent version of the datasheet. Yours is stamped 07/2010, this one is stamped revision G , updated: 02/2013. –  jippie Jul 20 at 21:03

Always download the most recent version of the datasheet from the vendor's website.

On the Atmel website you'll find:

ATmega48A/PA/88A/PA/168A/PA/328/P Complete
( file size: 35MB , 660 pages , revision G , updated: 02/2013 )
                                         ^            ^^^^^^^

where there is no reference to Port A made anywhere.

share|improve this answer
    
Good - seems like they fixed the Port A moniker completely. I think the ATMega16 datasheet - which does have a Port A, indicates nicely how it got there in the first place. –  RJR Jul 21 at 0:16

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.