DIGIO-128

From blwiki
Jump to: navigation, search

Tindie-mediums.png

DIGIO-128-X3-CCA 5847-640px.jpg

128 Line Digital I/O Card

Do you need more I/O lines than you get from your Microcomputer? This card lets you add an incredible number of Digital I/O lines to your Arduino, Raspberry Pi, ESP32 or Beaglebone Black.

Features

  • 128 GPIO (General Purpose Input/Output) lines
    • 25mA sink/source capability per I/O
  • I2C Two-Wire Host interface, 100/400 KHZ operation
    • MCP23017 I2C Parallel I/O
    • Jumper selectable terminators
    • Single 4-pin host interface connector (Ground, Power, Clock, Data)
  • 0.1" Pitch Connectors
    • I/O Connectors
      • 16 digital I/O
      • 2 Power
      • 2 Ground
    • Interrupt connectors
    • Power Connector
  • 24LC024 Personality EEPROM
  • 3.3V or 5V operation
  • Compatible with Arduino, Raspberry Pi, BeagleBone Black, ESP32
  • Software drivers for MCP23017 for Arduino, Raspberry Pi, BeagleBone Black, ESP32

I2C Addressing

  • DIGIO I2C Base Address is 0x20
    • Address range 0x20-0x27
    • Note this means there can only be one card per I2C interface
  • Personality EEPROM address is 0x50

I2C Address to I/O Connector Mapping

The board uses 8 I2C addresses for the Digital I/O (0x20-0x27) and one address for the EEPROM (0x40).

DIGIO-128-I2C-Addrs-X2.png

Connectors

DIGIO-128-X3.PNG

P1-P4, P6-P9 - DIGIO 20-pin connectors

  • Pin 1 has "1" marked next to it.
  • Pin 1 = GPIO7

P1-DIGIO-Conn.PNG

P5, P10 - Interrupt Connectors

  • Each Interrupt connector has an interrupt lines from the four ICs in the same row.

P5-INTs-Conn-X2.PNG

P5

  1. INT1 (Interrupt from U2)
  2. INT2 (Interrupt from U3)
  3. INT0 (Interrupt from U1)
  4. INT3 (Interrupt from U4)

P10

  1. INT5 (Interrupt from U6)
  2. INT6 (Interrupt from U7)
  3. INT4 (Interrupt from U5)
  4. INT7 (Interrupt from U8)

J1 - Power Connector

  • This connection may not be necessary in some applications since power also comes in through the I2C connector
  • Reverse plug resistant (symmetric pinout)

J1-Power-X2.PNG

  1. +VCC - marked as +V
  2. GND
  3. +VCC - marked as +V
  4. GND
  5. +VCC - marked as +V

J2/J3 - I2C Connector

  • The GPIO base board address is 0x20 (mismarked on Rev X2 cards as 0x40).
  • The EEPROM address is 0x50 (mismarked on Rev X2 cards as 0xA0).

J2-J3-I2C-conn-X2.PNG

  1. GND
  2. +V
  3. SDA
  4. SCL

J4 - I2C Terminators/Write Enable

P4-I2C-Terms-X2.PNG

  • 1-2, Installed = allow writes (1K pulldown)
  • 3-4. Installed = terminate SCL line (2.2K pullup)
  • 5-6. Installed = terminate SDA line (2.2K pullup)

DIGIO-128 Rev X1 Connectors

Drivers/Libraries

Arduino Drivers

Raspberry Pi Python Drivers

BeagleBone Black Drivers

ESP-32 MicroPython Driver

PyBoard MicroPython Driver

Kicad Library

Factory Acceptance tests

Loopback test

  • Wire between adjacent connectors
    • P1<>P2, P3<>P4, etc.
  • Wire opposite sides
  • Wire adjacent sides
    • P1(GP0)<>P2(GP15)

D128-LB.PNG

DIGIO-128 5761-640px.jpg

Test Procedure

  • Runs ODAS Card Test Software on Arduino Nano
  • Loopback cables
  • USB running puTTY
    • 9600 baud
  • Menu driven
  • Auto-detect card if test has been run before
Checking EEPROM for board type...Detected OptoIn8-I2C board
R=Read EEPROM, W=Write EEPROM, T=Test DIGIOs, L=Loop Test, B=Bounce LEDs
  • Presents card type list for un-programmed EEPROMs
Checking EEPROM for board type...Company Mismatch
Select the board type
1 - DIGIO16-I2C board
2 - DIGIO-128 board
3 - OptoIn8-I2C board
4 - OptoOut8-I2C board
5 - DIGIO32-I2C board
6 - PROTO16-I2C board
7 - ODAS-PSOC5 board
8 - ODAS-RELAY16 board
A - DIGIO-128/64 board
9 - TBD board
Select board > 
  • Select board
    • 2 for DIGIO-128
    • A for DIGIO-128/64
Select board > 3
Writing EEPROM
Initializing eep buffer
len of buffer=96
reading block
Family=ODAS
Company=land.boards.com
  • Test 'T'
  • Fail (no cable)
Error on chip 2 and port 0 Expected LOW
Error on chip 2 and port 1 Expected LOW
Error on chip 2 and port 2 Expected LOW
Error on chip 2 and port 3 Expected LOW
Error on chip 2 and port 4 Expected LOW
...
Error on chip 6 and port 13 Expected LOW
Error on chip 6 and port 14 Expected LOW
Error on chip 6 and port 15 Expected LOW
Loopback Test PASS = 0, FAIL = 1
  • PassChecking EEPROM for board type...Detected OptoIn8-I2C board
R=Read EEPROM, W=Write EEPROM, T=Test DIGIOs, L=Loop Test, B=Bounce LEDs
Loopback Test PASS = 1, FAIL = 0

DIGIO-128 on Raspberry Pi Checkout

Hardware/Setup

DIGIO-128-RPI-P363-Cropped.jpg

Test Steps

  • Log onto Raspberry Pi
    • User = Pi
    • Password = Raspberry
  • cd RasPi/
    • Make sure latest software is installed on the Raspberry Pi
git pull
sudo i2cdetect -y 1

     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- 71 -- -- -- -- -- --
sudo i2cset -y 1 0x71 0x04 0x04
  • Verify that the DIGIO-128 is present
sudo i2cdetect -y 1

     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: 20 21 22 23 24 25 26 27 -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: 50 -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- 71 -- -- -- -- -- --
  • This shows that the 8 MCP23017 chips on the card are present as well as the personality EEPROM.
    • 0x20-0x27 are the hex addresses of the chips
    • 0x50 is the personality EEPROM

Raspberry Pi Example Code

cd RasPi/ODAS/DIGIO128/
sudo ./RasPiDigio128.py

Rev X2 Checkout

  • Issue is that the silkscreen with the board address is incorrect.
    • Cover with PTouch label.

EEPROM

  • Tested and works.

Rev X1 Checkout

DIGIO-128 Rev X1 Checkout

Assembly Sheet

DIGIO-128 Assembly Sheet Rev X2

DIGIO-128 Assembly Sheet Rev X1