I2C-RPT-08

From Land Boards Wiki
Revision as of 21:04, 15 May 2022 by Blwikiadmin (talk | contribs) (→‎Rev 1 Issues)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Tindie-mediums.png

I2C-RPT-08-X1-P218-720px.jpg

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

I2C-RPT-08-X1-Conns-P218-720px.png

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

  1. GND (GND pin marked)
  2. 3.3V or 5V VCC
  3. SDA
  4. SCL

J2-J5 - Slave I2C Connections (x8)

  1. GND
  2. 3.3V or 5V VCC (Power Out - if jumper 1-2 installed, Power in - if jumper 1-2 is not installed)
  3. SDA
  4. 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

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

IC2RPT-08 P1871-720px.jpg

  • 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
  • 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

I2C-RPT-08 FRONT.png

Rev 1 Issues

  • No functional issues
  • Silkscreen shows SCK, should be SCL

Assembly Sheet