meta data for this page
  •  

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
sensor:mcp23017 [2025/12/03 23:34] vamsansensor:mcp23017 [2025/12/04 00:34] (current) vamsan
Line 1: Line 1:
 ~~NOCACHE~~ ~~NOCACHE~~
 ====== lamaPLC: MCP23017 / MCP23S17 16-Bit I/O Expander with Serial Interface ====== ====== lamaPLC: MCP23017 / MCP23S17 16-Bit I/O Expander with Serial Interface ======
-The MCP23017/MCP23S17 (**MCP23X17**) device family provides 16-bit, general-purpose parallel I/O expansion for [[com:basic_i2c|I²C]] bus or [[com:basic_spi|SPI]] applications. The two devices differ only in the serial interface: +The MCP23017/MCP23S17 (**MCP23X17**) (**CJMCU-2317**) device family provides 16-bit, general-purpose parallel I/O expansion for [[com:basic_i2c|I²C]] bus or [[com:basic_spi|SPI]] applications. The two devices differ only in the serial interface: 
-  * MCP23017 – I2C interface+  * MCP23017 – I²C interface
   * MCP23S17 – SPI interface   * MCP23S17 – SPI interface
  
Line 10: Line 10:
  
 The 16-bit I/O port functionally consists of two 8-bit ports (PORTA and PORTB). The MCP23X17 can be configured to operate in the 8-bit or 16-bit modes via IOCON.BANK. The 16-bit I/O port functionally consists of two 8-bit ports (PORTA and PORTB). The MCP23X17 can be configured to operate in the 8-bit or 16-bit modes via IOCON.BANK.
-===== Features =====+===== MCP23017 / MCP23S17 Features ===== 
 +Operating voltage: 1.8V to 5.5V \\ 
 Voltage on Vdd with respect to Vss: **-0.3V to +5.5V** \\  Voltage on Vdd with respect to Vss: **-0.3V to +5.5V** \\ 
 +Communication interface: I²C (up to 1.7 MHz), SPI (up to 10 MHz) \\ 
 +Number I/O Pins: 16 \\ 
 +Interrupt pins: 2 \\ 
 +Operating temperature: -40 °C to 125 °C \\ 
 Total power dissipation: 700 mW \\  Total power dissipation: 700 mW \\ 
 Maximum current out of Vss pin: 150 mA \\  Maximum current out of Vss pin: 150 mA \\ 
 Maximum current into Vdd pin: 125 mA \\  Maximum current into Vdd pin: 125 mA \\ 
  
 +**MCP23017 / MCP23S17 IC Features:** \\ 
   * 16-Bit Remote Bidirectional I/O Port   * 16-Bit Remote Bidirectional I/O Port
       * I/O pins default to input       * I/O pins default to input
Line 37: Line 43:
       * 2.7V to 5.5V @ -40°C to +85°C       * 2.7V to 5.5V @ -40°C to +85°C
       * 4.5V to 5.5V @ -40°C to +125°C       * 4.5V to 5.5V @ -40°C to +125°C
-|{{:sensor:mcp23017_1.png?250|MCP23017}}|{{:sensor:mcp23017_2.png?250|MCP23017}}|{{:sensor:mcp23017_3.png?170|MCP23017}}| 
  
-===== Functional Block Diagram =====+|{{:sensor:mcp23017_1.png?250|MCP23017}}|{{:sensor:mcp23017_2.png?250|MCP23017}}|{{:sensor:mcp23017_3.png?160|MCP23017}}| 
 +===== MCP23017 / MCP23S17 Modul Pinout ===== 
 +^Pin name^Description^Pin name^Description^Pin name^Description| 
 +|**A2**|Hardware address pin; look below|**Vcc**|Power supply (1.8V to 5.5V)|**GND**|Ground| 
 +|**A1**|Hardware address pin; look below|**ITB**|Interrupt output for PORTB. Can be configured as active-high, active-low, or open-drain|**ITA**|Interrupt output for PORTA. Can be configured as active-high, active-low, or open-drain| 
 +|**A0**|Hardware address pin; look below|**B0**|digital output pin|**A0**|digital input pin| 
 +|**RESET**|Hardware reset. Must be externally biased|**B1**|digital output pin|**A1**|digital input pin| 
 +|**NC/SO**|I²C nop / SPI slave out|**B2**|digital output pin|**A2**|digital input pin| 
 +|**NC/CS**|I²C nop / SPI chip select|**B3**|digital output pin|**A3**|digital input pin| 
 +|**SDA/SI**|I²C data / SPI slave in|**B4**|digital output pin|**A4**|digital input pin| 
 +|**SCL/SCK**|I²C clock / SPI clock|**B5**|digital output pin|**A5**|digital input pin| 
 +|**GND**|Ground|**B6**|digital output pin|**A6**|digital input pin| 
 +|**Vcc**|Power supply (1.8V to 5.5V)|**B7**|digital output pin|**A7**|digital input pin| 
 +===== MCP23017 / MCP23S17 IC pins ===== 
 +{{:sensor:mcp23017_4.png|MCP23017 / MCP23S17 IC pins}} 
 + 
 +===== MCP23017 / MCP23S17 Functional Block Diagram =====
 {{:sensor:mcp23017_5.png|MCP23017 / MCP23S17 Functional Block Diagram}} {{:sensor:mcp23017_5.png|MCP23017 / MCP23S17 Functional Block Diagram}}
  
 +===== MCP23017 / MCP23S17 I²C / SPI address coding =====
 +The hardware address pins are used to determine the device address. To address a device, the corresponding address bits in the control byte must match the pin state. The pins must be biased externally.
  
-====== Source ====== +|{{:sensor:mcp23017_6.png|MCP23017 MCP23S17 I2C addressing}}|{{:sensor:mcp23017_7.png|MCP23017 MCP23S17 SPI addressing}}| 
-https://ww1.microchip.com/downloads/en/devicedoc/20001952c.pdf+|The MCP23017 is a slave I²C interface device that supports 7-bit addressing, with the read/write bit filling out the control byteThe slave address includes four fixed bits and three user-defined hardware address bits (pins A2, A1, and A0).|The MCP23S17 is a slave SPI device. The slave address contains four fixed bits and three user-defined hardware address bits (if enabled via IOCON.HAEN) (pins A2, A1, and A0), with the read/write bit filling out the control byte|
  
 +====== MCP23017 / MCP23S17 Source ======
 +https://ww1.microchip.com/downloads/en/devicedoc/20001952c.pdf
  
 ===== I²C topics on lamaPLC ===== ===== I²C topics on lamaPLC =====
Line 52: Line 77:
 \\ \\
 \\ \\
-{{tag>communication i2c MCP23017 MCP23S17 SPI I/O_Expander Serial}}+{{tag>communication i2c MCP23017 MCP23S17 SPI I/O_Expander Serial CJMCU-2317}}
 \\ \\
 This page has been accessed for: Today: {{counter|today}}, Until now: {{counter|total}} This page has been accessed for: Today: {{counter|today}}, Until now: {{counter|total}}