Difference between revisions of "DIGIO-128"

From Land Boards Wiki
Jump to navigation Jump to search
 
(69 intermediate revisions by the same user not shown)
Line 1: Line 1:
[[File:tindie-mediums.png|link=https://www.tindie.com/products/land_boards/64128-channel-digital-io-card-digio-128/]]
+
[[File:tindie-mediums.png|link=https://www.tindie.com/products/5159/]]
 +
 
 +
[[File:DIGIO-128-X3-CCA_5847-720px.jpg]]
  
 
<video type="youtube">ATtKuo6iPzM</video>
 
<video type="youtube">ATtKuo6iPzM</video>
 
[[File:DIGIO-128-X3-CCA_5847-640px.jpg]]
 
 
== DIGIO-128 Card ==
 
  
 
== Features ==
 
== Features ==
  
* (8) of [http://ww1.microchip.com/downloads/en/DeviceDoc/20001952C.pdf MCP23017] - 16 bit GPIO x 8
+
* 128 bits of General Purpose Digital I/O (GPIO)
** Total of 128 bits of GPIO
+
** [https://hackaday.com/2023/02/03/mcp23017-went-through-shortage-hell-lost-two-inputs/?fbclid=IwAR1ktG1CsU7ns5fmTYXdlpBLdqaJmBioXrVrG1_Lgqe8MTQr1AY4rp6IETU MCP23017... LOST TWO INPUTS]
* I2C host interface
+
*** MCP23017 now a 14/16-bit expander, with two of the pins (GPA7 and GPB7) losing their input capabilities
** MCP23017] I2C Parallel I/O
+
*** 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
** Two Wire interface
+
** Card uses I2C addresses 0x20-0x27 for I/O and 0x50 for Configuration EEPROM
 +
** (8) of [https://ww1.microchip.com/downloads/aemDocuments/documents/APID/ProductDocuments/DataSheets/MCP23017-Data-Sheet-DS20001952.pdf MCP23017 Datasheet] - Rev D
 +
** I2C (Two Wire) host interface
 
** 100/400 KHZ operation
 
** 100/400 KHZ operation
 
** 25mA sink/source capability per I/O
 
** 25mA sink/source capability per I/O
** Jumper selectable terminators
+
*** Limited by current in/out of the IC
** Single 4-pin host interface connector (Ground, Power, Clock, Data)
+
* [https://www.mouser.com/ProductDetail/579-24LC024-P 24LC024] [[Open_Data_Acquisition_System#Personality_EEPROM|ODAS Personality EEPROM]]
* 0.1" Pitch I/O Connectors
+
** pid = 2
 +
* Jumper selectable I2C terminators
 +
* Single 4-pin host interface connector (Ground, Power, Clock, Data)
 +
* (8) I/O Connectors
 +
** 20 pin, 0.1" Pitch
 
** 16 digital I/O
 
** 16 digital I/O
 
** 2 Power
 
** 2 Power
 
** 2 Ground
 
** 2 Ground
 
** Interrupt connectors
 
** Interrupt connectors
** I2C Connector
+
* Power Connector
** Power Connector
+
** 3.3V or 5V operation
* 24LC024 Personality EEPROM
 
* 3.3V or 5V operation
 
 
* Compatible with Arduino, Raspberry Pi, BeagleBone Black
 
* Compatible with Arduino, Raspberry Pi, BeagleBone Black
 
* 95x95mm form factor
 
* 95x95mm form factor
Line 33: Line 35:
 
=== I2C Addresses ===
 
=== I2C Addresses ===
  
 +
* EEPROM 24LC024 = 0x50
 
* MCP23017 parts 0x20 - 0x27
 
* MCP23017 parts 0x20 - 0x27
* EEPROM 24LC024 = 0x50
+
** I2C address to port mapping
 +
*** P1 = 0x20
 +
*** P2 = 0x21
 +
*** P3 = 0x22
 +
*** P4 = 0x23
 +
*** P6 = 0x24
 +
*** P7 = 0x25
 +
*** P8 = 0x26
 +
*** P9 = 0x27
  
[[File:DIGIO-128-I2C-Addrs-X2.PNG]]
+
[[File:DIGIO-128-I2C-Addrs-X4.PNG]]
  
== Software Examples/Drivers ==
+
== Connectors ==
  
* [https://github.com/land-boards/lb-Arduino-Code/tree/master/LBCards/DIGIO128 DIGIO-128 Arduino example code]
+
[[file:DIGIO-128-AssySheet-X4.PNG]]
* [https://github.com/land-boards/lb-Arduino-Code/tree/master/libraries/LandBoards_Digio128V2 DIGIO-128 Arduino Driver]
 
* [https://github.com/land-boards/lb-Arduino-Code/tree/master/libraries/LandBoards_Digio128_64 DIGIO-128 - 64-bit version Arduino Driver]
 
* [https://github.com/land-boards/lb-Python-Code/tree/master/MicroPython/ESP32/libraries/digio128 DIGIO-128 Micropython Driver (ESP-32)]
 
* [https://github.com/land-boards/RasPi/blob/master/ODAS/DIGIO128/RasPiDigio128.py Raspberry Pi Example Code] - Requires some knowledge of the [http://ww1.microchip.com/downloads/en/DeviceDoc/20001952C.pdf MCP23017 (datasheet)]
 
  
== Connectors ==
+
=== P1-P4, P6-P9 - Digital I/O Connectors ===
  
=== Digital I/O Connector ===
+
* 16 bits per connector
 +
* (2) Power
 +
* (2) Ground
  
 
[[File:P1-DIGIO-Conn.PNG]]
 
[[File:P1-DIGIO-Conn.PNG]]
  
=== I2C Connectors ===
+
=== P5, P10 - Interrupt Outputs ===
 +
 
 +
[[file:P5_P10-INTs-Conn-X2.PNG]]
 +
 
 +
* Interrupt lines out of the 8 MCP23017 ICs
 +
* Can be used for detecting input changes or levels
 +
* Interrupt outputs INTA from MCP23017
 +
* Can be ignored if not needed
 +
** If the inputs are polled, the pins can be ignored
 +
 
 +
==== P5 pinout ====
 +
 
 +
* P5-1 = INT1
 +
* P5-2 = INT2
 +
* P5-3 = INT0
 +
* P5-4 = INT3
 +
 
 +
==== P10 pinout ====
 +
 
 +
* P10-1 = INT5
 +
* P10-2 = INT6
 +
* P10-3 = INT4
 +
* P10-4 = INT7
 +
 
 +
=== J1 - External Power ===
 +
 
 +
[[file:J1-Power-X2.PNG]]
 +
 
 +
* Can be ignored if the card is powered through I2C connector
 +
 
 +
=== J2, J3 - I2C Connectors ===
 +
 
 +
* Daisy chained connections
 +
* 2nd connector can be ignored
 +
* Card can be powered through this connector(s)
 +
* MCP23017 parts use I2C slave addresses 0x20-0x27
 +
* EEPROM 24LC024 parts use I2C slave address 0x50
 +
* Can't use more than one DIGIO-128 per I2C bus without separating busses with an I2C multiplexer
 +
** [[I2C-RPT]] - Land Boards 4-Channel I2C Multiplexer/Repeater
 +
** [[I2C-RPT-08]] - Land Boards 8-channel I2C Multiplexer/Repeater
 +
 
  
 
[[File:J2-J3-I2C-conn-X2.PNG]]
 
[[File:J2-J3-I2C-conn-X2.PNG]]
 +
 +
=== J4 - I2C Terminators and EEPROM Write Enable ===
 +
 +
[[file:J4-I2C-Terms-X2.PNG]]
 +
 +
* SDA, SCL I2C Terminators
 +
** Install jumper to use terminators
 +
* WE - EEPROM Write Enable
 +
** Install To enable writing config EEPROM
  
 
== Schematics ==
 
== Schematics ==
Line 60: Line 118:
 
* [http://land-boards.com/DIGIO-128/DIGIO-128-X3-sch.pdf Rev X3 schematic]
 
* [http://land-boards.com/DIGIO-128/DIGIO-128-X3-sch.pdf Rev X3 schematic]
 
* [http://land-boards.com/DIGIO-128/DIGIO-128-X4-sch.pdf Rev X4 schematic]
 
* [http://land-boards.com/DIGIO-128/DIGIO-128-X4-sch.pdf Rev X4 schematic]
 +
 +
== Configuration/Personality EEPROM ==
 +
 +
* [https://ww1.microchip.com/downloads/en/DeviceDoc/21210N.pdf 24LC024] Configuration/Personality EEPROM
 +
* Read of EEPROM by ODAS Test Station
 +
 +
<pre>
 +
R=Read EEPROM, W=Write EEPROM, X=Exit Menu
 +
Reading EEPROM
 +
Family  = ODAS
 +
Company = land-boards.com
 +
Product = DIGIO-128
 +
eepromAccessMenu() - Finished reading EEPROM
 +
</pre>
  
 
== Testing ==
 
== Testing ==
  
* [[Arduino Based Test Station]]
+
[[FILE:DIGIO-128_P1014720PX.jpg]]
 +
 
 +
=== Hardware Setup ===
 +
 
 +
* DIGIO-128 Unit Under Test (UUT)
 +
* UUT is tested using [[Arduino Based Test Station]]
 +
* (4) 16:16 cables loop adjacent ports
 +
**  Port 1 cabled to Port 2, Port 3 to Port 4, etc
 +
* I2C cable from [[Arduino Based Test Station]] to UUT
 +
** 5-pin Dupont 1:1 cable
 +
** Plugged into Port 0 on [[STM32 Black Pill]] card on [[BLACK-PILL-HUB]] in Test Station
 +
** Plugged into I2C connector on UUT
 +
*** 5th pin on cable from [[Arduino Based Test Station]] is INT* and is not used
 +
* [https://www.chiark.greenend.org.uk/~sgtatham/putty/ puTTY] running on PC
 +
** USB-C cable to USB connector on [[STM32 Black Pill]] card on [[BLACK-PILL-HUB]] in Test Station
 +
** 9600 baud
 +
 
 +
=== Card Auto-detect ===
 +
 
 +
* If card has been run before, the DIGIO-128 board will be detected
 +
* puTTY will display
 +
<pre>
 +
Checking if EEPROM is present on UUT...EEPROM is present on UUT
 +
Checking EEPROM for board type...Detected DIGIO-128 board
 +
Count of I2C devices in range 0x20-0x27 on UUT = 8
 +
No external I2C mux card
 +
8
 +
C=Card Tests, D=Direct, E=EEPROM, I=access Internal DIGIO32
 +
</pre>
 +
 
 +
=== Programming the Configuration EEPROM ===
 +
 
 +
* If card has not been run before options will be presented
 +
<pre>
 +
Checking if EEPROM is present on UUT...EEPROM is present on UUT
 +
Checking EEPROM for board type...Board signature error in EEPROM on UUT
 +
Count of I2C devices in range 0x20-0x27 on UUT = 8
 +
No external I2C mux card
 +
Detected MCP23017
 +
Select the board type (EEPROM)
 +
2 - DIGIO-128 board
 +
9 - TBD board
 +
X - Boards without EEPROMs
 +
</pre>
 +
* Type 2 to select card
 +
* EEPROM will be written, then read back
 +
* Test Station will display
 +
* Menu will be displayed:
 +
<pre>
 +
Writing EEPROM
 +
Initializing eep buffer
 +
len of buffer=96
 +
reading block
 +
Family=ODAS
 +
Company=land-boards.com
 +
Product=DIGIO-128
 +
C=Card Tests, D=Direct, E=EEPROM, I=access Internal DIGIO32
 +
</pre>
 +
* Type X to exit EEPROM menu
 +
* Top Level menu will be displayed
 +
<pre>
 +
C=Card Tests, D=Direct, E=EEPROM, I=access Internal DIGIO32
 +
</pre>
 +
 
 +
=== Loop-back Test UUT ===
 +
 
 +
* Type C to access card tests menu
 +
<pre>
 +
L=Loop/S=Single, T=Test, B=Bounce LEDs, I=Int'l Tests, X=eXit sub-menu
 +
</pre>
 +
* Type T to test card
 +
* Card will display
 +
<pre>
 +
Testing UUT = DIGIO-128
 +
Test PASS = 1, FAIL = 0
 +
</pre>
 +
* Can also loop test by Typing L
 +
<pre>
 +
Set flag to loop tests
 +
Testing UUT = DIGIO-128
 +
Test PASS = 2, FAIL = 0
 +
Test PASS = 3, FAIL = 0
 +
Test PASS = 4, FAIL = 0
 +
Test PASS = 5, FAIL = 0
 +
Test PASS = 6, FAIL = 0
 +
</pre>
 +
* Can exit loop test by Typing S (a single test)
 +
 
 +
=== Internal Tests ===
 +
 
 +
* Type I to access card tests menu
 +
<pre>
 +
Testing UUT DIGIO-128 card
 +
Test PASS = 2, FAIL = 0
 +
</pre>
 +
 
 +
=== UUT Debug ===
 +
 
 +
* Type C for card testing
 +
* Type B to set one output bit on at a time
 +
 
 +
=== Test Code GitHub Repository ===
 +
 
 
* [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]
 +
 +
== Software Examples/Drivers ==
 +
 +
=== Arduino ===
 +
 +
* [https://github.com/land-boards/lb-Arduino-Code/tree/master/libraries/LandBoards_Digio128V2 DIGIO-128 Arduino Driver]
 +
** [https://www.arduino.cc/en/Guide/Libraries?setlang=en#importing-a-zip-library Importing an Arduino ZIP library]
 +
* [https://github.com/land-boards/lb-Arduino-Code/tree/master/libraries/LandBoards_Digio128V2/examples DIGIO-128 Arduino example code]
 +
* [https://github.com/land-boards/lb-Arduino-Code/tree/master/libraries/LandBoards_Digio128_64 DIGIO-128 - 64-bit version Arduino Driver]
 +
 +
=== MicroPython on ESP-32 ===
 +
 +
* [https://github.com/land-boards/lb-Python-Code/tree/master/MicroPython/ESP32/libraries/digio128 DIGIO-128 Micropython Driver (ESP-32)]
 +
 +
=== Raspberry Pi ===
 +
 +
* [https://github.com/land-boards/RasPi/blob/master/ODAS/DIGIO128/RasPiDigio128.py Raspberry Pi Example Code] - Requires some knowledge of the [http://ww1.microchip.com/downloads/en/DeviceDoc/20001952C.pdf MCP23017 (datasheet)]
  
 
== Assembly Sheet ==
 
== Assembly Sheet ==

Latest revision as of 14:42, 4 February 2023

Tindie-mediums.png

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

Features

  • 128 bits of General Purpose Digital I/O (GPIO)
    • 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
    • Card uses I2C addresses 0x20-0x27 for I/O and 0x50 for Configuration EEPROM
    • (8) of MCP23017 Datasheet - Rev D
    • I2C (Two Wire) host interface
    • 100/400 KHZ operation
    • 25mA sink/source capability per I/O
      • Limited by current in/out of the IC
  • 24LC024 ODAS Personality EEPROM
    • pid = 2
  • Jumper selectable I2C terminators
  • Single 4-pin host interface connector (Ground, Power, Clock, Data)
  • (8) I/O Connectors
    • 20 pin, 0.1" Pitch
    • 16 digital I/O
    • 2 Power
    • 2 Ground
    • Interrupt connectors
  • Power Connector
    • 3.3V or 5V operation
  • Compatible with Arduino, Raspberry Pi, BeagleBone Black
  • 95x95mm form factor
  • (4) 6-32 mounting holes - one on each corner

I2C Addresses

  • EEPROM 24LC024 = 0x50
  • MCP23017 parts 0x20 - 0x27
    • I2C address to port mapping
      • P1 = 0x20
      • P2 = 0x21
      • P3 = 0x22
      • P4 = 0x23
      • P6 = 0x24
      • P7 = 0x25
      • P8 = 0x26
      • P9 = 0x27

DIGIO-128-I2C-Addrs-X4.PNG

Connectors

DIGIO-128-AssySheet-X4.PNG

P1-P4, P6-P9 - Digital I/O Connectors

  • 16 bits per connector
  • (2) Power
  • (2) Ground

P1-DIGIO-Conn.PNG

P5, P10 - Interrupt Outputs

P5 P10-INTs-Conn-X2.PNG

  • Interrupt lines out of the 8 MCP23017 ICs
  • Can be used for detecting input changes or levels
  • Interrupt outputs INTA from MCP23017
  • Can be ignored if not needed
    • If the inputs are polled, the pins can be ignored

P5 pinout

  • P5-1 = INT1
  • P5-2 = INT2
  • P5-3 = INT0
  • P5-4 = INT3

P10 pinout

  • P10-1 = INT5
  • P10-2 = INT6
  • P10-3 = INT4
  • P10-4 = INT7

J1 - External Power

J1-Power-X2.PNG

  • Can be ignored if the card is powered through I2C connector

J2, J3 - I2C Connectors

  • Daisy chained connections
  • 2nd connector can be ignored
  • Card can be powered through this connector(s)
  • MCP23017 parts use I2C slave addresses 0x20-0x27
  • EEPROM 24LC024 parts use I2C slave address 0x50
  • Can't use more than one DIGIO-128 per I2C bus without separating busses with an I2C multiplexer
    • I2C-RPT - Land Boards 4-Channel I2C Multiplexer/Repeater
    • I2C-RPT-08 - Land Boards 8-channel I2C Multiplexer/Repeater


J2-J3-I2C-conn-X2.PNG

J4 - I2C Terminators and EEPROM Write Enable

J4-I2C-Terms-X2.PNG

  • SDA, SCL I2C Terminators
    • Install jumper to use terminators
  • WE - EEPROM Write Enable
    • Install To enable writing config EEPROM

Schematics

Configuration/Personality EEPROM

  • 24LC024 Configuration/Personality EEPROM
  • Read of EEPROM by ODAS Test Station
R=Read EEPROM, W=Write EEPROM, X=Exit Menu
Reading EEPROM
Family  = ODAS
Company = land-boards.com
Product = DIGIO-128
eepromAccessMenu() - Finished reading EEPROM

Testing

DIGIO-128 P1014720PX.jpg

Hardware Setup

Card Auto-detect

  • If card has been run before, the DIGIO-128 board will be detected
  • puTTY will display
Checking if EEPROM is present on UUT...EEPROM is present on UUT
Checking EEPROM for board type...Detected DIGIO-128 board
Count of I2C devices in range 0x20-0x27 on UUT = 8
No external I2C mux card
8
C=Card Tests, D=Direct, E=EEPROM, I=access Internal DIGIO32

Programming the Configuration EEPROM

  • If card has not been run before options will be presented
Checking if EEPROM is present on UUT...EEPROM is present on UUT
Checking EEPROM for board type...Board signature error in EEPROM on UUT
Count of I2C devices in range 0x20-0x27 on UUT = 8
No external I2C mux card
Detected MCP23017
Select the board type (EEPROM)
2 - DIGIO-128 board
9 - TBD board
X - Boards without EEPROMs
  • Type 2 to select card
  • EEPROM will be written, then read back
  • Test Station will display
  • Menu will be displayed:
Writing EEPROM
Initializing eep buffer
len of buffer=96
reading block
Family=ODAS
Company=land-boards.com
Product=DIGIO-128
C=Card Tests, D=Direct, E=EEPROM, I=access Internal DIGIO32
  • Type X to exit EEPROM menu
  • Top Level menu will be displayed
C=Card Tests, D=Direct, E=EEPROM, I=access Internal DIGIO32

Loop-back Test UUT

  • Type C to access card tests menu
L=Loop/S=Single, T=Test, B=Bounce LEDs, I=Int'l Tests, X=eXit sub-menu
  • Type T to test card
  • Card will display
Testing UUT = DIGIO-128
Test PASS = 1, FAIL = 0
  • Can also loop test by Typing L
Set flag to loop tests
Testing UUT = DIGIO-128
Test PASS = 2, FAIL = 0
Test PASS = 3, FAIL = 0
Test PASS = 4, FAIL = 0
Test PASS = 5, FAIL = 0
Test PASS = 6, FAIL = 0
  • Can exit loop test by Typing S (a single test)

Internal Tests

  • Type I to access card tests menu
Testing UUT DIGIO-128 card
Test PASS = 2, FAIL = 0

UUT Debug

  • Type C for card testing
  • Type B to set one output bit on at a time

Test Code GitHub Repository

Software Examples/Drivers

Arduino

MicroPython on ESP-32

Raspberry Pi

Assembly Sheet