Difference between revisions of "I2CIO-8"

From Land Boards Wiki
Jump to navigation Jump to search
 
(13 intermediate revisions by the same user not shown)
Line 194: Line 194:
 
* [[Arduino Based Test Station]]
 
* [[Arduino Based Test Station]]
 
* [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]
 +
 +
== MMBASIC Test Station (Rev 3 card) ==
 +
 +
* UUT
 +
* [[PiPicoMite01]]
 +
** VGA
 +
** PS/2 Keyboard
 +
** Test Station SD Card
 +
** 5V to USB connector
 +
* Type
 +
<pre>
 +
chdir "lbcards"
 +
load "I2CIO8_Test.bas"
 +
run
 +
</pre>
 +
* Type 1 to Bounces LED
 +
* Type 2 to loopback jumpers to LEDs
 +
** Move jumper across D4-7
 +
** Verify LEDs D0-3 light
 +
** Verify Int LED illuminates briefly
  
 
== Drivers/Example Code ==
 
== Drivers/Example Code ==
Line 235: Line 255:
 
==== MMBASIC ====
 
==== MMBASIC ====
  
* [https://github.com/land-boards/RasPiPico/blob/main/PicoMite_MMBASIC/PicoMite_VGA/Land%20Boards%20BASIC%20Programs/lbcards/I2CIO8-ReadWrite.bas I2CIO8-ReadWrite.bas] - Rev 1 and 2 I2CIO-8 cards
+
* [https://github.com/land-boards/RasPiPico/blob/main/PicoMite_MMBASIC/PicoMite_VGA/Land%20Boards%20BASIC%20Programs/lbcards/I2CIO8-ReadWrite.bas I2CIO8-ReadWrite.bas]
* [ https://github.com/land-boards/RasPiPico/blob/main/PicoMite_MMBASIC/PicoMite_VGA/Land%20Boards%20BASIC%20Programs/lbcards/I2CIO8-ReadWriteV3.bas ReadWriteV3.bas] - Rev 3 card
+
** Rev 1 and 2 I2CIO-8 cards
 +
* [https://github.com/land-boards/RasPiPico/blob/main/PicoMite_MMBASIC/PicoMite_VGA/Land%20Boards%20BASIC%20Programs/lbcards/I2CIO8-ReadWriteV3.bas I2CIO8-ReadWriteV3.bas]
 +
** Rev 3 card
 +
** Active low interrupt requires external pull-up enabled
 +
** Runs on I2C0 (I2C in MMBASIC) on pins GP0, GP1
 +
** Interrupt on GP2
 
* [https://github.com/land-boards/RasPiPico/blob/main/PicoMite_MMBASIC/PicoMite_VGA/Land%20Boards%20BASIC%20Programs/lbcards/I2CIO8-Bounce.bas I2CIO8-Bounce.bas]
 
* [https://github.com/land-boards/RasPiPico/blob/main/PicoMite_MMBASIC/PicoMite_VGA/Land%20Boards%20BASIC%20Programs/lbcards/I2CIO8-Bounce.bas I2CIO8-Bounce.bas]
  
Line 242: Line 267:
  
 
=== Rev 3 ===
 
=== Rev 3 ===
 +
 +
* The Rev 3 card is functionally the same as rev 1 and 2 cards '''except the interrupt LED polarity is flipped'''
 +
** Active low LED allows for open drain output from multiple cards to be wire-ORed together
 +
** Requires an external pullup (can typically be done in the I2C master card)
  
 
[[file:I2CIO8_P18216_394px.png]]
 
[[file:I2CIO8_P18216_394px.png]]

Latest revision as of 18:08, 4 June 2022

Tindie-mediums.png

I2CIO-8 X2-6000-720px.jpg

Features

  • 8 bits of Digital I/O
  • I2C interface
  • MCP23008 - 8-Bit I/O Expander with I2C Interface
  • Base address = 0x20
  • Address offset jumpers (0-7)
  • Interrupt pin on I2C connectors
  • Interrupt LED
  • I2C Daisy-chain connectors
  • 4 input (or output) jumpers
  • 4 LEDs
  • 2.7V to 5.5V
  • 49x49mm form factor
  • (4) #4-40 mounting holes

Headers/Jumpers - Rev X1, X2 Board

I2CIO-8-CAD-X3.png

J1, J2 - I2C Connectors

  • Daisy-chain connectors
  • Can ignore second connector
  • Pinout
  1. GND
  2. Power (2.7V-5V)
  3. SDA
  4. SCL
  5. Interrupt (Out)

H5-H8 - GVS connectors

  • D4-D7
  • Signal/Ground

H8, H9 - I2C Terminators

  • Install to terminate SDA/SCL with 2.2K terminator

A0-A2 - I2C Address Jumpers

  • Install all 3 for address - 0x20

Headers/Jumpers - Rev 3

I2CIO-8 Rev3 CAD.PNG

J1 - I2C Connector

  • Daisy-chain connectors
    • Duplicated all 5 pins
  • Right angle 0.1" pitch header
  • Can ignore second side of connector is not daisy-chaining other cards
  • Pinout
  1. GND
  2. Power (3.3V or 5V)
  3. SDA
  4. SCL
  5. Interrupt (Active-Low Output)

H1 - I2C Terminators

  • Install shunts to terminate SDA/SCL with 2.2K terminators

H2 - I2C Address Jumpers

  • Install all 3 shunts for address - 0x20

H3 - D4-D7 Inputs Header

  • D4-D7
  • Signal/Ground
  • 10K Pullups

Indicators

D0-D3 LEDS

  • D0-D3 outputs

D9 - INT LED

  • Interrupt - LED goes off when interrupt is present (Rev X1, X2 cards)
  • Interrupt - LED goes on when interrupt is present (Rev 3 card)

Schematics

Factory Acceptance Test

DIGIO-8 P1821 720PX.jpg

Test Station Theory of Operations

  • Test Station controls the I2C interface on the UUT
  • Three tests
    • Internal Test
    • External Loopback Test
    • Bounce an LED Test

Test Station Set-up

  • Uses ODAS Test Station V2
  • Unit Under Test (UUT)
  • Attach Host Computer USB to the Arduino NANO on the Test Station
  • Run puTTY on the Host Computer
    • 9600 baud

Card Selection

  • puTTY will display the menu
Checking if EEPROM is present on UUT...EEPROM is not present on UUT
Count of I2C devices in range 0x20-0x27 on UUT = 1
Detected MCP23008
Select the board type (Other)
1 - I2CIO8 board
2 - I2CIO8X board
Select board >
  • Select 1
Init I2CIO-8 card
C=Card Tests, D=Direct, E=EEPROM, I=access Internal DIGIO32

Running Card Test

  • Select Card Tests = "C"
  • Select Run Tests = "T"
  • Move jumper across the 4 jumper pins H5-H8
  • LEDs will correspond
  • INT LED will blink on/off
  • Observe test results
C=Card Tests, D=Direct, E=EEPROM, I=access Internal DIGIO32
L=Loop/S=Single, T=Test, B=Bounce LEDs, I=UUT Int'l Tests, X=eXit sub-menu
Testing UUT = I2CIO-8
I2CIO8 card tests
Move jumper across H5-H8, observe LEDs D0-D3
Verify Int LED blinks
Hit a key to stop test
Test PASS = 1, FAIL = 0
  • Hit ENTER to display menu
L=Loop/S=Single, T=Test, B=Bounce LEDs, I=UUT Int'l Test, X=eXit sub-menu

Running Internal Tests

  • Remove loopback cable
  • Select Card Tests = "C"
  • Select Run Tests = "I"
  • Observe test results
L=Loop/S=Single, T=Test, B=Bounce LEDs, I=UUT Int'l Tests, X=eXit sub-menu
UUT Internal card tests
Test PASS = 2, FAIL = 0
  • Hit ENTER to display menu
L=Loop/S=Single, T=Test, B=Bounce LEDs, I=UUT Int'l Test, X=eXit sub-menu

Running Blink LED Test

  • Select Card Tests = "C"
  • Select Run Tests = "B"
  • Observe LEDs scanning on the 4 LEDs on the card
L=Loop/S=Single, T=Test, B=Bounce LEDs, I=UUT Int'l Test, X=eXit sub-menu
Bounce a bit across outputs
Bouncing LEDs I2CIO8 - any key to stop
  • Hit ENTER to display the menu
Finished bouncing LEDs

Reference

MMBASIC Test Station (Rev 3 card)

  • UUT
  • PiPicoMite01
    • VGA
    • PS/2 Keyboard
    • Test Station SD Card
    • 5V to USB connector
  • Type
chdir "lbcards"
load "I2CIO8_Test.bas"
run
  • Type 1 to Bounces LED
  • Type 2 to loopback jumpers to LEDs
    • Move jumper across D4-7
    • Verify LEDs D0-3 light
    • Verify Int LED illuminates briefly

Drivers/Example Code

Extensive Driver Support for Arduino, Raspberry Pi, MicroPython, ESP-32, Blue Pill Board, Cypress PSoC

Arduino Driver / Examples

BeagleBone Black

ESP32

PSOC5 Driver

Raspberry Pi Example

QT Py Python Example

Raspberry Pi Pico

MMBASIC

Changes

Rev 3

  • The Rev 3 card is functionally the same as rev 1 and 2 cards except the interrupt LED polarity is flipped
    • Active low LED allows for open drain output from multiple cards to be wire-ORed together
    • Requires an external pullup (can typically be done in the I2C master card)

I2CIO8 P18216 394px.png

  • Change I2C to 2x5 right angle header
    • INT trace on rear side so it could be cut to isolate 2nd daisy-chain
  • Combine I2C terminator headers into one 2x2 header
  • Re-label GP4-7 inputs as D4-7
  • Add 3D parts to model
  • Flip polarity on INT LED so it lights when interrupt was present
  • Move INT LED closer to board edge
  • Rotate LEDS so they can be mounted at a right angle
    • Allows close stacking of cards

I2CIO-8 REV3 FRONT 3D.png

Assembly Sheet