1.0.4 • Published 3 years ago
node-red-contrib-redplc-mcp23sxx v1.0.4
node-red-contrib-redplc-mcp23sxx
redPlc module node for MCP23S08 and MCP23S17 I/O Expander.
Install
Install with Node-Red Palette Manager or npm command:
cd ~/.node-red
npm install node-red-contrib-redplc-mcp23sxx
Features MCP23S08
- 8x Digital inputs/outputs
- Digital input with pullup resistor
- 4 address set with jumper
- SPI bus (Max. 10Mhz)
Features MCP23S17
- 16x Digital inputs/outputs
- Digital input with pullup resistor
- 7 address set with jumper
- SPI bus (Max. 10Mhz)
Usage
Wire this node to first output of redPlc cpu node. Global variable I are updated with digital inputs. Global variable Q sets digital output. This node works only on Raspberry Pi with Raspberry Pi OS. Enable SPI with raspi-config.
I/O Mapping
MCP23S08
Digital Input (Variable I):
Digital Output (Variable Q):
Pin | Bit |
---|---|
GP0 | 0 |
GP1 | 1 |
GP2 | 2 |
GP3 | 3 |
GP4 | 4 |
GP5 | 5 |
GP6 | 6 |
GP7 | 7 |
MCP23S17
Digital Input (Variable I):
Digital Output (Variable Q):
Pin | Bit | Pin | Bit |
---|---|---|---|
GPA0 | 0 | GPB0 | 8 |
GPA1 | 1 | GPB1 | 9 |
GPA2 | 2 | GPB2 | 10 |
GPA3 | 3 | GPB3 | 11 |
GPA4 | 4 | GPB4 | 12 |
GPA5 | 5 | GPB5 | 13 |
GPA6 | 6 | GPB6 | 14 |
GPA7 | 7 | GPB7 | 15 |
Donate
If you like my work please support it with donate:
1.0.4
3 years ago