# Title: Expand 6 Click Board™ ## Description: How Does The Expand 6 Click Board™ Work? The Expand 6 Click Board™ is based on the CY8C9520A, 20-bit I/O expander with EEPROM, and 4 independently configurable 8-bit PWM outputs from Cypress Semiconductor. The main blocks of the CY8C9520A include the control unit, PWMs, EEPROM, and I/O ports. The I/O expander's data pins can be independently assigned as inputs, outputs, or PWM outputs, and can be configured as open-drain or collector, strong drive (10 mA source, 25 mA sink), resistively pulled up or down, or high impedance which can be selected in the Port Drive Mode register. It operates as two I2C slave devices, where the first device is a multi-port I/O expander (single I2C address to access all ports through registers), and the second device is a serial EEPROM with 3 Kbyte address space. Configuration and output register settings are storable as user defaults in a dedicated section of the EEPROM. If user defaults were stored in EEPROM, they are restored to the ports at Power-Up. The EEPROM is byte readable and supports byte-by-byte writing. A pin 3 of the Port 2 on this Click board™ can be configured as an EEPROM Write Disable (WD) input that blocks write operations when set high. The configuration registers can also disable EEPROM operations. EXPAND 6 Click communicates with MCU using the standard I2C 2-Wire interface with a maximum frequency of 100kHz. The CY8C9520A has, by default, two possible I2C slave address formats: the first is used to access the multi-port device, and the second to access the EEPROM. This selection of I2C slave addresses is performed by setting the logic level on the A0 pin of the CY8C9520A which can be done by using the SMD jumper labeled as ADDR SEL. It also generates a programmable interrupt signal routed on the INT pin of the mikroBUS™, which can inform the system master that there is incoming data on its ports or that the PWM output state was changed. The reset signal routed on the RST pin of the mikroBUS™ socket is similar to POR (Power-ON Reset) function. When the CY8C9520A is held in Reset, all In and Out pins are held at their default High-Z State. This Click board™ is designed to be operated with both 3.3V and 5V logic voltage levels that can be selected via VCC SEL jumper. This allows for both 3.3V and 5V capable MCUs to use the I2C communication lines properly. SPECIFICATIONS Type Port expander Applications Can be used to monitor and control LEDs and system intrusion detection devices, but also as a storage for information such as error codes or board manufacturing data for diagnostic purposes. On-board modules EXPAND 6 Click is based on the CY8C9520A, 20-bit I/O expander with EEPROM, and 4 independently configurable 8-bit PWM outputs from Cypress Semiconductor. Key Features 20-bit, 100kHz I2C port expander, flexible I2C address configuration, internal 3Kbyte EEPROM, user default storage, and more. Interface I2C Compatibility mikroBUS Click board size L (57.15 x 25.4 mm) Input Voltage 3.3V or 5V PINOUT DIAGRAM This table shows how the pinout on EXPAND 6 Click corresponds to the pinout on the mikroBUS™ socket (the latter shown in the two middle columns). Notes Pin Pin Notes NC 1 AN PWM 16 NC Reset RST 2 RST INT 15 INT Interrupt NC 3 CS RX 14 NC NC 4 SCK TX 13 NC NC 5 MISO SCL 12 SCL I2C Clock NC 6 MOSI SDA 11 SDA I2C Data Power Supply 3.3V 7 3.3V 5V 10 5V Power Supply Ground GND 8 GND GND 9 GND Ground ONBOARD SETTINGS AND INDICATORS Label Name Default Description LD1 PWR - Power LED Indicator JP1 VCC SEL Left Power Supply Voltage Selection 3V3/5V: Left position 3V3, Right position 5V JP2 ADDR SEL Left Communication interface selection: Left position 0, Right position 1 J1-J3 P0-P2 Port - I/O Expander Ports EXPAND 6 CLICK ELECTRICAL SPECIFICATIONS Description Min Typ Max Unit Supply Voltage -0.5 - 6 V High Level Source Current 10 - - mA Low Level Sink Current 25 - - mA Operating Temperature Range -40 +85 °C ## Product type: Click Board ## Vendor: Mikroelektronika d.o.o. ## Tags: Click Board, Cypress, I/O Expander, Interface, MikroE, Port Expander, Serial Interface ## Price range: 12.6 - 12.6 GBP ## Link: https://thedebugstore.com/products/mikroe-4243-expand-6-click-board-uk ## Compare-at price range: 18.0 - 18.0 GBP ## Options - Title: Default Title ## Collections - [New Products](https://thedebugstore.com/a/llms/collections/new-products-debug-store) - [Mikroelektronika d.o.o. (MikroE)](https://thedebugstore.com/a/llms/collections/mikroelektronika-catalogue-uk) - [Cypress PSoC Development Boards & Tools | Debug Store](https://thedebugstore.com/a/llms/collections/cypress-device-support) - [Serial Interface Click Boards™](https://thedebugstore.com/a/llms/collections/serial-interface-click-boards-catalogue) - [MikroE Click Boards™](https://thedebugstore.com/a/llms/collections/mikroe-click-boards-catalogue-uk) - [Interface Click Boards™](https://thedebugstore.com/a/llms/collections/interface-click-boards-catalogue) - [Port Expander Click Boards™](https://thedebugstore.com/a/llms/collections/port-expander-click-boards-catalogue) - [Click Boards™ Summer Sale](https://thedebugstore.com/a/llms/collections/inventory-sale) - [MikroE Sale](https://thedebugstore.com/a/llms/collections/mikroe-sale) - [MIKROE Stock](https://thedebugstore.com/a/llms/collections/mikroe-products-in-stock-sale) ## Variants - Default Title, SKU: MIKROE-4243, Available: yes, Inventory: 1 ## Metafields - full_description:
The Expand 6 Click Board™ is based on the CY8C9520A, 20-bit I/O expander with EEPROM, and 4 independently configurable 8-bit PWM outputs from Cypress Semiconductor. The main blocks of the CY8C9520A include the control unit, PWMs, EEPROM, and I/O ports. The I/O expander's data pins can be independently assigned as inputs, outputs, or PWM outputs, and can be configured as open-drain or collector, strong drive (10 mA source, 25 mA sink), resistively pulled up or down, or high impedance which can be selected in the Port Drive Mode register. It operates as two I2C slave devices, where the first device is a multi-port I/O expander (single I2C address to access all ports through registers), and the second device is a serial EEPROM with 3 Kbyte address space.

