Doubt pinout Atmega328

Asked

Viewed 161 times

2

I’m using Atmega328 in my project, and I was looking at the datasheet and I’m doubting whether the pins 22, 23, and 24 of the atmega328 work as Analogue and Digital, I’m in doubt. Someone could help me ?

Thank you

1 answer

1


Atmega328 analog pins go from 23 to 28. Pin 22 is GND.

Note that although the image mentions the Atmega168, it serves for the Atmega328. See here: https://www.arduino.cc/en/Hacking/PinMapping168

Mapeamento de Pinos Atmega168/328 para o Arduino

Analog pins can be used as digital pins. See this response to the Arduino UNO (which uses an Atmega328): /a/13872/3084

  • Cool, Thanks friend for the reply, helped me a lot.

  • I have another question, I saw in the datasheet that has 2 VCC and 3 GND. I need to turn on all or I can turn on only 1 VCC and 1 GND ?

  • Look, I won’t give you a sure answer, but I can give you a suggestion: Check some schematics of Arduino on the Internet with Atmega328. I believe that the HCV (pin 20) is connected in parallel with the VCC (7). If you have an Arduino Uno or Duemilinove board you can also check how it is done. Anyway, Arduino projects are your friends and for being open-source it is very quiet to check.

  • Just one more question, I am using the atmega328 serial to control a bluetooth module, but I would like to use the same serial output to communicate with another atmega328, as I can do ?

  • Post this as a question so I can answer you. I think it may be of interest to other people. Post the code where you try to make this communication.

  • Okay, here’s the new question: http://answall.com/questions/101417/multipla-comunica%C3%A7%C3%A3o-serial

Show 1 more comment

Browser other questions tagged

You are not signed in. Login or sign up in order to post.