Difference between revisions of "I2C-RPT-08"
Jump to navigation
Jump to search
Blwikiadmin (talk | contribs) |
Blwikiadmin (talk | contribs) |
||
(19 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | [[File:tindie-mediums.png|link=https://www.tindie.com/products/ | + | [[File:tindie-mediums.png|link=https://www.tindie.com/products/9603/]] |
+ | |||
+ | [[File:I2C-RPT-08-X1-P218-720px.jpg]] | ||
<video type="youtube">npC48tq4MF8</video> | <video type="youtube">npC48tq4MF8</video> | ||
− | |||
− | |||
== Features == | == Features == | ||
Line 79: | Line 79: | ||
== Schematic == | == Schematic == | ||
− | * [http://land-boards.com/I2C-RPT-08/I2CRPT08_RevX1_Schematic.pdf I2C-RPT-08 Schematic] | + | * [http://land-boards.com/I2C-RPT-08/I2CRPT08_RevX1_Schematic.pdf I2C-RPT-08 Rev X1 Schematic] |
+ | * [http://land-boards.com/I2C-RPT-08/I2CRPT08_Rev2_Schematic.pdf I2C-RPT-08 Rev 2 Schematic] | ||
== Drivers/Example Code == | == Drivers/Example Code == | ||
− | * [https://github.com/land-boards/lb-Arduino-Code/tree/master/libraries/LandBoards_I2CRPT08 | + | * [https://github.com/land-boards/lb-Arduino-Code/tree/master/libraries/LandBoards_I2CRPT08 Arduino Driver code] - Github repo |
− | * [https://github.com/land-boards/lb-Arduino-Code/blob/master/LBCards/I2CRPT08/I2CIO8X8wMux/I2CIO8X8wMux.ino | + | * [https://github.com/land-boards/lb-Arduino-Code/blob/master/LBCards/I2CRPT08/I2CIO8X8wMux/I2CIO8X8wMux.ino Arduino Example code] - Github repo |
− | * [https://github.com/land-boards/RasPi/tree/master/RPI-I2C-Hub Raspberry Pi Example Code] | + | * [https://github.com/land-boards/RasPi/tree/master/RPI-I2C-Hub Raspberry Pi Example Code] - Github repo |
=== Programming Note === | === Programming Note === | ||
Line 91: | Line 92: | ||
* The mux chip allows multiple or single I2C ports to be written at the same time | * The mux chip allows multiple or single I2C ports to be written at the same time | ||
** To only enable one port at a time make sure you disable a channel after use or disable last channel used before enabling new channel | ** To only enable one port at a time make sure you disable a channel after use or disable last channel used before enabling new channel | ||
+ | |||
+ | === Arduino Driver Functions === | ||
+ | <pre> | ||
+ | LandBoards_I2CRPT08(void) - Constructor | ||
+ | void begin(uint8_t addr) - Set mux I2C address (offset or absolution 0x70-0x77) | ||
+ | void begin() - Assume I2C address = 0x20 | ||
+ | void setI2CChannel(uint8_t chNum, uint8_t enableFlag) - chNum = 0x0-0x7. I2CRPT08_MUXCH_DISABLE, I2CRPT08_MUXCH_ENABLE | ||
+ | uint8_t getI2CChannel(void) - Read entire channel status - useful for testing | ||
+ | </pre> | ||
== Testing == | == Testing == | ||
Line 96: | Line 106: | ||
=== Test Station Hardware === | === Test Station Hardware === | ||
− | [[File: | + | [[File:IC2RPT-08_P1871-720px.jpg]] |
* [[Arduino Based Test Station]] | * [[Arduino Based Test Station]] | ||
** Built in I2C mux on [[BLACK-PILL-HUB]] is set to offset=0x1 so it does not conflict with I2C address of UUT | ** Built in I2C mux on [[BLACK-PILL-HUB]] is set to offset=0x1 so it does not conflict with I2C address of UUT | ||
** Cabling | ** Cabling | ||
− | *** UUT | + | *** UUT J1 Host connects to I2C port (J7) on the [[BLACK-PILL-HUB]] |
− | |||
* Uses 8x of [[I2CIO-8]] cards | * Uses 8x of [[I2CIO-8]] cards | ||
− | ** Cabling | + | ** Cabling 4 wire from [[I2CIO-8]] cards J1 to UUT I2C #0-#7 |
** Address jumpers are all installed for base address of 0x20 | ** Address jumpers are all installed for base address of 0x20 | ||
* On Unit Under Test (UUT) | * On Unit Under Test (UUT) | ||
− | ** Install (3) jumpers into A0-A2 for card I2C address = 0x70 | + | ** Install (3) h9 jumpers into A0-A2 for card I2C address = 0x70 |
=== Test Procedure === | === Test Procedure === | ||
Line 128: | Line 137: | ||
* Replies with | * Replies with | ||
<pre> | <pre> | ||
− | Init I2C-RPT- | + | Init I2C-RPT-08 card |
I2CIO8 card #0 was detected | I2CIO8 card #0 was detected | ||
I2CIO8 card #1 was detected | I2CIO8 card #1 was detected | ||
Line 139: | Line 148: | ||
C=Card Tests, D=Direct, E=EEPROM, I=access Internal DIGIO32 | C=Card Tests, D=Direct, E=EEPROM, I=access Internal DIGIO32 | ||
</pre> | </pre> | ||
− | * Verify that all | + | * Verify that all 8 I2CIO-8 cards were detected |
+ | |||
+ | === Internal Tests === | ||
+ | |||
* Select C to test card | * Select C to test card | ||
+ | * Select I to run internal tests | ||
+ | ** Tests I2C interface to UUT | ||
+ | <pre> | ||
+ | UUT Internal card tests | ||
+ | Test PASS = 1, FAIL = 0 | ||
+ | </pre> | ||
+ | |||
+ | === Bounce LEDS === | ||
+ | |||
* Select B to bounce LED across LEDs on all 4 I2CIO-8 cards | * Select B to bounce LED across LEDs on all 4 I2CIO-8 cards | ||
* Verify all 16 LEDs blink | * Verify all 16 LEDs blink | ||
+ | <pre> | ||
+ | Bounce a bit across outputs | ||
+ | Bouncing LEDs I2C-RPT-01 and I2CIO8 - any key to stop | ||
+ | Hit any key to stop test | ||
+ | </pre> | ||
* Hit any key to stop blinking | * Hit any key to stop blinking | ||
− | |||
− | |||
=== Test Station Software === | === Test Station Software === | ||
Line 151: | Line 175: | ||
* [https://github.com/land-boards/lb-Arduino-Code/tree/master/LBCards/ODAS/ODASTESTER ODAS Tester Github Repo] | * [https://github.com/land-boards/lb-Arduino-Code/tree/master/LBCards/ODAS/ODASTESTER ODAS Tester Github Repo] | ||
− | == Rev 1 Issues == | + | == Issues == |
+ | |||
+ | === Rev 2 === | ||
+ | |||
+ | * Rev 2 fixes SCK -> SCL | ||
+ | * Adds port numbers to slave connectors | ||
+ | * Move SMT fiducials to bottom (lot of resistors on the rear of card) | ||
+ | * Combined Power jumpers into the Port jumpers | ||
+ | * Moved J2 away from mounting screw | ||
+ | * Add silkscreen details | ||
+ | * Removed C2 from front of board | ||
+ | * Added 3D model for all parts | ||
+ | * KiCad 6 | ||
+ | |||
+ | [[file:I2C-RPT-08_FRONT.png]] | ||
+ | |||
+ | === Rev 1 Issues === | ||
+ | * No functional issues | ||
* Silkscreen shows SCK, should be SCL | * Silkscreen shows SCK, should be SCL | ||
== Assembly Sheet == | == Assembly Sheet == | ||
− | * [[I2C-RPT-08 Assembly Sheet]] | + | * [[I2C-RPT-08 Assembly Sheet]] - Rev X1 |
+ | * [[I2C-RPT-08 Rev 2 Assembly Sheet]] - Rev 2 |
Latest revision as of 21:04, 15 May 2022
Contents
Features
- I2C Hub / Repeater / Replicator / Multiplexer / De-multiplexer / Switch
- PCA9548A Datasheet
- Eight I2C Ports
- 100KHz/400KHz operation
- I2C Base Address 0x70
- Offset addresses 0x70-0x77
- Host port
- Controlled via I2C
- 3.3V or 5V host operation
- Can power slave cards if they are at the same voltage
- 3.3V or 5V slave ports operation
- Removable jumper(s) to supply power from slave
- Voltage translation between the ports
- Ex: a Raspberry Pi which runs 3.3V can control I2C devices which run at 5V
- On-board 2.2K termination resistors
- 49x49mm form factor
- 4 solid 4-40 mounting holes
- Drivers/Example Code
- Arduino driver and example code
- Raspberry Pi example code
Connectors
- 0.1" pitch connections
- Search ebay for Dupont headers
- Search ebay for Dupontwire jumper cable
- The slave I2C connectors are (4) 2x6 right angle 0.1" pitch headers
- Two ports per 2x6 connector
- Two of the pins are for power to or from the I2C connector
- The other four pins are for the I2C interface
H1-H8 - Power to/from I2C Connectors
- Install shunt to power the I2C slave card from the I2C-RPT-08 Card
- Default factory ships as installed to power external I2C interfaces from the card
- Remove shunt to power interface externally
- Need to remove if external voltage is different level or sourced externally
- H1 - PORT #0
- ...
- H8 = PORT #7
H9 - I2C Slave Address Jumpers
- A0-A2
- Install all 3 jumpers for address 0x70
- Remove all three jumpers for address 0x77
J1 - Host I2C Connection
- GND (GND pin marked)
- 3.3V or 5V VCC
- SDA
- SCL
J2-J5 - Slave I2C Connections (x8)
- GND
- 3.3V or 5V VCC (Power Out - if jumper 1-2 installed, Power in - if jumper 1-2 is not installed)
- SDA
- SCL (Board marked with SCK)
Jumpers
A0-A2 - Multiplexer I2C Base Address
- Install for Ax = 0 (factory default address = 0)
- Remove for Ax = 1
Schematic
Drivers/Example Code
- Arduino Driver code - Github repo
- Arduino Example code - Github repo
- Raspberry Pi Example Code - Github repo
Programming Note
- The mux chip allows multiple or single I2C ports to be written at the same time
- To only enable one port at a time make sure you disable a channel after use or disable last channel used before enabling new channel
Arduino Driver Functions
LandBoards_I2CRPT08(void) - Constructor void begin(uint8_t addr) - Set mux I2C address (offset or absolution 0x70-0x77) void begin() - Assume I2C address = 0x20 void setI2CChannel(uint8_t chNum, uint8_t enableFlag) - chNum = 0x0-0x7. I2CRPT08_MUXCH_DISABLE, I2CRPT08_MUXCH_ENABLE uint8_t getI2CChannel(void) - Read entire channel status - useful for testing
Testing
Test Station Hardware
- Arduino Based Test Station
- Built in I2C mux on BLACK-PILL-HUB is set to offset=0x1 so it does not conflict with I2C address of UUT
- Cabling
- UUT J1 Host connects to I2C port (J7) on the BLACK-PILL-HUB
- Uses 8x of I2CIO-8 cards
- Cabling 4 wire from I2CIO-8 cards J1 to UUT I2C #0-#7
- Address jumpers are all installed for base address of 0x20
- On Unit Under Test (UUT)
- Install (3) h9 jumpers into A0-A2 for card I2C address = 0x70
Test Procedure
- Run puTTY
- COM port from Device Manager
- 9600 baud
- No parity
- No handshake
- Menu will display
Checking if EEPROM is present on UUT...EEPROM is not present on UUT Count of I2C devices in range 0x20-0x27 on UUT = 0 Found external I2C mux card Select I2C Mux board type 1 - I2C-RPT-01 board 2 - I2C-RPT-08 board
- Enter 2
- Replies with
Init I2C-RPT-08 card I2CIO8 card #0 was detected I2CIO8 card #1 was detected I2CIO8 card #2 was detected I2CIO8 card #3 was detected I2CIO8 card #4 was detected I2CIO8 card #5 was detected I2CIO8 card #6 was detected I2CIO8 card #7 was detected C=Card Tests, D=Direct, E=EEPROM, I=access Internal DIGIO32
- Verify that all 8 I2CIO-8 cards were detected
Internal Tests
- Select C to test card
- Select I to run internal tests
- Tests I2C interface to UUT
UUT Internal card tests Test PASS = 1, FAIL = 0
Bounce LEDS
- Select B to bounce LED across LEDs on all 4 I2CIO-8 cards
- Verify all 16 LEDs blink
Bounce a bit across outputs Bouncing LEDs I2C-RPT-01 and I2CIO8 - any key to stop Hit any key to stop test
- Hit any key to stop blinking
Test Station Software
Issues
Rev 2
- Rev 2 fixes SCK -> SCL
- Adds port numbers to slave connectors
- Move SMT fiducials to bottom (lot of resistors on the rear of card)
- Combined Power jumpers into the Port jumpers
- Moved J2 away from mounting screw
- Add silkscreen details
- Removed C2 from front of board
- Added 3D model for all parts
- KiCad 6
Rev 1 Issues
- No functional issues
- Silkscreen shows SCK, should be SCL
Assembly Sheet
- I2C-RPT-08 Assembly Sheet - Rev X1
- I2C-RPT-08 Rev 2 Assembly Sheet - Rev 2