The GPIO Expander Keypad and LCD Demo Board is designed to demonstrate the use of the MCP23S08/17 (SPI interface) and the MCP23008/17 (I2C interface) devices in a keypad and LCD example. The MCP23X17 (16-bit) devices interface to a 2x16 LCD module and the MCP23X08 (8-bit) devices interface to a 4x4 keyed matrix.
Both the I2C and SPI versions are included on the board to demonstrate both serial interfaces. The CONTROL BLOCK in the Demo Board contains the PIC18F4550 and is the main intelligence in the system. This PIC18F2455/2550/4455/4550 family of devices offers the advantages of all PIC18 microcontrollers – namely, high computational performance at an economical price – with the addition of high-endurance, Enhanced Flash program memory.
The MCP23X08 device provides 8-bit, general purpose, parallel I/O expansion for I2C bus or SPI applications. The two devices differ in the number of hardware address pins and the serial interface, MCP23008 has I2C interface, three address pins whereas MCP23S08 has SPI interface, two address pins
The MCP23X08 consists of multiple 8-bit configuration registers for input, output and polarity selection. The system master can enable the I/Os as either inputs or outputs by writing the I/O configuration bits. The data for each input or output is kept in the corresponding Input or Output register. The polarity of the Input Port register can be inverted with the Polarity Inversion register. All registers can be read by the system master.
The MCP23017/MCP23S17 (MCP23X17) device family provides 16-bit, general purpose parallel I/O expansion for I2C bus or SPI applications. The two devices differ only in the serial interface. The MCP23017 is I2C interface whereas MCP23S17 is SPI interface
The MCP23X17 consists of multiple 8-bit configuration registers for input, output and polarity selection. The system master can enable the I/Os as either inputs or outputs by writing the I/O configuration bits (IODIRA/B). The data for each input or output is kept in the corresponding input or output register. The polarity of the Input Port register can be inverted with the Polarity Inversion register. All registers can be read by the system master.
Key Applications: LCD and keypad applications
- Demonstrates the use of MCP23X08 and MCP23X17 devices for LCD and keypad applications
- Test points allow for easy monitoring of SPI and I2C buses, as well as the keypad and LCD interface to PIC
- ICSP header for the PIC microcontroller allows users to customize firmware to further evaluate the MCP23X08/17 devices.
- Can be powered from a 3.0V to 5V DC power source (connected to the +5V and GND test points)
Major Board Components
- The GPIO BLOCK contains the MCP23X17 and MCP23X08 GPIO Expanders.
- Two (2) MCP23X17 devices are connected to the LCD module
- Two (2) MCP23X08 devices are connected to the keypad matrix.
- A button on the keypad toggles between I2C and SPI mode.
- When in I2C mode, the MCP23017 and MCP23008 are controlled by the PIC MCU.
- When in SPI mode, the MCP23S17 and MCP23S08 are controlled. Only one (1) MCP23X08 and one (1) MCP23X17 is on the bus at a time.
- The CONTROL BLOCK contains the PIC18F4550 and is the main intelligence in the system.
- The INPUT BLOCK contains the 4x4 keypad matrix. The MCP23X08 devices are used to scan the keys.
- The OUTPUT BLOCK contains the 2x16 LCD. The MCP23X17 devices control the display.
- The MCP23X17 and MCP23X08 I/O and serial lines are routed to the HEADER BLOCK to allow the pins to be probed.
- The PROGRAMMING BLOCK contains the ICSP? header for programming/debugging the PIC18F4550.
- The POWER BLOCK contains the MCP1702 5V voltage regulator. The board can be powered by a 9V supply (connected through the power jack) or by applying 5V directly to the power points.
- One GPIO Expander Keypad and LCD Demo Board (102-00116)
- MCP23008 GPIO Expander with I2C interface (installed)
- MCP23S08 GPIO Expander with SPI interface (installed)
- MCP23017 GPIO Expander with I2C interface (installed)
- MCP23S17 GPIO Expander with SPI interface (installed)
- Analog and Interface Products Demonstration Boards CD-ROM (DS21912)
- GPIO Expander Keypad and LCD Demo Board User?s Guide (DS51636)
- PIC Microcontroller Firmware
- PCB Gerber Files