4. Pin descriptions

8-bit enhanced USB microcontroller CH559

4. Pin descriptions

CH559L/T pin definitions.

Pin numberPin name
(function after reset)
Alternate functionsAlternate functions description
SSOP-20LQFP-48
1941VIN5V5The 5V external power input of the internal 5V->3.3V voltage regulator requires an external 0.1uF power supply decoupling capacitor.
2042VDD33VDD/VCCInternal voltage regulator output and internal 3.3V working power input. When the power supply voltage is less than 3.6V, connect VIN5 to input external power supply. When the power supply voltage is greater than 3.6V, connect 3.3uF power supply decoupling capacitor.
1818GNDVSSCommon ground terminal.
--40P0.0AD0/UDTR

P0 port: The default is an 8-bit open-drain bidirectional port. You can enable the internal pull-up resistor to be turned into a quasi-bidirectional port by setting P0_PU.

P0 temporarily switches to push-pull output as a bidirectional data bus AD0~AD7 when accessing the external bus, or outputs the lower 8 bits of the address as needed when accessing the external bus in multiplexed address mode.

UDTR, URTS: Modem signal output of UART1.

UCTS, UDSR, URI, UDCD: UART1 modem signal input.

RXD_, TXD_: RXD, TXD pin mapping.

--39P0.1AD1/URTS
1738P0.2AD2/RXD_
1637P0.3AD3/TXD_
--36P0.4AD4/UCTS
--35P0.5AD5/UDSR
--34P0.6AD6/URI
--33P0.7AD7/UDCD
--43P1.0AIN0/T1/CAP1

AIN0~AIN7: 8-channel ADC analog signal input.

T2: External count input/clock output of timer/counter 2.

T2EX: Timer/Counter 2 Reload/Capture Input.

CAP1, CAP2: Capture input of timer/counter 2 1, 2.

CAP3/PWM3: Timer/Event Counter 3 Capture Input/PWM Output.

SCS, MOSI, MISO, SCK: SPI0 interface, SCS is the chip select input, MOSI is the master output/slave input, MISO is the master input/slave output, and SCK is the serial clock.

--44P1.1AIN1/T2EX/CAP2
145P1.2AIN2/PWM3/CAP3
--46P1.3AIN3
247P1.4AIN4/SCS
348P1.5AIN5/MOSI
41P1.6AIN6/MISO
52P1.7AIN7/SCK
--21P2.0A8

When P2 accesses the external bus, it will automatically switch to the push-pull output temporarily, and output the upper 8 bits of the address A8~A15 as needed.

MOSI1, MISO1, SCK1: SPI1 interface, MOSI1 is the master output, MISO1 is the master input, and SCK1 is the serial clock output.

PWM1, PWM2: PWM1 output, PWM2 output.

TNOW: UART1 is sending an output indication.

T2EX_/CAP2_: T2EX/CAP2 pin mapping.

RXD1, TXD1: UART1 serial data input, serial data output.

DA7: Output address A7 when accessing the external bus in direct address mode.

--22P2.1MOSI1/A9
--23P2.2MISO1/A10
--24P2.3SCK1/A11
--25P2.4PWM1/A12
1126P2.5TNOW/PWM2/A13/T2EX_/CAP2_
1227P2.6RXD1/A14
1328P2.7TXD1/DA7/A15
--4P3.0RXD

RXD, TXD: UART0 serial data input, serial data output.

INT0, INT1: External interrupt 0, External interrupt 1 input.

LED0, LED1, LEDC: LED serial data 0, 1, clock output.

!A15: External bus address A15 Inverting output for chip select.

T0, T1: Timer 0, Timer 1 External input.

XCS0: External bus address 4000h~7FFFh Chip select output.

DA6: Output address A6 when accessing the external bus in direct address mode.

WR, RD: External bus write signal, read signal.

--7P3.1TXD
78P3.2LED0/INT0
--9P3.3LED1/!A15/INT1
810P3.4LEDC/XCS0/T0
--11P3.5DA6/T1
--12P3.6WR
--13P3.7RD
--20P4.0LED2/A0/RXD1_

A0~A5: Outputs the lower 6-bit address A0~A5 when accessing the external bus in direct address mode.

LED2, LED3: LED serial data 2, 3 output.

RXD1_, TNOW_/TXD1_: RXD1, TNOW/TXD1 pin mapping.

PWM3_/CAP3_: PWM3/CAP3 pin mapping.

PWM1_, PWM2_: PWM1, PWM2 pin mapping.

XI, XO: external crystal oscillator input, inverting output.

SCS_, SCK_: SPI0 Chip Select SCS, SCK pin mapping.

--19P4.1A1
--15P4.2PWM3_/CAP3_/A2
--14P4.3PWM1_/A3
--6P4.4LED3/TNOW_/TXD1_/A4
--5P4.5PWM2_/A5
916P4.6XI/SCS_
1017P4.7X0/SCK_
1532P5.0DMDM, DP: USB host HUB0 or D-, D+ signal terminal of USB device.
1431P5.1DP
--30P5.4HM/ALE/XB

XB, XA: B/inverting, A/in-phase signal terminal of iRS485.

ALE: Address latch signal output in multiplexed address mode.

!A15: External bus address A15 Inverting output for chip select.

HM, HP: The USB host extends the D- and D+ signals of HUB1.

--29P5.5HP/!A15/XA
63P5.7RSTExternal reset input with built-in pull-down resistor.