Smart Home Automation Forum
KC868-AIO ESP32 I/O pin define - Printable Version

+- Smart Home Automation Forum (https://www.kincony.com/forum)
+-- Forum: Technical Support (https://www.kincony.com/forum/forumdisplay.php?fid=20)
+--- Forum: KC868-AIO (https://www.kincony.com/forum/forumdisplay.php?fid=46)
+--- Thread: KC868-AIO ESP32 I/O pin define (/showthread.php?tid=2735)



KC868-AIO ESP32 I/O pin define - admin - 03-24-2023

ESP32 ANALOG_A1 GPIO36 For (Analog Multiplexer: cd74hc4067) to extend "analog input" 1-16

ESP32 ANALOG_A2  GPIO39  analog input 17
ESP32 ANALOG_A3  GPIO34  analog input 18
ESP32 ANALOG_A4  GPIO35  analog input 19

IIC Bus:A

SDA-A:GPIO4
SCL-A:GPIO16

PCF8575:U40 (output 1-16): 100 100 = 0x24
PCF8575:U41 (output 17-32): 100 101 = 0x25

PCF8575:U42 (output 33-38): 100 110 = 0x26

cd74hc4067
S0-A: PCF8575->U42->P10 (output 33)
S1-B: PCF8575->U42->P11 (output 34)
S2-C: PCF8575->U42->P12 (output 35)
S3-D: PCF8575->U42->P13 (output 36)

free LEDs:

LED-D7: PCF8575->U42->P14 (output 37)
LED-D8: PCF8575->U42->P15 (output 38)
-----------------------------------------------------------------------------------

PCF8575:U35 (input 1-16): 100 001 = 0x21
PCF8575:U37 (input 17-32): 100 010 = 0x22

PCF8575:U38 (input 33-48): 100 011 = 0x23
PCF8575:U42 (input 49-58): 100 110 = 0x26

PCF8575->U42->P0 (input 49)
PCF8575->U42->P1 (input 50)
PCF8575->U42->P2 (input 51)
PCF8575->U42->P3 (input 52)
PCF8575->U42->P4 (input 53)
PCF8575->U42->P5 (input 54)
PCF8575->U42->P6 (input 55)
PCF8575->U42->P7 (input 56)
PCF8575->U42->P14 (input 57)
PCF8575->U42->P15 (input 58)

-----------------------------------------------------------------------------------------

PCA9685: address 0x00
-----------------------------------------------------------------------------------------

Button-S1: reset
Button-S2: GPIO0
Button-S3: PCF8575->U42->P14 (input 57)
Button-S4: PCF8575->U42->P15 (input 58)

-------------------------------------------------------------------------------------------


DS18B20/DHT11/DHT21/LED strip -(TP1): GPIO14
DS18B20/DHT11/DHT21/LED strip -(TP2): GPIO5

-------------------------------------------------------------------------------------------

Ethernet (LAN8720) I/O define:

#define ETH_ADDR        0
#define ETH_POWER_PIN  -1
#define ETH_MDC_PIN    23
#define ETH_MDIO_PIN  18
#define ETH_TYPE      ETH_PHY_LAN8720
#define ETH_CLK_MODE  ETH_CLOCK_GPIO17_OUT

-------------------------------------------------------------------------------------------

RS485:
RXD(A): GPIO32
TXD(B): GPIO33

------------------------------------------------------------------------------------------

4G GSM Module / Extend serial port:

RXD: GPIO13
TXD: GPIO15

---------------------------------------------------------------------------------------------

DS3231 RTC module: IIC address 0x68
EEPROM's default I2C address is 0x57