GPIO32 EXPANDER BOARD

Similar documents
GPI/O 32 Board. Diagram 1

ULN2065B SWITCH BOARD

VOLTAGE TRANSLATOR BOARD

16-Bit I/O Expander with Serial Interface SOIC SPDIP SSOP QFN EP 29 * * Includes Exposed Thermal Pad; see Table 2-1.

MCP23017/MCP23S Bit I/O Expander with Serial Interface. Package Types. Features. Packages MCP23S17 MCP23017

Ether I/O 24 DIP R Datasheet

IOX-16 User s Manual. Version 1.00 April Overview

MCP23017/MCP23S Bit I/O Expander with Serial Interface. Features. Package Types. Packages MCP23S17 MCP23017

ETHER IO24 TCP ETHER IO24 TCP DATASHEET. Module Features Elexol Pty Ltd Revision 1.3

ETHER IO24 TCP DIP. Ether IO24 TCP DIP Datasheet. Module Features. Part Number: PRO EIO24 TCP DIP 2013 Elexol Pty Ltd Revision 1.5

ArduCAM-M-2MP Camera Shield

PARALLEL COMMUNICATIONS

LIN bus board datasheet EB

Introduction the Serial Communications Huang Sections 9.2, 10.2 SCI Block User Guide SPI Block User Guide

Reference Manual SPX-2. Sixteen-line Digital I/O Serial Peripheral Expansion (SPX ) Board DOC. REV. 4/9/2013

VLSI AppNote: VSx053 Simple DSP Board

I2C-IN830M, I2C-IN830MA 8-Input Optocouplers I2C-bus, DIN rail supports

USB I/O 24 R Datasheet

Technical Documentation

Stepper 6 click. PID: MIKROE 3214 Weight: 26 g

Prototyping Module Datasheet

SC2004MBS 20x4 Characters MODBUS RTU Slave LCD

PAW3305DK OPTICAL MOUSE SENSOR

FT800 Display Controller Board. Part Number: MCIB-15 Version: 1 Date: 25/02/2016 Revision History Description of change 25/02/2016 First draft

NHD-0220D3Z-FL-GBW-V3

WICE-SPI Hardware Operation Manual

I2C-AO112DIx I2C-Bus 4-20mA Analog Output Boards Din-Rail supports

OEM API Specification

USB-to-I2C. Ultra Hardware User s Manual.

USB-to-I2C. Professional Hardware User s Manual.

Table 1 - SDIO Pinout. Pin SD 4-bit Mode SD 1-bit Mode SPI Mode. 1 CD/DAT3 Data Line CS Card Select

NHD 0216K3Z FL GBW. Serial Liquid Crystal Display Module

RFID A1 Module User Manual V1.183

NHD-0216K3Z-NS(RGB)-FBW-V3

Modtronix Engineering Modular Electronic Solutions SBC28DC. Single board computer for 28 pin DIP PICs

OEM-ORP ORP. Reads mV mV. Range. 1 reading every 420ms. Response time. Any type & brand. Supported probes. Single point.

1.3inch OLED User Manual

KNJN I2C bus development boards

< W3150A+ / W5100 Application Note for SPI >

Nuvoton Touch Key Series NT1160 Datasheet

RFID MODULE. Mifare Read/Write Module. CM030 User Manual. Version 2.1 Apr 2010 chenmingcard

5I24 ANYTHING I/O MANUAL

Pi-Tek OLED Module PG12864KW Revision: 1.0 May Pi Tek. OLED Module SPECIFICATIONS MODEL NO. : PG12864KW PRODUCT TYPE: STANDARD

USB I/O 24 Version 3 Datasheet

