Does Arduino IDE could control the 32 pin version of ATMEGA 328?

Hi,

  1. From https://www.arduino.cc/en/Tutorial/ArduinoToBreadboard and see the minimum circuit configuration. Can I simply use the same circuit except change the 28 pin ATMEGA 328 to 32 MLF ATMEGA 328 and remain everything the same to burn the boot loader? Is it going to work?

  2. Can I use the exactly the same code that could be run on Arduino UNO to run on the 32 MLF ATMEGA 328 using the same procedure in that link? If yes, how can I have control of the extra ADC pins, namely ADC 6 and ADC 7?

Thanks so much.

The nano has an on board FTDI USB/serial converter and the 32 pin SMD 328 chip. The pro mini has the 32 pin SMD 328 chip. They both have pins for A6 and A7.

You could select either of these boards in your IDE. It doesn't matter for the IDE (i tested up to V. 1.0.5).

Yeah, works no problem.

I think just analogRead(A6) should work.

If it doesn't give correct results, try analogRead(6), or analogRead(20)

I remember seeing a version of analogRead() that would actually block some of those techniques, but the version in the current IDE versions is OK.

MAS3: The nano has an on board FTDI USB/serial converter and the 32 pin SMD 328 chip. The pro mini has the 32 pin SMD 328 chip. They both have pins for A6 and A7.

You could select either of these boards in your IDE. It doesn't matter for the IDE (i tested up to V. 1.0.5).

Hi MAS3,

Since I am not using the actual "board"(I am using the ATmega MCU, and the Arduino just serves as the "media" between the USB and the ATmega MCU), I have to select "ATmega 328 on a breadboard(8Mhz internal timer)" as my board, and "Arduino ISP" as the programmer.

I am doubting "ATmega 328 on a breadboard(8Mhz internal timer)" does not take the 32 pin version into consideration? Is it only for the 28 pin version ATmega 328? Or it is compatible with 32 mlf version?

BTW, "ATmega 328 on a breadboard(8Mhz internal timer)" could be found in the link a provided in my topic. Thanks,

Thanks,

It doesn't really matter. The dies inside those chips are very unlikely different (i'm saying they are the same). So these pins simply aren't brought out on the more expensive 28 pin version. That's why it will still work if you've got the 28 pin version and use A6 and A7. Of course you will not be able to get a usable input, but it will still do what you programmed it to do.

ZheyuWu: I am doubting "ATmega 328 on a breadboard(8Mhz internal timer)" does not take the 32 pin version into consideration? Is it only for the 28 pin version ATmega 328? Or it is compatible with 32 mlf version?

That package includes no code - just a boards.txt entry. It uses all the normal arduino core files, and hence there's no way for it to have special compatibility issues.

(I know somewhere I saw a version of wiring_analog.c that explicitly blocked reads to all but the first 6 ADC channels, but thankfully it's not in 1.6.x)