From 2f5131ec81a3cf8cd7c8e9c994c64a030572cc65 Mon Sep 17 00:00:00 2001
From: Michael Ingraham <34340210+meingraham@users.noreply.github.com>
Date: Wed, 2 Oct 2019 11:46:10 -0400
Subject: [PATCH] pinmode 6
---
MCP23008-MCP23017.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/MCP23008-MCP23017.md b/MCP23008-MCP23017.md
index 397c058a..e8c8abf5 100644
--- a/MCP23008-MCP23017.md
+++ b/MCP23008-MCP23017.md
@@ -72,7 +72,7 @@ The behavior of all pins on the MCP23008/MCP23017 can be reset to a specific set
Command|Parameters
-|-
-Sensor29|MCP23008 / MCP23017 I2C GPIO Expander configuration
`Reset` = reset all pins
x = `1..5`
`1` = INPUT mode, no reporting, no pull-up
`2` = INPUT mode, report on CHANGE, pull-up enabled
`3` = INPUT mode, report on LOW, pull-up enabled
`4` = INPUT mode, report on HIGH, pull-up enabled
`5` = OUTPUT mode (if enabled by #define USE_MCP230xx_OUTPUT)
`pin,pinmode{,intpullup\|outstate{,repmode}}``pin` = the I/O pin on the MCP230xx chip- `0..7` for MCP23008
- `0..15` for the MCP23017)
`pinmode` = operational mode of the pin (`?, 0..5`)- `?` = query pin configuration
- `0` = Disabled (deprecated, but will be default for previously unconfigured devices)
- `1` = INPUT (Floating - only telemetry data will be sent according to configuration `TelePeriod` intervals)
- `2` = INPUT with INTERRUPT on CHANGE (will send an MQTT output on state change from LOW to HIGH **and** HIGH to LOW)
- `3` = INPUT with INTERRUPT on CHANGE to **LOW** (will send an MQTT output on state change **only** from HIGH to LOW)
- `4` = INPUT with INTERRUPT on CHANGE to **HIGH** (will send an MQTT output on state change **only** from LOW to HIGH)
- `5` = OUTPUT (if enabled with `#define USE_MCP230xx_OUTPUT`)
`intpullup` *(pinmode `1..4`)*. Pull-up resistors are disabled by default for pin mode `1` whilst enabled by default for pin modes `2..4` (because they are interrupt enabled pins and we do not want signal bounce). The internal pull-up on these pins may be disabled if necessary if you are biasing them externally.- `0` = weak internal pull-up disabled *(default for pinmode `1`)*
- `1` = weak internal pull-up enabled *(default for pinmode `2..4`)*
`outstate` *(pinmode `5..6`)* = set the default state of an OUTPUT pin on reset/power-up. If your device is configured to save state (`SetOption0 = 1`), the `outstate` setting will be ignored and the last known state of the pin will be applied during power-up/reset.- `0/off` = set output pin to OFF
- `1/on` = set output pin state to ON
- `2/toggle` = toggle output pin state
`repmode` = reporting mode (optional). Interrupt mode is disabled for pinmode `1` and for output pinmodes (`5..6`)- `0` = interrupt using Event and report using telemetry *(default for pinmode `2..4`)*
- `1` = interrupt using Event only (no telemetry reported)
- `2` = report using telemetry only (no Event triggered)
+Sensor29|MCP23008 / MCP23017 I2C GPIO Expander configuration
`Reset` = reset all pins
x = `1..6`
`1` = INPUT mode, no reporting, no pull-up
`2` = INPUT mode, report on CHANGE, pull-up enabled
`3` = INPUT mode, report on LOW, pull-up enabled
`4` = INPUT mode, report on HIGH, pull-up enabled
`5` = OUTPUT mode (if enabled by `#define USE_MCP230xx_OUTPUT`)
`6` = inverted OUTPUT mode (if enabled by `#define USE_MCP230xx_OUTPUT`)
`pin,pinmode{,intpullup\|outstate{,repmode}}``pin` = the I/O pin on the MCP230xx chip- `0..7` for MCP23008
- `0..15` for the MCP23017)
`pinmode` = operational mode of the pin (`?, 0..5`)- `?` = query pin configuration
- `0` = Disabled (deprecated, but will be default for previously unconfigured devices)
- `1` = INPUT (Floating - only telemetry data will be sent according to configuration `TelePeriod` intervals)
- `2` = INPUT with INTERRUPT on CHANGE (will send an MQTT output on state change from LOW to HIGH **and** HIGH to LOW)
- `3` = INPUT with INTERRUPT on CHANGE to **LOW** (will send an MQTT output on state change **only** from HIGH to LOW)
- `4` = INPUT with INTERRUPT on CHANGE to **HIGH** (will send an MQTT output on state change **only** from LOW to HIGH)
- `5` = OUTPUT (if enabled with `#define USE_MCP230xx_OUTPUT`)
- `6` = inverted OUTPUT (if enabled with `#define USE_MCP230xx_OUTPUT`)
`intpullup` *(pinmode `1..4`)*. Pull-up resistors are disabled by default for pin mode `1` whilst enabled by default for pin modes `2..4` (because they are interrupt enabled pins and we do not want signal bounce). The internal pull-up on these pins may be disabled if necessary if you are biasing them externally.- `0` = weak internal pull-up disabled *(default for pinmode `1`)*
- `1` = weak internal pull-up enabled *(default for pinmode `2..4`)*
`outstate` *(pinmode `5..6`)* = set the default state of an OUTPUT pin on reset/power-up. If your device is configured to save state (`SetOption0 = 1`), the `outstate` setting will be ignored and the last known state of the pin will be applied during power-up/reset.- `0/off` = set output pin to OFF
- `1/on` = set output pin state to ON
- `2/toggle` = toggle output pin state
`repmode` = reporting mode (optional). Applicable only for pinmode `2..4`. Reporting mode is disabled for pinmode `1` and for output pinmodes (`5..6`)- `0` = interrupt using Event and report using telemetry *(default)*
- `1` = interrupt using Event only (no telemetry reported)
- `2` = report using telemetry only (no Event triggered)
Examples:
`Sensor29 Reset1`