Difference between revisions of "PROTO16-I2C"

From Land Boards Wiki
Jump to navigation Jump to search
(Created page with "== 16-Bit Digital I/O Card with Prototyping area == File:Proto16-I2C-P1010411-640px.jpg == Features == 16-bit Digital I/O card MCP23017 16-bit I2C I/O Expander Strong l...")
 
 
(67 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/]]
 +
 +
<video type="youtube">-E36qUUt2tQ</video>
 +
 
== 16-Bit Digital I/O Card with Prototyping area ==
 
== 16-Bit Digital I/O Card with Prototyping area ==
  
[[File:Proto16-I2C-P1010411-640px.jpg]]
+
[[File:Proto16-I2C-P1010411-720px.jpg]]
  
 
== Features ==
 
== Features ==
  
16-bit Digital I/O card
+
* 16-bit Digital I/O card
MCP23017 16-bit I2C I/O Expander
+
** [https://ww1.microchip.com/downloads/aemDocuments/documents/APID/ProductDocuments/DataSheets/MCP23017-Data-Sheet-DS20001952.pdf MCP23017 Datasheet] - Rev D
Strong library support for all major microprocessors for MCP23017
+
** [https://hackaday.com/2023/02/03/mcp23017-went-through-shortage-hell-lost-two-inputs/?fbclid=IwAR1ktG1CsU7ns5fmTYXdlpBLdqaJmBioXrVrG1_Lgqe8MTQr1AY4rp6IETU MCP23017... LOST TWO INPUTS]
I2C Interface - Two Wire Interface
+
*** MCP23017 now a 14/16-bit expander, with two of the pins (GPA7 and GPB7) losing their input capabilities
Can run at 400 KHz or faster
+
*** The chips look the same, are called the same, and act mostly the same — if you don’t download the latest version of the datasheet (Revision D), you’d never know that there’s been a change
I/O Connector is inexpensive/standard DB-25
+
** Strong library support for all major microprocessors for MCP23017
Fuse protected power output on DB-25 with jumper bypass
+
* I2C Interface - Two Wire Interface
Large prototyping area
+
** Can run at 400 KHz or faster
Connections at edges to DB-25 and GPIO lines
+
* I/O Connector is inexpensive/standard DB-25
EEPROM for board ID and application specific information
+
** Fuse protected power output on DB-25 with jumper bypass
Write Enable jumper protects against accidental writes
+
* Large prototyping area
Open Data Acquisition System (ODAS) form factor (width is 95 mm)
+
** Connections at edges to DB-25 and GPIO lines
Host connectors
+
* [https://www.mouser.com/ProductDetail/579-24LC024-P 24LC024] [[Open_Data_Acquisition_System#Personality_EEPROM|ODAS Personality EEPROM]]
Daisy-chain I2C connector
+
** Write Enable jumper protects against accidental writes
Address select jumper
+
* [[Open Data Acquisition System]] (ODAS) form factor (width is 95 mm)
Expandable I2C via I2C-RPT - I2C Repeater
+
* Host connectors
Interrupt out/Card Present
+
** Daisy-chain I2C connector
Power connector (not required for minimal loads)
+
** Address select jumper
Reversible pinout for safety
+
** Expandable I2C via [[I2C-RPT]] - I2C Repeater
I2C Termination jumpers for end of I2C chain
+
** Interrupt out/Card Present
Power can be 3.3V or 5V
+
** Power connector (not required for minimal loads)
95mm wide Open Data Acquisition System format
+
*** Reversible pinout for safety
6-32 Mounting holes
+
** I2C Termination jumpers for end of I2C chain
Prototyping Area
+
* Power can be 3.3V or 5V
Large prototyping area
+
* 95mm wide [[Open Data Acquisition System]] format
Ideal for through-hole ICs
+
* 6-32 Mounting holes
Extra I/O Rows on both sides
+
 
One side connects to DB-25 connector
+
=== Prototyping Area ===
Other side connects to MCP23017 pins
+
 
Prototyping area in the center of the card with power/ground bus up the middle two pins
+
* Large prototyping area
Easy connection to IC Power/Grounds
+
* Ideal for through-hole ICs
Silkscreen on both sides of the card
+
* Extra I/O Rows on both sides
PROTO16-protoarea-I2C.PNG
+
** 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
 +
* 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 ==
 +
 
 +
[[File:PROTO16-I2C-Rev3_CONNS.png]]
 +
 
 +
=== H1 - Power ===
 +
 
 +
* Connector is optional since power can also be brought in via the I2C connector
 +
* Connector is 1x5 of 0.1" header
 +
* Connector is reversible
 +
 
 +
# GND
 +
# PWR
 +
# GND
 +
# PWR
 +
# GND
 +
 
 +
=== H2 - Interrupt/Card Present Flag ===
 +
 
 +
# GND
 +
# INT0*
 +
# CARD_PRESENT* (Low if card is present, should be pulled up by Host card)
 +
 
 +
=== H3 - Address Select ===
 +
 
 +
* Sets the I2C offset address of the card
 +
* Three bit address A0, A1, A2
 +
 
 +
# A0
 +
# A1
 +
# A2
 +
 
 +
=== H4 - I2C ===
  
The above is the top two rows of the prototyping area
+
* Connector is 2x4 of 0.1" header
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).
+
* Intended to be used for I2C daisy-chain of 4-pin cabling
The next 3 pins are bussed across to each other (the same row)
+
* Power can be attached to the connector or power can be provided to the card via the J1 power connector
The next column has GND in all column positions
+
* May still want to connect ground
The next column has VCC in all column positions
+
 
The next 3 pins are bussed across to each other (the same row)
+
# SCL
The far right pin has the DIGIO part connections (blank for the first row and Digital I/O pin 8 in the next point).
+
# SDA
Connectors
+
# VCC
PROTO16-I2C-cad-bw.png
+
# GND
 +
 
 +
=== H5 - EEPROM Write Enable ===
 +
 
 +
* Install to allow writes to EEPROM
 +
* Remove to prohibit writes to EEPROM
 +
 
 +
=== H6 I2C Termination ===
 +
 
 +
* Two of two position headers
 +
* Install headers in each position to terminate I2C line
 +
* There should only be one I2C termination and IDEALLY it should be at the end of the I2C line
 +
 
 +
=== J1 - DB-25 I/O Connector ===
 +
 
 +
* Pins 1, 2, 14 are connected to Ground
 +
* 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
 +
 
 +
== Drivers ==
  
H1 - Power
 
Connector is 1x5 of 0.1" header
 
Connector is reversible
 
Connector is optional since power can also be brought in via the I2C connector
 
GND
 
PWR
 
GND
 
PWR
 
GND
 
H2 - Interrupt/Card Present Flag
 
GND
 
INT0*
 
CARD_PRESENT* (Low if card is present, should be pulled up by Host card)
 
H3 - Address Select
 
Sets the I2C offset address of the card
 
Three bit address A1, A2
 
A0
 
A1
 
A2
 
H4 - 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
 
SCL
 
SDA
 
VCC
 
GND
 
H5 - EEPROM Write Enable
 
Install to allow writes to EEPROM
 
Remove to prohibit writes to EEPROM
 
H6 I2C Termination
 
Two of two position headers
 
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
 
Pins 1, 2, 14 are connected to Ground
 
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
 
 
There are quite a I2C drivers for every major microcontroller (Arduino, Raspberry Pi, BeagleBone, etc).
 
There are quite a I2C drivers for every major microcontroller (Arduino, Raspberry Pi, BeagleBone, etc).
Arduino Drivers
 
Land Boards Arduino Driver Code/Example Software for the PROTO16-I2C Card
 
Adafruit MCP23017 Arduino Driver
 
Raspberry Pi Drivers
 
Raspberry Pi WiringPi Driver
 
BeagleBone Black Drivers
 
BeagleBone Black Example
 
ESP32 MicroPython Drivers
 
MicroPython MCP23017 driver
 
MicroPython Example code
 
PyBoard MicroPython Drivers
 
MicroPython MCP23017 driver
 
MicroPython Example
 
Linux Drivers
 
Linux Driver source code
 
EEPROM
 
24LC024 EEPROM
 
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
 
ODAS EEPROM Code
 
Factory Acceptance Tests
 
Proto16-I2C-P1010614-720px.jpg
 
  
Setup
+
=== Arduino Drivers ===
Runs ODAS Card Test Software on Arduino Nano NANO-BKOUT with I2C-RPT card
+
 
USB running puTTY
+
* [https://github.com/land-boards/lb-Arduino-Code/tree/master/libraries/LandBoards_MCP23017 LandBoards MCP23017 Library]
9600 baud
+
* [https://github.com/douggilliland/lb-Arduino-Code/tree/master/LBCards/PROTO16I2C Example Software]
Program Personality EEPROM
+
** [https://github.com/land-boards/lb-Arduino-Code/blob/master/LBCards/PROTO16I2C/PROTO16I2C_Blink/PROTO16I2CBlink.ino PROTO16I2CBlink] - Attach an LED to bit 0 and blink the LED
Menu driven
+
** [https://github.com/land-boards/lb-Arduino-Code/blob/master/LBCards/PROTO16I2C/PROTO16I2C_Blink16/PROTO16I2CLEDS16.ino PROTO16I2C_Blink16] - Blinks 16 lines one at a time
Auto-detects card
+
** [https://github.com/land-boards/lb-Arduino-Code/blob/master/LBCards/PROTO16I2C/PROTO16I2C_ReadInWriteOut/PROTO16I2CReadInWriteOut.ino PROTO16I2CReadInWriteOut] - Read an input, set an output bit
If test has been run before
+
 
 +
=== Raspberry Pi Drivers ===
 +
 
 +
* [https://github.com/land-boards/RasPi/blob/master/Adafruit_I2C/Adafruit_MCP230xx.py MCP23017 driver]
 +
 
 +
=== BeagleBone Black Drivers ===
 +
 
 +
* [https://github.com/mrmorphic/hwio/tree/master/devices/mcp23017 BeagleBone Black Example]
 +
 
 +
=== ESP32 MicroPython Drivers ===
 +
 
 +
* [https://github.com/land-boards/lb-Python-Code/tree/master/MicroPython/PyBoard%20Clone/libraries/mcp23017 MicroPython MCP23017 driver]
 +
* [https://github.com/land-boards/lb-Python-Code/tree/master/MicroPython/ESP32/libraries/proto16 MicroPython Example code]
 +
** [https://github.com/land-boards/lb-Python-Code/blob/master/MicroPython/ESP32/libraries/proto16/testProto16.py testProto16]
 +
 
 +
=== MicroPython Drivers ===
 +
 
 +
* [https://github.com/land-boards/lb-Python-Code/blob/master/MicroPython/PyBoard%20Clone/libraries/mcp23017/mcp23017.py MCP23017 Driver]
 +
* [https://github.com/land-boards/lb-Python-Code/tree/master/MicroPython/PyBoard%20Clone/libraries/proto16 MicroPython Examples]
 +
** [https://github.com/land-boards/lb-Python-Code/blob/master/MicroPython/PyBoard%20Clone/libraries/mcp23017/blinkMcp23017Led.py Blink output bit]
 +
 
 +
=== CircuitPython (MCP23017) Drivers ===
 +
 
 +
* [https://github.com/land-boards/lb-boards/blob/master/Projects/QTPy/Land%20Boards/Land%20Boards%20QT%20Py%20Code/PROTO16_Blink.py PROTO16_Blink.py] - Control the PROTO16-I2C card
 +
 
 +
=== Raspberry Pi Pico ===
 +
 
 +
* [https://github.com/land-boards/RasPiPico/blob/main/PicoMite_MMBASIC/PicoMite_VGA/Land%20Boards%20BASIC%20Programs/lbcards/GPIO16-02.bas MMBASIC Example Code]
 +
 
 +
== Personality EEPROM ==
 +
 
 +
* [http://ww1.microchip.com/downloads/en/DeviceDoc/21210G.pdf 24LC024 EEPROM]
 +
** 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/land-boards/lb-Arduino-Code/tree/master/LBCards/PROTO16I2C/PROTO16I2C_FAT PROTO16I2CFAT] - EEPROM exercise code
 +
** [https://github.com/douggilliland/lb-Arduino-Code/tree/master/LBCards/ODAS/ODAS_EEPROM ODAS EEPROM Code]
 +
 
 +
== Factory Acceptance Tests ==
 +
 
 +
[[File:Proto16-I2C-P1010614-720px.jpg]]
 +
 
 +
=== Setup ===
 +
 
 +
* 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
 +
* USB running puTTY
 +
** 9600 baud
 +
 
 +
=== Program Personality EEPROM ===
 +
 
 +
* Menu driven
 +
* Auto-detects card
 +
* If test has been run before
 +
<pre>
 
Checking EEPROM for board type...Detected PROTO16-I2C board
 
Checking EEPROM for board type...Detected PROTO16-I2C board
 
R=Read EEPROM, W=Write EEPROM, T=Test DIGIOs, L=Loop Test, B=Bounce LEDs
 
R=Read EEPROM, W=Write EEPROM, T=Test DIGIOs, L=Loop Test, B=Bounce LEDs
Presents card type list for un-programmed EEPROMs
+
</pre>
 +
* Presents card type list for un-programmed EEPROMs
 +
<pre>
 
Checking EEPROM for board type...Company Mismatch
 
Checking EEPROM for board type...Company Mismatch
 
Select the board type
 
Select the board type
Line 140: Line 199:
 
9 - TBD board
 
9 - TBD board
 
Select board >  
 
Select board >  
Select board
+
</pre>
 +
 
 +
* Select board
 +
 
 +
<pre>
 
Select board > 6
 
Select board > 6
 
Writing EEPROM
 
Writing EEPROM
Line 149: Line 212:
 
Company=land.boards.com
 
Company=land.boards.com
 
Product=PROTO16-I2C
 
Product=PROTO16-I2C
Run I2C Loopback Tests
+
</pre>
Test 'T'
+
 
 +
=== Run I2C Loopback Tests ===
 +
 
 +
* Test 'T'
 +
<pre>
 
Loopback Test PASS = 1, FAIL = 0
 
Loopback Test PASS = 1, FAIL = 0
 +
</pre>
 +
 +
=== Run Bouncing LEDs ===
  
Run Bouncing LEDs
+
* Select B
Select B
+
<pre>
 
Bouncing LEDs - any key to stop
 
Bouncing LEDs - any key to stop
Use LED card
+
</pre>
Proto16-I2C-Card-WithPogos-720px-P569.jpg
+
* Use LED card
 +
 
 +
== Rev History ==
 +
 
 +
Log of issues
 +
 
 +
=== Rev 3 ===
 +
 
 +
* Convert to Kicad 6
 +
** No schematic changes
 +
** New part libraries
 +
 
 +
[[file:Proto16-I2C_Front-720pxV.png]]
 +
 
 +
* Lots of Silkscreen changes
 +
** Array area more clearly delineated
 +
** Signal markings on rear of PCB
 +
 
 +
[[file:Proto16-I2C_REAR-720pxV.png]]
 +
 
 +
=== Rev X2 ===
 +
 
 +
* No functional issues
 +
* Add A0 jumper for EEPROM and MCP23017
 +
** Verified works in Rev X2 (Kickstarter)
 +
 
 +
=== Rev X1 ===
 +
 
 +
* No functional issues
 +
 
 +
== Mechanicals ==
  
Issues with Rev X1 board
+
[[file:PROTO16-I2C-Rev3-MECH_CAD.png]]
Add A0 jumper for EEPROM and MCP23017
 
Verified works in Rev X2 (Kickstarter)
 
Assembly Sheet
 
  
 
== PROTO16-I2C Assembly Sheet ==
 
== PROTO16-I2C Assembly Sheet ==
  
[[PROTO16-I2C Assembly Sheet Rev X1]]
+
* [[PROTO16-I2C Assembly Sheet Rev 3]]
 +
* [[PROTO16-I2C Assembly Sheet Rev X2]]

Latest revision as of 14:49, 4 February 2023

Tindie-mediums.png

16-Bit Digital I/O Card with Prototyping area

Proto16-I2C-P1010411-720px.jpg

Features

  • 16-bit Digital I/O card
    • MCP23017 Datasheet - Rev D
    • MCP23017... LOST TWO INPUTS
      • MCP23017 now a 14/16-bit expander, with two of the pins (GPA7 and GPB7) losing their input capabilities
      • The chips look the same, are called the same, and act mostly the same — if you don’t download the latest version of the datasheet (Revision D), you’d never know that there’s been a change
    • 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
    • Fuse protected power output on DB-25 with jumper bypass
  • Large prototyping area
    • Connections at edges to DB-25 and GPIO lines
  • 24LC024 ODAS Personality EEPROM
    • Write Enable jumper protects against accidental writes
  • Open Data Acquisition System (ODAS) form factor (width is 95 mm)
  • Host connectors
    • Daisy-chain I2C connector
    • Address select jumper
    • Expandable I2C via I2C-RPT - I2C Repeater
    • Interrupt out/Card Present
    • Power connector (not required for minimal loads)
      • Reversible pinout for safety
    • I2C Termination jumpers for end of I2C chain
  • Power can be 3.3V or 5V
  • 95mm wide Open Data Acquisition System format
  • 6-32 Mounting holes

Prototyping Area

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

PROTO16-I2C-Rev3 CONNS.png

H1 - Power

  • Connector is optional since power can also be brought in via the I2C connector
  • Connector is 1x5 of 0.1" header
  • Connector is reversible
  1. GND
  2. PWR
  3. GND
  4. PWR
  5. GND

H2 - Interrupt/Card Present Flag

  1. GND
  2. INT0*
  3. CARD_PRESENT* (Low if card is present, should be pulled up by Host card)

H3 - Address Select

  • Sets the I2C offset address of the card
  • Three bit address A0, A1, A2
  1. A0
  2. A1
  3. A2

H4 - I2C

  • Connector is 2x4 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. SCL
  2. SDA
  3. VCC
  4. GND

H5 - EEPROM Write Enable

  • Install to allow writes to EEPROM
  • Remove to prohibit writes to EEPROM

H6 I2C Termination

  • Two of two position headers
  • Install headers in each position to terminate I2C line
  • There should only be one I2C termination and IDEALLY it should be at the end of the I2C line

J1 - DB-25 I/O Connector

  • Pins 1, 2, 14 are connected to Ground
  • 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

Drivers

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

Arduino Drivers

Raspberry Pi Drivers

BeagleBone Black Drivers

ESP32 MicroPython Drivers

MicroPython Drivers

CircuitPython (MCP23017) Drivers

Raspberry Pi Pico

Personality EEPROM

Factory Acceptance Tests

Proto16-I2C-P1010614-720px.jpg

Setup

Program Personality EEPROM

  • Menu driven
  • Auto-detects card
  • If test has been run before
Checking EEPROM for board type...Detected PROTO16-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 - TBD board
9 - TBD board
Select board > 
  • Select board
Select board > 6
Writing EEPROM
Initializing eep buffer
len of buffer=96
reading block
Family=ODAS
Company=land.boards.com
Product=PROTO16-I2C

Run I2C Loopback Tests

  • Test 'T'
Loopback Test PASS = 1, FAIL = 0

Run Bouncing LEDs

  • Select B
Bouncing LEDs - any key to stop
  • Use LED card

Rev History

Log of issues

Rev 3

  • Convert to Kicad 6
    • No schematic changes
    • New part libraries

Proto16-I2C Front-720pxV.png

  • Lots of Silkscreen changes
    • Array area more clearly delineated
    • Signal markings on rear of PCB

Proto16-I2C REAR-720pxV.png

Rev X2

  • No functional issues
  • Add A0 jumper for EEPROM and MCP23017
    • Verified works in Rev X2 (Kickstarter)

Rev X1

  • No functional issues

Mechanicals

PROTO16-I2C-Rev3-MECH CAD.png

PROTO16-I2C Assembly Sheet