Difference between revisions of "I2CIO16-DB25"

From Land Boards Wiki
Jump to navigation Jump to search
(Created page with "link=https://www.tindie.com/products/land_boards/16-bit-digital-io-w-proto-area-proto16-i2c/ == 16-Bit Digital I/O Card with Prototyping area ==...")
 
 
(80 intermediate revisions by the same user not shown)
Line 1: Line 1:
[[File:tindie-mediums.png|link=https://www.tindie.com/products/land_boards/16-bit-digital-io-w-proto-area-proto16-i2c/]]
+
[[File:tindie-mediums.png|link=https://www.tindie.com/products/27089/]]
  
== 16-Bit Digital I/O Card with Prototyping area ==
+
[[File:I2CIO16-DB25_P18283-720px.jpg]]
 
 
[[File:Proto16-I2C-P1010411-720px.jpg]]
 
  
 
== Features ==
 
== Features ==
Line 12: Line 10:
 
* I2C Interface - Two Wire Interface
 
* I2C Interface - Two Wire Interface
 
** Can run at 400 KHz or faster
 
** Can run at 400 KHz or faster
* I/O Connector is inexpensive/standard DB-25
+
* I/O Connector is inexpensive/standard DB-25 female
** Fuse protected power output on DB-25 with jumper bypass
+
** Easy/quick to connect/disconnect
* Large prototyping area
+
** 16 Digital I/O lines
** Connections at edges to DB-25 and GPIO lines
+
** (3) Power, (3) Ground
* EEPROM for board ID and application specific information
 
** Write Enable jumper protects against accidental writes
 
* [[Open Data Acquisition System]] (ODAS) form factor (width is 95 mm)
 
 
* Host connectors
 
* Host connectors
 
** Daisy-chain I2C connector
 
** Daisy-chain I2C connector
 
** Address select jumper
 
** Address select jumper
** Expandable I2C via [[I2C-RPT]] - I2C Repeater
+
** I2C base address = 0x20
** Interrupt out/Card Present
+
** Jumpers allow card to be put at any I2C address in range 0x20-0x27
** Power connector (not required for minimal loads)
+
** Expandable I2C via [[I2C-RPT]] or [[I2C-RPT-08]] - I2C Repeater
*** Reversible pinout for safety
+
*** Maximal example
 +
**** 8 [[I2C-RPT-08]] Multiplexers
 +
**** 8 cards per multiplexer
 +
**** 16 I/O connections per card
 +
**** 1,024 I/O
 
** I2C Termination jumpers for end of I2C chain
 
** I2C Termination jumpers for end of I2C chain
 
* Power can be 3.3V or 5V
 
* Power can be 3.3V or 5V
* 95mm wide [[Open Data Acquisition System]] format
+
* Easy mounting options
* 6-32 Mounting holes
+
** Front panel cut-out
 
+
** 6-32 Mounting holes
=== Prototyping Area ===
+
** Boards can be stacked with 6-32 standoffs
 
 
* Large prototyping area
 
* Ideal for through-hole ICs
 
* Extra I/O Rows on both sides
 
** One side connects to DB-25 connector
 
** Other side connects to MCP23017 pins
 
* Prototyping area in the center of the card with power/ground bus up the middle two pins
 
** Easy connection to IC Power/Grounds
 
* Silkscreen on both sides of the card
 
 
 
[[File:PROTO16-protoarea-I2C.PNG]]
 
 
 
* The above is the top two rows of the prototyping area
 
* The pins on the far left are the pin number of the DB-25 connector (ex: Pin 24 is the top left, and pin 11 is in the next row).
 
* The next 3 pins are bussed across to each other (the same row)
 
* The next column has GND in all column positions
 
* The next column has VCC in all column positions
 
* The next 3 pins are bussed across to each other (the same row)
 
* The far right pin has the DIGIO part connections (blank for the first row and Digital I/O pin 8 in the next point).
 
  
 
== Connectors ==
 
== Connectors ==
  
[[File:PROTO16-I2C-cad-bw.png]]
+
[[File:I2CIO16-DB25.PNG]]
  
=== H1 - Power ===
+
=== J1 - DB-25 I/O Connector ===
  
* Connector is 1x5 of 0.1" header
+
* DB-25 female pinout from the front of the card/connector
* Connector is reversible
 
* Connector is optional since power can also be brought in via the I2C connector
 
  
# GND
+
[[File:DB25_F.png]]
# PWR
 
# GND
 
# PWR
 
# GND
 
  
=== H2 - Interrupt/Card Present Flag ===
+
* Pins 1, 2, 14 are connected to Power
 +
* Pins 12, 13, 25 are connected to Ground
 +
* Pins 11, 15, 24 are not used
  
# GND
+
[[file:I2CIO16-DB25_J1.PNG]]
# INT0*
 
# CARD_PRESENT* (Low if card is present, should be pulled up by Host card)
 
  
=== H3 - Address Select ===
+
=== J2 - I2C Termination ===
  
* Sets the I2C offset address of the card
+
* Two of two position headers
* Three bit address A1, A2
+
* Install headers in each position to terminate I2C line
 +
* There should only be one set of I2C termination jumpers and termination should be at the end of the I2C daisy-chain
 +
* Side-by-side horizontal orientation (opposite of Address jumpers orientation)
  
# A0
+
[[file:I2CIO16-DB25_I2C_term_Jumpers.png]]
# A1
 
# A2
 
  
=== H4 - I2C ===
+
=== J3 - I2C ===
  
 
* Connector is 2x5 of 0.1" header
 
* Connector is 2x5 of 0.1" header
Line 90: Line 64:
 
* May still want to connect ground
 
* May still want to connect ground
  
 +
# INT
 
# SCL
 
# SCL
 
# SDA
 
# SDA
Line 95: Line 70:
 
# GND
 
# GND
  
=== H5 - EEPROM Write Enable ===
+
=== J4 - Address Select ===
 +
 
 +
[[file:I2CIO16-DB25_J4.PNG]]
 +
 
 +
* Sets the I2C offset address of the card
 +
* Install jumper for Ax = 0, remove jumper for Ax = 1
 +
* Three bit address A1, A2
 +
 
 +
# A0
 +
# A1
 +
# A2
  
* Install to allow writes to EEPROM
+
{| class="wikitable"
* Remove to prohibit writes to EEPROM
+
! I2C Address
 +
! J4(A2)
 +
! J4(A1)
 +
! J4(A0)
 +
|-
 +
| 0x0
 +
| In
 +
| In
 +
| In
 +
|-
 +
| 0x1
 +
| In
 +
| In
 +
| Out
 +
|-
 +
| 0x2
 +
| In
 +
| Out
 +
| In
 +
|-
 +
| 0x3
 +
| In
 +
| Out
 +
| Out
 +
|-
 +
| 0x4
 +
| Out
 +
| In
 +
| In
 +
|-
 +
| 0x5
 +
| Out
 +
| In
 +
| Out
 +
|-
 +
| 0x6
 +
| Out
 +
| Out
 +
| In
 +
|-
 +
| 0x7
 +
| Out
 +
| Out
 +
| Out
 +
|-
 +
|}
  
=== H6 I2C Termination ===
+
* Jumper orientation
  
* Two of two position headers
+
[[file:I2CIO16-DB25_I2C_addr_Jumpers.png]]
* Install headers in each position to terminate I2C line
 
* There should only be one I2C termination and it should be at the end of the I2C line
 
  
=== J1 - DB-25 I/O Connector ===
+
== Rear Side Marking ==
  
* Pins 1, 2, 14 are connected to Ground
+
[[file:I2CIO16-DB25_REV1_REAR_3D.png]]
* Pins 12, 13, 25 are connected to Power
 
* Pins 3-11 and 15-24 are connected to the Prototype area and are labeled on the PCB
 
  
 
== MCP23017 Drivers ==
 
== MCP23017 Drivers ==
Line 118: Line 144:
 
=== Arduino Drivers ===
 
=== Arduino Drivers ===
  
* [https://github.com/douggilliland/lb-Arduino-Code/tree/master/LBCards/PROTO16I2C Land Boards Arduino Driver Code/Example Software] for the PROTO16-I2C Card
+
* [https://github.com/land-boards/lb-Arduino-Code/blob/master/LBCards/I2CIO16DB25 Land Boards Arduino Driver Code/Example Software] for the PROTO16-I2C Card
 
* [https://github.com/adafruit/Adafruit-MCP23017-Arduino-Library Adafruit MCP23017 Arduino Driver]
 
* [https://github.com/adafruit/Adafruit-MCP23017-Arduino-Library Adafruit MCP23017 Arduino Driver]
  
Line 124: Line 150:
  
 
* [http://wiringpi.com/extensions/i2c-mcp23008-mcp23017/ Raspberry Pi WiringPi Driver]
 
* [http://wiringpi.com/extensions/i2c-mcp23008-mcp23017/ Raspberry Pi WiringPi Driver]
 +
 +
=== Raspberry Pi Pico ===
 +
 +
==== MMBASIC ====
 +
 +
* [https://github.com/land-boards/RasPiPico/blob/main/PicoMite_MMBASIC/PicoMite_VGA/Land%20Boards%20BASIC%20Programs/lbcards/GPIO16/I2CIO16-DB25.bas I2CIO16-DB25.bas] code to bounce an LED
 +
** Runs on [[PiPicoMite01]] or [[PiPicoMite02]] card
  
 
=== BeagleBone Black Drivers ===
 
=== BeagleBone Black Drivers ===
Line 143: Line 176:
 
* [http://lxr.free-electrons.com/source/drivers/gpio/gpio-mcp23s08.c Linux Driver source code]
 
* [http://lxr.free-electrons.com/source/drivers/gpio/gpio-mcp23s08.c Linux Driver source code]
  
== EEPROM ==
+
== Mechanicals ==
  
* [http://ww1.microchip.com/downloads/en/DeviceDoc/21210G.pdf 24LC024 EEPROM]
+
[[file:I2CIO16-DB25_Mechs.PNG]]
** 2kbit
 
** I2C Serial EEPROM
 
** Wide Voltage range (1.8V to 5.5V)
 
** 400 KHz operating range
 
* 10 mS write cycle time
 
* EEPROM has a board ID
 
** [https://github.com/douggilliland/lb-Arduino-Code/tree/master/LBCards/ODAS/ODAS_EEPROM ODAS EEPROM Code]
 
  
 
== Factory Acceptance Tests ==
 
== Factory Acceptance Tests ==
  
[[File:Proto16-I2C-P1010614-720px.jpg]]
+
=== Setup ===
  
=== Setup ===
+
* Unit Under Test (UUT)
 +
* Runs on [[PiPicoMite02 Based Test Station]]
 +
** [[PiPicoMite02]]
 +
** [[LED-32]] card
 +
*** Uses 16 LEDs for the digital I/O and 3 for power
 +
 
 +
[[File:PiPicoMite02_TestStation_Cables_P18298-720px.jpg]]
  
* Runs [http://land-boards.com/blwiki/index.php?title=Open_Data_Acquisition_System#ODAS_Card_Test_Software ODAS Card Test Software] on Arduino Nano [[NANO-BKOUT]] with [[I2C-RPT]] card
+
* I2C cable from [[PiPicoMite02 Based Test Station]] to UUT
* USB running puTTY
+
* Cables/Adapter
** 9600 baud
+
** [[DB25RIBBON]] with male connector plugged into UUT
  
=== Program Personality EEPROM ===
+
==== Ribbon Cable Wiring ====
  
* Menu driven
+
* Cable between [[LED-32]] and [[DB25RIBBON]]
* Auto-detects card
 
* If test has been run before
 
<pre>
 
Checking EEPROM for board type...Detected PROTO16-I2C board
 
R=Read EEPROM, W=Write EEPROM, T=Test DIGIOs, L=Loop Test, B=Bounce LEDs
 
</pre>
 
* Presents card type list for un-programmed EEPROMs
 
<pre>
 
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 - TBD board
 
9 - TBD board
 
Select board >
 
</pre>
 
  
* Select board
+
{| class="wikitable"
 +
! J1
 +
! DB25
 +
! I2CIO16
 +
! LED-32
 +
!
 +
! J1
 +
! DB25
 +
! I2CIO16
 +
! LED-32
 +
|-
 +
| 25
 +
| 1
 +
| GND
 +
|
 +
|
 +
| 26
 +
|
 +
| N/C
 +
|
 +
|-
 +
| 23
 +
| 2
 +
| GND
 +
|
 +
|
 +
| 24
 +
| 14
 +
| GND
 +
|
 +
|-
 +
| 21
 +
| 3
 +
| GP0
 +
| D15
 +
|
 +
| 22
 +
| 15
 +
| N/C
 +
|
 +
|-
 +
| 19
 +
| 4
 +
| GP1
 +
| D14
 +
|
 +
| 20
 +
| 16
 +
| GP15
 +
| D24
 +
|-
 +
| 17
 +
| 5
 +
| GP2
 +
| D13
 +
|
 +
| 18
 +
| 17
 +
| GP14
 +
| D25
 +
|-
 +
| 15
 +
| 6
 +
| GP3
 +
| D12
 +
|
 +
| 16
 +
| 18
 +
| GP13
 +
| D26
 +
|-
 +
| 13
 +
| 7
 +
| GP4
 +
| D11
 +
|
 +
| 14
 +
| 19
 +
| GP12
 +
| D27
 +
|-
 +
| 11
 +
| 8
 +
| GP5
 +
| D10
 +
|
 +
| 12
 +
| 20
 +
| GP11
 +
| D28
 +
|-
 +
| 9
 +
| 9
 +
| GP6
 +
| D9
 +
|
 +
| 10
 +
| 21
 +
| GP10
 +
| D29
 +
|-
 +
| 7
 +
| 10
 +
| GP7
 +
| D8
 +
|
 +
| 8
 +
| 22
 +
| GP9
 +
| D30
 +
|-
 +
| 5
 +
| 11
 +
| N/C
 +
|
 +
|
 +
| 6
 +
| 23
 +
| GP8
 +
| D31
 +
|-
 +
| 3
 +
| 12
 +
| +3.3V
 +
| D0
 +
|
 +
| 4
 +
| 24
 +
| N/C
 +
|
 +
|-
 +
| 1
 +
| 13
 +
| +3.3V
 +
| D1
 +
|
 +
| 2
 +
| 25
 +
| +3.3V
 +
| D3
 +
|-
 +
|}
  
<pre>
+
=== Run Test Code ===
Select board > 6
 
Writing EEPROM
 
Initializing eep buffer
 
len of buffer=96
 
reading block
 
Family=ODAS
 
Company=land.boards.com
 
Product=PROTO16-I2C
 
</pre>
 
  
=== Run I2C Loopback Tests ===
+
* Runs [https://github.com/land-boards/RasPiPico/blob/main/PicoMite_MMBASIC/PicoMite_VGA/Land%20Boards%20BASIC%20Programs/lbcards/GPIO16/I2CIO16-DB25.bas I2CIO16-DB25.bas] code
 +
* Run on [[PiPicoMite02 Based Test Station]]
  
* Test 'T'
 
 
<pre>
 
<pre>
Loopback Test PASS = 1, FAIL = 0
+
chdir "/lbcards/GPIO16"
 +
load "I2CIO16-DB25.bas"
 +
run
 
</pre>
 
</pre>
  
=== Run Bouncing LEDs ===
+
* Result
 +
** Code bounces LED
 +
** 3 Power LEDs should be constantly be lit
  
* Select B
+
== Issues ==
<pre>
 
Bouncing LEDs - any key to stop
 
</pre>
 
* Use LED card
 
  
== Issues with Rev X1 board ==
+
=== Rev 1 ===
  
Add A0 jumper for EEPROM and MCP23017
+
* No issues
Verified works in Rev X2 (Kickstarter)
+
* Card is fully functional
  
== PROTO16-I2C Assembly Sheet ==
+
== I2CIO16-DB25 Rev 1 Assembly Sheet ==
  
* [[Proto16-I2C Assembly Sheet]]
+
* [[I2CIO16-DB25 Rev 1 Assembly Sheet]]
* [[PROTO16-I2C Assembly Sheet Rev X1]]
 

Latest revision as of 11:49, 21 June 2022

Tindie-mediums.png

I2CIO16-DB25 P18283-720px.jpg

Features

  • 16-bit Digital I/O card
    • MCP23017 16-bit I2C I/O Expander
    • Strong library support for all major microprocessors for MCP23017
  • I2C Interface - Two Wire Interface
    • Can run at 400 KHz or faster
  • I/O Connector is inexpensive/standard DB-25 female
    • Easy/quick to connect/disconnect
    • 16 Digital I/O lines
    • (3) Power, (3) Ground
  • Host connectors
    • Daisy-chain I2C connector
    • Address select jumper
    • I2C base address = 0x20
    • Jumpers allow card to be put at any I2C address in range 0x20-0x27
    • Expandable I2C via I2C-RPT or I2C-RPT-08 - I2C Repeater
      • Maximal example
        • 8 I2C-RPT-08 Multiplexers
        • 8 cards per multiplexer
        • 16 I/O connections per card
        • 1,024 I/O
    • I2C Termination jumpers for end of I2C chain
  • Power can be 3.3V or 5V
  • Easy mounting options
    • Front panel cut-out
    • 6-32 Mounting holes
    • Boards can be stacked with 6-32 standoffs

Connectors

I2CIO16-DB25.PNG

J1 - DB-25 I/O Connector

  • DB-25 female pinout from the front of the card/connector

DB25 F.png

  • Pins 1, 2, 14 are connected to Power
  • Pins 12, 13, 25 are connected to Ground
  • Pins 11, 15, 24 are not used

I2CIO16-DB25 J1.PNG

J2 - I2C Termination

  • Two of two position headers
  • Install headers in each position to terminate I2C line
  • There should only be one set of I2C termination jumpers and termination should be at the end of the I2C daisy-chain
  • Side-by-side horizontal orientation (opposite of Address jumpers orientation)

I2CIO16-DB25 I2C term Jumpers.png

J3 - I2C

  • Connector is 2x5 of 0.1" header
  • Intended to be used for I2C daisy-chain of 4-pin cabling
  • Power can be attached to the connector or power can be provided to the card via the J1 power connector
  • May still want to connect ground
  1. INT
  2. SCL
  3. SDA
  4. VCC
  5. GND

J4 - Address Select

I2CIO16-DB25 J4.PNG

  • Sets the I2C offset address of the card
  • Install jumper for Ax = 0, remove jumper for Ax = 1
  • Three bit address A1, A2
  1. A0
  2. A1
  3. A2
I2C Address J4(A2) J4(A1) J4(A0)
0x0 In In In
0x1 In In Out
0x2 In Out In
0x3 In Out Out
0x4 Out In In
0x5 Out In Out
0x6 Out Out In
0x7 Out Out Out
  • Jumper orientation

I2CIO16-DB25 I2C addr Jumpers.png

Rear Side Marking

I2CIO16-DB25 REV1 REAR 3D.png

MCP23017 Drivers

There are quite a I2C drivers for every major microcontroller (Arduino, Raspberry Pi, BeagleBone, etc).

Arduino Drivers

Raspberry Pi Drivers

Raspberry Pi Pico

MMBASIC

BeagleBone Black Drivers

ESP32 MicroPython Drivers

PyBoard MicroPython Drivers

Linux Drivers

Mechanicals

I2CIO16-DB25 Mechs.PNG

Factory Acceptance Tests

Setup

PiPicoMite02 TestStation Cables P18298-720px.jpg

Ribbon Cable Wiring

J1 DB25 I2CIO16 LED-32 J1 DB25 I2CIO16 LED-32
25 1 GND 26 N/C
23 2 GND 24 14 GND
21 3 GP0 D15 22 15 N/C
19 4 GP1 D14 20 16 GP15 D24
17 5 GP2 D13 18 17 GP14 D25
15 6 GP3 D12 16 18 GP13 D26
13 7 GP4 D11 14 19 GP12 D27
11 8 GP5 D10 12 20 GP11 D28
9 9 GP6 D9 10 21 GP10 D29
7 10 GP7 D8 8 22 GP9 D30
5 11 N/C 6 23 GP8 D31
3 12 +3.3V D0 4 24 N/C
1 13 +3.3V D1 2 25 +3.3V D3

Run Test Code

chdir "/lbcards/GPIO16"
load "I2CIO16-DB25.bas"
run
  • Result
    • Code bounces LED
    • 3 Power LEDs should be constantly be lit

Issues

Rev 1

  • No issues
  • Card is fully functional

I2CIO16-DB25 Rev 1 Assembly Sheet