Configuration and output register settings are storable as user defaults in a dedicated section of the EEPROM. If user defaults were stored in EEPROM, they are restored to the ports at Power-Up. The EEPROM is byte readable and supports byte-by-byte writing. A pin 3 of the Port 2 on this Click board™ can be configured as an EEPROM Write Disable (WD) input that blocks write operations when set high. The configuration registers can also disable EEPROM operations.
EXPAND 6 Click communicates with MCU using the standard I2C 2-Wire interface with a maximum frequency of 100kHz. The CY8C9520A has, by default, two possible I2C slave address formats: the first is used to access the multi-port device, and the second to access the EEPROM. This selection of I2C slave addresses is performed by setting the logic level on the A0 pin of the CY8C9520A which can be done by using the SMD jumper labeled as ADDR SEL.
It also generates a programmable interrupt signal routed on the INT pin of the mikroBUS™, which can inform the system master that there is incoming data on its ports or that the PWM output state was changed. The reset signal routed on the RST pin of the mikroBUS™ socket is similar to POR (Power-ON Reset) function. When the CY8C9520A is held in Reset, all In and Out pins are held at their default High-Z State.
This Click board™ is designed to be operated with both 3.3V and 5V logic voltage levels that can be selected via VCC SEL jumper. This allows for both 3.3V and 5V capable MCUs to use the I2C communication lines properly.
| Type | Port expander |
| Applications | Can be used to monitor and control LEDs and system intrusion detection devices, but also as a storage for information such as error codes or board manufacturing data for diagnostic purposes. |
| On-board modules | EXPAND 6 Click is based on the CY8C9520A, 20-bit I/O expander with EEPROM, and 4 independently configurable 8-bit PWM outputs from Cypress Semiconductor. |
| Key Features | 20-bit, 100kHz I2C port expander, flexible I2C address configuration, internal 3Kbyte EEPROM, user default storage, and more. |
| Interface | I2C |
| Compatibility | mikroBUS |
| Click board size | L (57.15 x 25.4 mm) |
| Input Voltage | 3.3V or 5V |
This table shows how the pinout on EXPAND 6 Click corresponds to the pinout on the mikroBUS™ socket (the latter shown in the two middle columns).
| Notes | Pin | ![]() |
Pin | Notes | |||
|---|---|---|---|---|---|---|---|
| NC | 1 | AN | PWM | 16 | NC | ||
| Reset | RST | 2 | RST | INT | 15 | INT | Interrupt |
| NC | 3 | CS | RX | 14 | NC | ||
| NC | 4 | SCK | TX | 13 | NC | ||
| NC | 5 | MISO | SCL | 12 | SCL | I2C Clock | |
| NC | 6 | MOSI | SDA | 11 | SDA | I2C Data | |
| Power Supply | 3.3V | 7 | 3.3V | 5V | 10 | 5V | Power Supply |
| Ground | GND | 8 | GND | GND | 9 | GND | Ground |
| Label | Name | Default | Description |
|---|---|---|---|
| LD1 | PWR | - | Power LED Indicator |
| JP1 | VCC SEL | Left | Power Supply Voltage Selection 3V3/5V: Left position 3V3, Right position 5V |
| JP2 | ADDR SEL | Left | Communication interface selection: Left position 0, Right position 1 |
| J1-J3 | P0-P2 Port | - | I/O Expander Ports |
| Description | Min | Typ | Max | Unit |
|---|---|---|---|---|
| Supply Voltage | -0.5 | - | 6 | V |
| High Level Source Current | 10 | - | - | mA |
| Low Level Sink Current | 25 | - | - | mA |
| Operating Temperature Range | -40 | +85 | °C |
We provide a library for the Expand 6 Click Board™ on our LibStock page, as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.
The library covers necessary functions that enable the usage of the EXPAND 6 click board. You can check or set the state of every pin, set PWM output or use onboard user available EEPROM.
uint8_t expand6_read_pin ( uint16_t pin, uint8_t inv ); - Function is used to read the state of a defined pin.void expand6_write_pin ( uint16_t pin, uint8_t pin_val ); - Function is used to set a single output pin's logic level.void expand6_sel_pwm_pin ( uint16_t pin, uint8_t pwm_en ); - Function is used to enable or disable PWM output on a specific pin.The application is composed of three sections :
void application_task ( )
{
mikrobus_logWrite( " PORT 0 ", _LOG_LINE );
for ( pin_num = 0; pin_num < 8; pin_num++ )
{
expand6_write_port( EXPAND6_PORT_0, 0xFF );
expand6_write_pin( pin_num, EXPAND6_LOW );
mikrobus_logWrite( "Pin ", _LOG_TEXT );
ByteToStr( pin_num, log_txt );
Ltrim( log_txt );
mikrobus_logWrite( log_txt, _LOG_TEXT );
mikrobus_logWrite( " is low!", _LOG_LINE );
Delay_ms( 500 );
expand6_write_port( EXPAND6_PORT_0, 0xFF );
}
Delay_ms( 1000 );
mikrobus_logWrite( " PORT 1 ", _LOG_LINE );
for ( pin_num = 8; pin_num < 16; pin_num++ )
{
expand6_write_port( EXPAND6_PORT_1, 0xFF );
expand6_write_pin( pin_num, EXPAND6_LOW );
mikrobus_logWrite( "Pin ", _LOG_TEXT );
ByteToStr( pin_num, log_txt );
Ltrim( log_txt );
mikrobus_logWrite( log_txt, _LOG_TEXT );
mikrobus_logWrite( " is low!", _LOG_LINE );
Delay_ms( 500 );
expand6_write_port( EXPAND6_PORT_1, 0xFF );
}
Delay_ms( 1000 );
mikrobus_logWrite( " PORT 2 ", _LOG_LINE );
for ( pin_num = 16; pin_num < 20; pin_num++ )
{
expand6_write_port( EXPAND6_PORT_2, 0xFF );
expand6_write_pin( pin_num, EXPAND6_LOW );
mikrobus_logWrite( "Pin ", _LOG_TEXT );
ByteToStr( pin_num, log_txt );
Ltrim( log_txt );
mikrobus_logWrite( log_txt, _LOG_TEXT );
mikrobus_logWrite( " is low!", _LOG_LINE );
Delay_ms( 500 );
expand6_write_port( EXPAND6_PORT_2, 0xFF );
}
mikrobus_logWrite( "-------------------", _LOG_LINE );
Delay_ms( 1000 );
}
The full application code, and ready to use projects can be found on our LibStock page.
Other mikroE Libraries used in the example:
Depending on the development board you are using, you may need a USB UART click, USB UART 2 click or RS232 click to connect to your PC, for development systems with no UART to USB interface available on the board. The terminal available in all MikroElektronika compilers, or any other terminal application of your choice, can be used to read the message.
This Click board™ is supported with mikroSDK - MikroElektronika Software Development Kit. To ensure proper operation of mikroSDK compliant Click board™ demo applications, mikroSDK should be downloaded from the LibStock and installed for the compiler you are using.
- attachments: [{"download_file":[{"download_file":"Expand 6 Click Board™ Schematic"}],"download_filetype":[{"download_filetype":"pdf"}]},{"download_file":[{"download_file":"Cypress CY8C9520A I/O Expander Datasheet"}],"download_filetype":[{"download_filetype":"pdf"}]}] - condition: new - custom_product: false - mpn: MIKROE-4243 - google_product_category: Electronics - custom_label_0: Click Board - key_feature_1: I2C to EEPROM, PWM and I/O Expander - key_feature_2: 20-bit, 100kHz I2C port expander, flexible I2C address configuration, internal 3Kbyte EEPROM, user default storage, and more. - key_feature_3: The Expand 6 Click is based on the CY8C9520A, 20-bit I/O expander with EEPROM, and 4 independently configurable 8-bit PWM outputs from Cypress Semiconductor. - key_feature_4: Can be used to monitor and control LEDs and system intrusion detection devices, but also as a storage for information such as error codes or board manufacturing data for diagnostic purposes. - key_feature_5: mikroBUS: I2C Interface - device_vendor: Cypress Semiconductor Corp - device_type: CY8C9520A-24PVXIT - warranty: 12 months - brand: MikroE - manufacturer: Mikroelektronika d.o.o. - target_keyword: Expand 6 Click Board - brands: gid://shopify/Metaobject/56256004319 - breadcrumbs: ["gid://shopify/Collection/447955239135","gid://shopify/Collection/241680580797","gid://shopify/Collection/279382950077","gid://shopify/Collection/279383179453"] - customhs_code: 847330 - detailed_description: {"type":"root","children":[{"type":"heading","level":3,"children":[{"type":"text","value":"How Does The Expand 6 Click Board™ Work?"}]},{"type":"paragraph","children":[{"type":"text","value":"The "},{"type":"text","value":"Expand 6 Click Board™","bold":true,"italic":true},{"type":"text","value":" is based on the CY8C9520A, 20-bit I/O expander with EEPROM, and 4 independently configurable 8-bit PWM outputs from Cypress Semiconductor. The main blocks of the CY8C9520A include the control unit, PWMs, EEPROM, and I/O ports. The I/O expander's data pins can be independently assigned as inputs, outputs, or PWM outputs, and can be configured as open-drain or collector, strong drive (10 mA source, 25 mA sink), resistively pulled up or down, or high impedance which can be selected in the Port Drive Mode register. It operates as two I2C slave devices, where the first device is a multi-port I/O expander (single I2C address to access all ports through registers), and the second device is a serial EEPROM with 3 Kbyte address space."}]},{"type":"paragraph","children":[{"type":"text","value":""}]},{"type":"paragraph","children":[{"type":"text","value":"Configuration and output register settings are storable as user defaults in a dedicated section of the EEPROM. If user defaults were stored in EEPROM, they are restored to the ports at Power-Up. The EEPROM is byte readable and supports byte-by-byte writing. A pin 3 of the Port 2 on this Click board™ can be configured as an EEPROM Write Disable (WD) input that blocks write operations when set high. The configuration registers can also disable EEPROM operations."}]},{"type":"paragraph","children":[{"type":"text","value":"EXPAND 6 Click communicates with MCU using the standard I2C 2-Wire interface with a maximum frequency of 100kHz. The CY8C9520A has, by default, two possible I2C slave address formats: the first is used to access the multi-port device, and the second to access the EEPROM. This selection of I2C slave addresses is performed by setting the logic level on the A0 pin of the CY8C9520A which can be done by using the SMD jumper labeled as ADDR SEL."}]},{"type":"paragraph","children":[{"type":"text","value":"It also generates a programmable interrupt signal routed on the INT pin of the mikroBUS™, which can inform the system master that there is incoming data on its ports or that the PWM output state was changed. The reset signal routed on the RST pin of the mikroBUS™ socket is similar to POR (Power-ON Reset) function. When the CY8C9520A is held in Reset, all In and Out pins are held at their default High-Z State."}]},{"type":"paragraph","children":[{"type":"text","value":"This Click board™ is designed to be operated with both 3.3V and 5V logic voltage levels that can be selected via VCC SEL jumper. This allows for both 3.3V and 5V capable MCUs to use the I2C communication lines properly."}]},{"type":"heading","level":3,"children":[{"type":"text","value":"SPECIFICATIONS"}]},{"type":"paragraph","children":[{"type":"text","value":"Type\nPort expander\nApplications\nCan be used to monitor and control LEDs and system intrusion detection devices, but also as a storage for information such as error codes or board manufacturing data for diagnostic purposes.\nOn-board modules\nEXPAND 6 Click is based on the CY8C9520A, 20-bit I/O expander with EEPROM, and 4 independently configurable 8-bit PWM outputs from Cypress Semiconductor.\nKey Features\n20-bit, 100kHz I2C port expander, flexible I2C address configuration, internal 3Kbyte EEPROM, user default storage, and more.\nInterface\nI2C\nCompatibility\nmikroBUS\nClick board size\nL (57.15 x 25.4 mm)\nInput Voltage\n3.3V or 5V"}]},{"type":"paragraph","children":[{"type":"text","value":" "}]},{"type":"heading","level":3,"children":[{"type":"text","value":"PINOUT DIAGRAM"}]},{"type":"paragraph","children":[{"type":"text","value":"This table shows how the pinout on EXPAND 6 Click corresponds to the pinout on the mikroBUS™ socket (the latter shown in the two middle columns)."}]},{"type":"paragraph","children":[{"type":"text","value":"Notes\nPin\nPin\nNotes\nNC\n1\nAN\nPWM\n16\nNC\nReset\nRST\n2\nRST\nINT\n15\nINT\nInterrupt\nNC\n3\nCS\nRX\n14\nNC\nNC\n4\nSCK\nTX\n13\nNC\nNC\n5\nMISO\nSCL\n12\nSCL\nI2C Clock\nNC\n6\nMOSI\nSDA\n11\nSDA\nI2C Data\nPower Supply\n3.3V\n7\n3.3V\n5V\n10\n5V\nPower Supply\nGround\nGND\n8\nGND\nGND\n9\nGND\nGround"}]},{"type":"heading","level":3,"children":[{"type":"text","value":"ONBOARD SETTINGS AND INDICATORS"}]},{"type":"paragraph","children":[{"type":"text","value":"Label\nName\nDefault\n Description\nLD1\nPWR\n-\nPower LED Indicator\nJP1\nVCC SEL\nLeft\nPower Supply Voltage Selection 3V3/5V: Left position 3V3, Right position 5V\nJP2\nADDR SEL\nLeft\nCommunication interface selection: Left position 0, Right position 1\nJ1-J3\nP0-P2 Port\n-\nI/O Expander Ports"}]},{"type":"heading","level":3,"children":[{"type":"text","value":"EXPAND 6 CLICK ELECTRICAL SPECIFICATIONS"}]},{"type":"paragraph","children":[{"type":"text","value":"Description\nMin\nTyp\nMax\nUnit\nSupply Voltage\n-0.5\n-\n6\nV\nHigh Level Source Current\n10\n-\n-\nmA\nLow Level Sink Current\n25\n-\n-\nmA\nOperating Temperature Range\n-40\n+85\n°C"}]},{"type":"heading","level":3,"children":[{"type":"text","value":" "}]}]} - summary:The Expand 6 Click Board™ is a compact add-on board that contains an I2C configurable multi-port I/O expander with independently configurable pins as bi-directional input/outputs or PWM outputs. This board features the CY8C9520A, 20-bit I/O expander with EEPROM, and 4 independently configurable 8-bit PWM outputs from Cypress Semiconductor. The CY8C9520A operates as two I2C slave devices, first as a multi-port I/O expander, and second as a serial EEPROM with 3 Kbyte address space. It has a user default storage, flexible I2C address configuration, and a programmable interrupt function that indicates input pin level changes and PWM state changes. This Click Board™ can be used to monitor and control LEDs and system intrusion detection devices, but also as a storage for information such as error codes or board manufacturing data for diagnostic purposes.
The Expand 6 Click is supported by a mikroSDK compliant library, which includes functions that simplify software development. This Click Board™ comes as a fully tested product, ready to be used on a system equipped with the mikroBUS™ socket.