Matching Arduino pin name to ATMEGA chip pin

I’m in the process of designing my first custom PCB around the ATMEGA4808 (32 pin).
I’m not sure that I select the correct processor pins for my needed hardware

The ATMEGA should drive a TFT or OLED display. I know the “normal” pins used for them in an Arduino board. But not sure that I found the corresponding microcontroller pin from the data sheet.

The OLED have a 4 pin (I2C)
Its pins are VDD, GND, SCK, SDA.

display Arduino ATMEGA
pin pin
GND GND 19
VCC VCC 28+18
SCL A5 1
SDA A4 32

The 1.44 TFT have 8 pins
Its pins are VCC, GND, CS, RESET, A0 (DC), SDA (SDI)(MOSI), SCK, LED

Display Arduino ATMEGA
pin pin
VCC VCC 28+18
GND GND 19
CS D10 32
RESET D8 30
A0 D9 31
SDA D11 2
SCK D13 3
LED VCC 28+18

Are the pins I’ve selected correct?
Could you help me understand how to get from the Arduino pin name to the microcontroller pin.

Thanks

The physical pin numbers depend on the controller package. Look up the dedicated pins (I2C, SPI...) in the pinout diagram of the data sheet and select the other pins from almost unused alternative functionality.

That was just what I was trying to do, but I’m not sure that I read the data sheet correctly (I’m not an electric designer, and I find that table very confusing).
I intend to use the 32 pin version = VQFN/TQFP

For the OLED, I see the “SDA” and “SCL” under the “TWI0” column, and from that I get to pin 32 & 1.

With the TFT I’m not sure about the meaning of the display pins. Each display I find in AliExpress have a bit different writing on them. I’m not sure which are special communication protocol pins, and which are just general I/O.

Check the Arduino standard pins in the module doc for the used pins.

Thank @DrDiettrich,
I did more reading and found the meaning of the TFT pins:

reset = GPIO = reset the tft
D/C (A0) = GPIO = tells the tft if the data is command or display data
CS = SPI = chip select
MOSI (SDA) = SPI = data to the display
SCK = SPI = serial clock
(MISO = SPI = data from the display = not used)

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.