This document explains about the hardware and software setup, which is required to interface a joystick with the EV-COG-AD3029LZ using MCP23S17 as an interfacing I/O expander chip. The entire setup is made simple with the use of AD-GEAR-DISPLAY1Z, which contains the joystick and the expander IC.
The hardware details cover the COG jumper settings and also the pin mapping between the joystick, MCP23S17 expander and the EV-COG-AD3029LZ. The software details cover the software development kit required and the software architecture of the code base written to interface the joystick with the EV-COG-AD3029LZ.
This section contains hardware related information about AD-GEAR-DISPLAY1Z and the EV-COG-AD3029-LZ. Links are provided to the WiKi page of the target COG-AD3029-LZ, the Schematics, BOMs and technical documentations at the end of this page.
EV-COG-AD3029LZ pins | MCP23S17 pins | Joystick |
---|---|---|
GPIO22 / SPI1_CLK | SCL_SCK | - |
GPIO23 / SPI1_MOSI | SI | - |
GPIO24 / SPI1_MISO | SO | - |
GPIO34 / SPI1_CS2 | CS_N | - |
GPIO15 / INT_WAKE0 | INTA | - |
- | GPA0 | SW1 |
- | GPA1 | SW2 |
- | GPA2 | SW3 |
- | GPA3 | SW4 |
- | GPA4 | SW5 |
* A0, A1 and A2 of the I/O expander are connected to the ground.
* RESET_N of the I/O expander is connected to EXT_VDD_OUT of the COG board.
This section contains software related information about AD-GEAR-DISPLAY1Z and the EV-COG-AD3029-LZ and the application. Links are provided to the user guides, BSPs, software tool chains and the example project at the end of this page.
The example project provided consists mainly of the following,
* All the APIs for using the I/O expander is within the mcp23s17_3.c with supporting definitions found in SPI_PE.h and adi_spi_pe.h. A separate driver file to use the I/O expander is yet to be created.
This section covers the various steps involved in getting the joystick_example application code to run on EV-COG-AD3029LZ after the hardware setup is done.
Following are the steps involved,