Difference between revisions of "SWLEDX8-I2C"
Jump to navigation
Jump to search
Blwikiadmin (talk | contribs) |
Blwikiadmin (talk | contribs) |
||
Line 101: | Line 101: | ||
** [https://github.com/land-boards/lb-Arduino-Code/tree/master/LBCards/ArduinoInABox/AiBMenu Example running on Arduino in a Box] | ** [https://github.com/land-boards/lb-Arduino-Code/tree/master/LBCards/ArduinoInABox/AiBMenu Example running on Arduino in a Box] | ||
− | === MicroPython Drivers == | + | === MicroPython Drivers === |
==== ESP32 MicroPython Driver ==== | ==== ESP32 MicroPython Driver ==== |
Revision as of 14:43, 24 May 2022
Contents
Features
- 16-Bit Digital I/O card with a small form factor
- MCP23017 I/O Expander
- I2C interface
- I2C Daisy-Chain (In/Out) connectors
- (3) I2C Address select jumpers for up to 8 devices per I2C bus
- SCL/SDA termination jumpers
- 2x10 pins Digital I/O Header
- 16 digital pins
- 2 power, 2 ground pins
- 59mmx38mm
- (4) #4-40 mounting holes
- SWLEDx8-I2C can be used standalone or stacked together with the SWLEDX8 card
- Software Drivers
Build Options
- There are a number of options for using the card
- Stacked option with SWLEDX8 card
- Small footprint option
- Low height/profile option
Stacked option with SWLEDX8 card
- SWLEDX8 card mounts above this card
- Pins can be directly mounted to both cards or male/female connector pairs can be used
Small footprint option
Low height/profile option
Rear Side Marking
Connectors
- Connectors are as follows
P1 - GPIO Pins
Connections to SWLEDX8 Card
- When paired with SWLEDX8
P2 - I2C Interface
- 2X5 header
- Pinout
- GND
- VCC
- SDA
- SCL
- INTA
P3 - I2C Terminators / I2C Address Offset Jumpers
- Install left 2 jumpers to terminate I2C bus
- Typically, the "last" card in a chain
- Install right 3 jumpers for I2C base address offset in range 0x20 (all installed) to 0x27 (all removed)
Drivers / Software Examples
- Any MCP23017 library should work with this card
Arduino
- LandBoards MCP23017
- pinMode(uint8_t bit, uint8_t value) - Set bits 0-7=Input, 8-15=Output
- readGPIOA() - Read the 8 Switches
- writeOLATB(uint8_t baData) _ Write the 8 LEDs
- digitalRead(uint8_t bit) - read a single Switch (bit=0-7)
- digitalWrite(uint8_t bit, uint8_t wrVal) - write a single LED (nit=8-15)
- SWLEDX8_01.ino - Read 8 Switches, Write 8 LEDs
MicroPython Drivers
ESP32 MicroPython Driver
PyBoard MicroPython Driver
Raspberry Pi Pico
MMBASIC
- SWLEDX8-01.bas - Read 8x switches, write 8x LEDs
Mechanicals
Versions
Rev 2
- Functionally the same as Rev X1
- Change resistors from SMT (0805) to through hole (1/8W)
- Adds silkscreen Front/Rear
- Added test block to rear
Rev X1
- Words, no issues