User manual

MCP2210 Evaluation Kit User’s Guide
DS52057A-page 14 © 2012 Microchip Technology Inc.
A simple test using the SPI Terminal utility shows how the MCP23S08 (an 8-bit I/O
expander) uses the GP4 pin of the MCP2210 device as a chip select line. This line
should be active low. The GP4 must be set as in the Figure 2-1, with the IDLE option
checked (IDLE value is logic1’) and the ACTIVE option unchecked (ACTIVE value is
logic ‘0’).
The SPI parameters are set as follows:
Bit rate - 500000 bps
SPI Mode – 0
Number of bytes to transfer – 3
All the SPI related delays are set to 0
The TX Data should contain the following HEX values: 40, 00, 00. Click on the SPI
Transfer Data button to complete the procedure and set the MCP23S08’s port as an
output.
After setting this port, a value can be sent out to the port to light the LEDs on the board.
To make this happen, insert the following three HEX values: 40, 0A, FF. By clicking the
SPI Transfer Data button again, the inserted values are sent out to the MCP23S08
device. This command will light all the LEDs on the board. If any other LED light pattern
is desired, the third value (FF) can be changed to any other 8-bit value.
To verify the value written to the MCP23S08’s port, another set of data must be written
into the TX Data area: 41, 0A and any other 8-bit value (a “Don’t care” value for the third
position is admissible, because the read value from the MCP23S08 is received on the
third byte).
In the RX Data field, the third value should be the identical to the one sent out previ-
ously (in the given example, FF).
2.3.4 MCP2210 Evaluation Kit demo application
The provided demo application is designed to work with the MCP2210 SPI Slave
Motherboard using the MCP2210 Breakout Board as a USB-to-SPI bridge.
The application’s source code is provided to facilitate the development of custom PC
applications using the MCP2210 and the accompanying DLL package. This application
was written in Visual Basic.