Skip to main content

TUYA T5AI Pin Mapping

This document describes the pin definitions and multiplexing mappings of the TUYA_T5AI_BOARD / TUYA_T5AI_CORE development boards, helping developers quickly look up GPIO numbers and peripheral function assignments. The pin definitions of both boards are identical.

GPIO Overviewโ€‹

The T5AI provides P0 - P55 available pins. The table below lists the Arduino aliases and available multiplexed functions for each pin.


UART Serialโ€‹

PortSignalArduino AliasT5 Hardware Pin
UART0 (default serial)TXTXP11
UART0 (default serial)RXRXP10
UART1TXTX1P0
UART1RXRX1P1
UART2 (default)TXTX2P31
UART2 (default)RXRX2P30
UART2TXTX2P41
UART2RXRX2P40

Serial uses UART0 (P10/P11) by default.


I2C Busโ€‹

SignalArduino AliasT5 Hardware Pin
SCLSCLP20
SDASDAP21

SPI Busโ€‹

Default clock frequency: 8 MHz

SignalArduino AliasT5 Hardware Pin
SCKSCKP14
SS (CS)SSP15
MOSIMOSIP16
MISOMISOP17

ADC Analog Inputโ€‹

Resolution: 12-bit ๏ฝœ Mode: Continuous sampling

Arduino AliasT5 Hardware PinADC ChannelDescription
A0P25CH1Recommended analog input
A1P24CH2Recommended analog input
A2P23CH3Recommended analog input
A3P28CH4Recommended analog input
A4P22CH5Recommended analog input
A5P21CH6Shared with I2C SDA

A0โ€“A4 are dedicated analog input pins with no multiplexing conflicts โ€” recommended for priority use. A5 serves other functions as well; verify there are no multiplexing conflicts before using it for ADC.


PWM Outputโ€‹

12 PWM channels in total:

PWM ChannelT5 Hardware PinArduino AliasDescription
PWM0P18D0โ€”
PWM1P24A1 / D1Shared with ADC CH2
PWM2P32D2โ€”
PWM3P34D3โ€”
PWM4P36D4โ€”
PWM5P19D5โ€”
PWM6P8โ€”โ€”
PWM7P9โ€”โ€”
PWM8P25A0Shared with ADC CH1
PWM9P33โ€”โ€”
PWM10P35โ€”โ€”
PWM11P37โ€”โ€”

D0โ€“D5 are the recommended PWM output pins.


Analog Pin Aliases (Ax)โ€‹

AliasT5 Hardware PinADC ChannelNote
A0P25CH1Also usable as PWM8
A1P24CH2Also usable as PWM1, shared with D1
A2P23CH3โ€”
A3P28CH4โ€”
A4P22CH5โ€”
A5P21CH6Shared with I2C SDA

Digital Pin Aliases (Dx)โ€‹

AliasT5 Hardware PinPWM ChannelNote
D0P18PWM0โ€”
D1P24PWM1Shares P24 with A1
D2P32PWM2โ€”
D3P34PWM3โ€”
D4P36PWM4โ€”
D5P19PWM5โ€”

A1 and D1 share P24 and support both ADC and PWM functions. Avoid enabling both peripherals simultaneously.