Gyroscope Module 3-Axis L3G4200D (#27911)

TSYS01-FAMILY Digital Temperature Sensors

NHD-0220D3Z-FL-GBW-V3

Applications Wi-Fi sensors Wi-Fi automation Internet of things Wi-Fi enterteinment Serial to Wi-Fi

CB-1 Peripheral Board Technical Manual

PICado Alpha Development Board V1.0

Pmod I2S2 Reference Manual

PIXI click PID: MIKROE Weight: 28 g

KNJN I2C bus development boards

SH1030 Rev Introduction. Ultra low power DASH7 Arduino Shield Modem. Applications. Description. 868 MHz. Features

SimPLC. User Manual.

XS S ERIES TM PMB US TM O PTION C ARD

Device: EDR B. This document Version: 1c. Date: 11 November Matches module version: v3 [25 Aug 2016]

Version MICROSTRAIN, INC. Microminiature Sensors. OEM Inertia-Link /3DM-GX2 Modules. Guidelines for Use of OEM Inertia-Link /3DM-GX2 Modules

Evaluation Board User Guide UG-047

Pressure 4 click. PID: MIKROE 3020 Weight: 24 g

Graphical LCD Display Datasheet EB

Manual of Board ET-ESP32 RS485

Pedometer 3 Click. PID: MIKROE 3259 Weight: 24 g

Eddie Control Board with Power Connector (#28993) Eddie Control Board PCB (# )

Projected Capacitive Touch Solution General Specification

EMBED2000+ Data Sheet

PIC-I/O Multifunction I/O Controller

SPI Storm. Data sheet

A0021. Overview. Features. Ordering Information. HSS Touch Signature IC 6 Input - I 2 C. Part Number Format: A X Y Z

Win-I2CUSB Hardware User s Manual

SDB V2.2 Users Manual

DMX512-4 Channel PWM Driver Board #805

SERDESUB 913ROS DS90UB913Q Serializer and DS90UB914Q Deserializer Evaluation Kit User s Manual

Edge Power International (HK) Ltd. Product Specification

ED1021 I/O Expander with UART interface & analog inputs

RFID MODULE Mifare Reader / Writer SL030 User Manual Version 2.4 Nov 2011 StrongLink

1. Features and Benefits

PIC Serial Peripheral Interface (SPI) to Digital Pot

Pmod modules are powered by the host via the interface s power and ground pins.

LOG Storm. Data sheet

Device: MOD This document Version: 1.0. Matches module version: v3 [29 June 2016] Date: 23 October 2017

RS485 MODBUS Module 8AO

WM1030 Rev Introduction. Ultra low power DASH7 Modem. Applications. Description. 868 / 915 MHz. Features. WIZZILAB Technical datasheet 1/10

XRA BIT I2C/SMBUS GPIO EXPANDER WITH INTEGRATED LEVEL SHIFTERS

Microcontrollers and Interfacing

Logosol Joystick Node LS-731

Nuvoton NCT5655Y/W. 16-bit I 2 C-bus and SMBus GPIO controller with interrupt. Revision: 1.0 Date: May, 2016 NCT5655Y/W

LCD Module with I2C / Serial Interface and Keypad Control «LCD I2C/Serial» User s Guide. Copyright 2008 IMS

Arduino Uno. Arduino Uno R3 Front. Arduino Uno R2 Front

Newhaven Display International, Inc Galvin Ct. Elgin IL, Ph: Fax:

I²C GLCD Adapter for KS x64 Manual (1.4)

DEVBOARD3 DATASHEET. 10Mbits Ethernet & SD card Development Board PIC18F67J60 MICROCHIP

PAJ7025R2: Multiple Objects Tracking Sensor Module

AL361A-EVB-A1. Multi-channel Video Processor EVB. Datasheet. (HDMI/AHD-to-HDMI) 2017 by AverLogic Technologies, Corp. Version 1.0

ESK32-A2A Inch TFT LCD Module User Manual

Mercury System SB310

I2C and SPI Foundation

I2C-OC805S, I2C-OC805SA I2C Bus 8-Output Open Collectors

FreeForm/104 PC/104 Reconfigurable Digital I/O with Counter/Timers User's Manual

PAT9125EL: Optical Tracking Miniature Chip

Transcription:

1 GPIO32 EXPANDER BOARD FEATURES 2 X MCP23S17 GPIO Expander IC s 4 x I/O ports matching configuration of I/O 24 Hardware addressable pins for each SPI device Easy connection to the I/O port via a 10 way box header that suits a standard IDC connector. 72mm Standard width for DIN Rail Modules GENERAL DESCRIPTION The 32 GPIO Expander Board is an accessory board that allows the implementation of an additional 32 GPIO (General purpose Input / Output) to be controlled from a single port on the existing I/O 24 Range. The Elexol I/O 24 Range consists of Ether I/O 24 R, Ether I/O 24 DIP R, USB I/O 24 R and the USB I/O 24 DIP R. The board consists of two MCP23S17 GPIO expanders, which are split up into four 8 bit Ports (2 Ports per MCP23S17). The four 8 bit ports use the same hardware configuration as the I/O 24 range. This makes it easier to connect other Elexol I/O boards to the 32 GPIO Expander board. Communication to the GPIO s is via the SPI interface of the I/O 24 module which is implemented in the firmware. For further information on implementing the SPI interface please refer to the user manual for the I/O 24 module. The connection between the I/O 24 module and the 32 GPIO Expander board is via a 30 cm IDC connection cable. This cable is provided with the board. The board has been designed to a 72mm standard width so that it can easily be mounted in DIN rail mounting modules.

2 LAYOUT AND MECHANICALS 33.79 mm 3.27 mm All holes 3.5mm dia 60.34 mm 5.82 mm 72.00 mm 9.50 mm 1.60 mm SIDE VIEW 40.50 mm TOP VIEW Dimensions: 1.59 X 2.8 X 0.43 inches (40.5 X 72 X 11mm) PINOUTS AND BOARD CONNECTIONS 10 PIN BOX HEADER Shown in the diagram below is the I/O port Connector for each of the Ports on the module. SPI Connection to I/O 24 Port +5V RESET U1/U2 INT B U1/2 CS U2 SDO SCLK INT A U1/2 CS U1 SDI GND Note: Pin1 Marked on I/O Accessory with Listed in the table below are the connections for the 10 Pin Box Header

3 PIN # SIGNAL TYPE DESCRIPTION +3.3V to +5V drawn from I/O module powers 1 +5V PWR (Supplies power to the I/O Board) Hardware Reset control line for U1/U2. Reset RESET 2 I signal is active low in order to keep U1/U2 out U1/U2 of reset the line must be held high 3 4 INT B U1/U2 INT A U1/U2 O O Interrupt Output for PORTB of U1/U2. Can be configured as active high, active low or open drain depending on the register setup for the MCP23S17 Interrupt Output for PORTA of U1/U2. Can be configured as active high, active low or open drain depending on the register setup for the MCP23S17 5 CS U2 I Chip Select U2 of MCP23S17 6 CS U1 I Chip Select U1 of MCP23S17 7 SDO O Serial Data Out 8 SDI I Serial Data In 9 CLK I Serial Clock Input 10 GND PWR Ground signal from I/O module 10 PIN BOX HEADER Shown in the diagram below is the I/O port Connector for each of the Ports on the module. I/O 24 Port Connection +5V I/O 7 I/O 6 I/O 4 I/O 2 I/O 0 I/O 5 I/O 3 I/O 1 GND Note: Pin1 Marked on I/O Accessory with I/O 24 BOX HEADER CONNECTIONS PIN # SIGNAL TYPE DESCRIPTION 1 +5V PWR +3.3V to +5V drawn from I/O module powers (Supplies power to the connected I/O Board) 2 I/O 7 I/O Input / Output pin 7 3 I/O 6 I/O Input / Output pin 6 4 I/O 5 I/O Input / Output pin 5 5 I/O 4 I/O Input / Output pin 4 6 I/O 3 I/O Input / Output pin 3 7 I/O 2 I/O Input / Output pin 2 8 I/O 1 I/O Input / Output pin 1 9 I/O 0 I/O Input / Output pin 0 10 GND PWR Ground signal from I/O module

4 HARDWARE ADDRESS CONFIGURATION (U1/U2 HARDWARE ADDRESS JUMPERS) There are 6 hardware address jumpers in total, located on the GPIO Expander Board. These jumpers are split into two lots of three, with each group handling the hardware addressing of each MCP23S17. Hardware Address Configuration Jumper +5V GND A P PIN # SIGNAL TYPE DESCRIPTION 1 +5V PWR +5V Power pin from I/O module powers 2 AP I Address Pin connected to MCP23S17 for Hardware addressing. This pin needs to be jumpered to either 5V or GND depending on the hardware address required 3 GND PWR Ground signal from I/O module These Address pins will take effect when the HAEN bit on the MCP23S17 is enabled not before hand. NOTE: Both HAEN bits in the IOCON command register need to be set in the MCP23S17 before the hardware address takes effect. COMMUNICATIONS SETTING UP THE PORT ON THE I/O 24 FOR SPI COMMUNICATIONS TO THE 32 GPIO EXPANDER BOARD Communication to the GPIO Expander board is via SPI from the port of I/O 24. However the port direction and pins will need to be setup before communication can begin with the board. Below are the configurations that need to be setup on the I/O 24 for the GPIO Expander board. I/0 24 DESCRIPTION COMMAND!A 0x64 Initialise PORT Direction on I/O 24 A 0x99 Set CS for GPIO s to idle state A 0x91 Lower CS for GPIO U1 and U2 to idle state A 0x89 Lower CS for GPIO U2 and U1 to idle state CONTROL BYTES AND COMMAND REGISTER There are a number of control bytes / command registers that are used in order to communicate with the GPIO Expander board. These control bytes /command registers along with their configuration bits are outlined below.

5 CONTROL BYTE CONFIGURATION FOR MCP23S17 CONTROL BYTE FOR MCP23S17 Bit 7 6 5 4 3 2 1 0 Configuration Bit 0 1 0 0 A2 A1 A0 R/W Configuration bit 7 1 SLAVE ADDRESS FOR GPIO Bits 7 4 are fixed values Bits 3 1 are defined from the Hardware Address jumpers Configuration bit 0 READ / WRITE ENABLE R/W = 1 = Read R/W = 0 = Write COMMAND REGISTER CONFIGURATIONS FOR MCP23S17 COMMUNICATIONS ADDRESS IOCON.BANK = 1 ADDRESS IOCON.BANK = 0 (Default) COMMAND REGISTER 0x00 0x00 IODIRA 0x10 0x01 IODIRB 0x01 0x02 IPOLA 0x11 0x03 IPOLB 0x02 0x04 GPINTENA 0x12 0x05 GPINTENB 0x03 0x06 DEFVALA 0x13 0x07 DEFVALB 0x04 0x08 INTCONA 0x14 0x09 INTCONB 0x05 0x0A IOCON 0x15 0x0B IOCON 0x06 0x0C GPPUA 0x16 0x0D GPPUB 0x07 0x0E INTFA 0x17 0x0F INTFB 0x08 0x10 INTCAPA 0x18 0x11 INTCAPB 0x09 0x12 GPIOA 0x19 0x13 GPIOB 0x0A 0x14 OLATA 1Ah 0x15 OLATB The command registers listed in the table above are used in the SPI communication to the GPIO Expander device.

6 BASIC OVERVIEW OF SPI COMMUNICATIONS WITH THE GPIO EXPANDER BOARD Listed below is a basic overview of the procedure that needs to be followed in order to communicate with the board. 1. Setup Direction Register on I/O 24 for GPIO Board (Not required for Ether IO24 PIC R) 2. Setup Port Values on I/O 24 for idle state on GPIO Board (Not required for Ether IO24 PIC R) 3. Lower the CS pin for chip communication 4. Send Control Byte and command registers 5. Send Null Bytes if response is required. This is done to keep the SPI clock going or no responses will be clocked in 6. Raise the CS pin back to idle state. 7. Repeat from Step 3 for other commands. When using the Ether IO24 PIC R, steps 1 and 2 are handled by setting the Port Mode to SPI Mode in the Power up Settings. The coding examples below go into more detail of what commands are issued to the board.

7 CODING EXAMPLES Outlined below are some standard commands that can be sent to the GPIO Expander board for the Ether I/O 24. The example code has been written in Visual C# Express. These examples are available for download from our website www.elexol.com Ether IO 24 Commands Setting up Ether IO24 R Port A for GPIO Expander Board private void Send_Enable_SPI() { UdpClient udpclient = new UdpClient(); IPEndPoint EtherIPEndPoint = new IPEndPoint(_deviceIP, _deviceport); byte[]data = new byte[16]; // Send out an SPI enable command //Need to set up the various CS and other pins associated with the board data[0] = Convert.ToByte('!'); //"!" data[1] = Convert.ToByte('A');//"A" data[2] = 0x64; //"0x48" udpclient.send(data, 3, EtherIPEndPoint); data[1] = 0x99; //"0x31" was 0x98 //Enable the SPI by sending S1A data[0] = Convert.ToByte('S'); //"S" data[1] = Convert.ToByte('1');//"1" data[2] = Convert.ToByte('A');//"A" udpclient.send(data, 3, EtherIPEndPoint); } (The above code is not required for the Ether IO24 PIC R. For this module you will need to set the Port Mode to SPI Mode in the Power up Settings) Write 0xAA to Port B of GPIO U1 private void button1_click(object sender, EventArgs e) { UdpClient udpclient = new UdpClient(); IPEndPoint EtherIPEndPoint = new IPEndPoint(_deviceIP, _deviceport); byte[]data = new byte[16]; // Set CS value U1 // IdleCS = 0x99; // U1 LowerCS = 0x91; //U2 LowerCS = 0x89; // Send out an SPI enable command // Need to set up the various CS and other pins associated with the board

8 //Lower CS1 data[1] = 0x91; //lower CS U1 = "0x91" or U2 "0x89 //Write to Port Direction of U1 Port B data[0] = Convert.ToByte('S'); //"S" data[1] = Convert.ToByte('A'); //"A" data[2] = 0x03; // number of bytes to be sent out via SPI command data[3] = 0x40; // command byte data[4] = 0x01; // register byte data[5] = 0x00; // register data byte udpclient.send(data, 6, EtherIPEndPoint); //Raise CS1 both CS are in idle state data[1] = 0x99; //"0x99" //Read 6 SPI bytes back from stream data = udpclient.receive(ref EtherIPEndPoint); //Lower CS1 data[1] = 0x91; //"0x91" or "0x89 //Write to Value of U1 Port B data[0] = Convert.ToByte('S'); //"S" data[1] = Convert.ToByte('A'); //"A" data[2] = 0x03; // number of bytes to be sent out via SPI command data[3] = 0x40; // command byte data[4] = 0x13; // register byte data[5] = 0xAA; // register value to be written udpclient.send(data, 6, EtherIPEndPoint); //Raise CS2 both CS are in idle state data[1] = 0x99; //"0x90" or "0x88 //Read 6 SPI bytes back from stream data = udpclient.receive(ref EtherIPEndPoint); } Read Port B of GPIO U1 // Set CS value U1 // IdleCS = 0x99; // U1 LowerCS = 0x91; //U2 LowerCS = 0x89; // Send out an SPI enable command // Need to set up the various CS and other pins associated with the board //Lower CS2 data[1] = 0x91; //lower CS u1 = "0x91" or u2 "0x89

9 //Read to Port Value of U2 Port B data[0] = Convert.ToByte('S'); //"S" data[1] = Convert.ToByte('A'); //"A" data[2] = 0x03; // number of bytes to be sent out via SPI command data[3] = 0x41; // command byte data[4] = 0x12; // register byte data[5] = 0x00; // data byte udpclient.send(data, 6, EtherIPEndPoint); //Raise CS2 both CS are in idle state data[1] = 0x99; //"0x99" udpclient.send(data, 2, " EtherIPEndPoint); //Read 6 SPI bytes back from stream data = udpclient.receive(ref EtherIPEndPoint); //Port B Value is returned in data[5] TextBox.AppendText("The value of PORTB U2 is : " + Convert.ToString(data[5], 16) + "\r\n"); }

10 ABSOLUTE MAXIMUM RATINGS MCP23S17 Voltage on VDD with respect to VSS... 0.3V to +5.5V Voltage on all other pins with respect to VSS... 0.6V to VDD +0.6V Storage temperature... Ambient temperature with power applied... 65 C to +150 C 40 C to +125 C Total Power dissipation... 700mW Maximum Current out of VSS pin... 150mA Maximum Current into VDD pin... 125mA Maximum output current sunk by any output pin... Maximum output current sourced by any output pin... 25mA 25mA NOTE: Care will need to be taken when connecting this device to the USB I/O 24 as you may exceed the maximum current draw allowed via the USB specifications. FURTHER READING Information about the GPIO Expanders (MCP23S17) can be found on the Microchip product datasheets for the devices. These can be downloaded from the Microchip website at www.microchip.com

11 DOCUMENT REVISION HISTORY 32 GPIO Expander Board Datasheet Revision 1 Initial document created