TOP Contributors

  1. MIKROE (2656 codes)
  2. Alcides Ramos (353 codes)
  3. Shawon Shahryiar (307 codes)
  4. jm_palomino (112 codes)
  5. Chisanga Mumba (90 codes)
  6. S P (73 codes)
  7. dany (71 codes)
  8. MikroBUS.NET Team (35 codes)
  9. NART SCHINACKOW (34 codes)
  10. Armstrong Subero (27 codes)

Most Downloaded

  1. Timer Calculator (136823 times)
  2. FAT32 Library (69986 times)
  3. Network Ethernet Library (55975 times)
  4. USB Device Library (46287 times)
  5. Network WiFi Library (41894 times)
  6. FT800 Library (41203 times)
  7. GSM click (29009 times)
  8. PID Library (26421 times)
  9. mikroSDK (26387 times)
  10. microSD click (25383 times)
Libstock prefers package manager

Package Manager

We strongly encourage users to use Package manager for sharing their code on Libstock website, because it boosts your efficiency and leaves the end user with no room for error. [more info]

< Back
mikroSDK Library

EXPAND 5 click

Rating:

5

Author: MIKROE

Last Updated: 2020-07-21

Package Version: 1.0.0.0

mikroSDK Library: 1.0.0.0

Category: Port expander

Downloaded: 1722 times

Not followed.

License: MIT license  

EXPAND 5 Click features a low-voltage 24-bit I2C and SMBus I/O expander. This 24-bit I/O expander is designed to provide general-purpose remote I/O expansion for most microcontroller families via the I2C serial interface.

No Abuse Reported

Do you want to subscribe in order to receive notifications regarding "EXPAND 5 click" changes.

Do you want to unsubscribe in order to stop receiving notifications regarding "EXPAND 5 click" changes.

Do you want to report abuse regarding "EXPAND 5 click".

  • mikroSDK Library 2.0.0.0
  • Comments (0)
DOWNLOAD LINK RELATED COMPILER CONTAINS
mikroBasic PRO for ARM
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for AVR
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for dsPIC30/33 & PIC24
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for FT90x
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for PIC32
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for ARM
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for AVR
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for dsPIC30/33 & PIC24
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for FT90x
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for PIC32
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for ARM
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for AVR
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for dsPIC30/33 & PIC24
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for FT90x
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for PIC32
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc

mikroSDK Library Blog

EXPAND 5 Click

EXPAND 5 Click

Native view of the EXPAND 5 Click board.

View full image
EXPAND 5 Click

EXPAND 5 Click

Front and back view of the EXPAND 5 Click board.

View full image

Library Description

The library covers necessary functions that enables the usage of the EXPAND 5 click board. User can configure polarity and direction of every pin and get or set state of each and every pin.

Key functions:

  • void expand5_set_all_dir( uint8_t bank0, uint8_t bank1, uint8_t bank2 ); - Function is used to set pins' direction ( I/O ) setting in all banks.
  • void expand5_write_pin ( uint16_t pin, uint8_t pin_val ); - Function is used to set a single output pin's logic level.
  • void expand5_write_all_banks ( uint8_t bank0, uint8_t bank1, uint8_t bank2 ); - Function is used to set logic levels in all banks.

Examples description

The application is composed of three sections :

  • System Initialization - Initializes I2C module, LOG structure and sets RST pin as output and INT pin as input.
  • Application Initialization - Initalizes I2C driver, resets the device, configures all pins as output and makes an initial log.
  • Application Task - (code snippet) This example shows the capabilities of the EXPAND 5 click by toggling each of 24 available pins.
void application_task ( )
{
    for ( pin_num = EXPAND5_P00; pin_num <= EXPAND5_P27; pin_num++ )
    {
        expand5_write_all_banks ( bank_low, bank_low, bank_low );
        expand5_write_pin ( pin_num, EXPAND5_HIGH );
        mikrobus_logWrite( "Pin ", _LOG_TEXT );
        ByteToStr( pin_num, log_txt );
        Ltrim( log_txt );
        mikrobus_logWrite( log_txt, _LOG_TEXT );
        mikrobus_logWrite( " is high!", _LOG_LINE );

        Delay_ms( 100 );
        expand5_write_all_banks ( bank_low, bank_low, bank_low );
    }
    mikrobus_logWrite( "-------------------", _LOG_LINE );
    Delay_ms( 1000 );
}

Other mikroE Libraries used in the example:

  • I2C
  • UART
  • Conversions

Additional notes and informations

Depending on the development board you are using, you may need USB UART clickUSB 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.

Library Description

The library covers necessary functions that enables the usage of the EXPAND 5 click board. User can configure polarity and direction of every pin and get or set state of each and every pin.

Key functions:

  • void expand5_set_all_dir( uint8_t bank0, uint8_t bank1, uint8_t bank2 ); - Function is used to set pins' direction ( I/O ) setting in all banks.
  • void expand5_write_pin ( uint16_t pin, uint8_t pin_val ); - Function is used to set a single output pin's logic level.
  • void expand5_write_all_banks ( uint8_t bank0, uint8_t bank1, uint8_t bank2 ); - Function is used to set logic levels in all banks.

Examples description

The application is composed of three sections :

  • System Initialization - Initializes I2C module, LOG structure and sets RST pin as output and INT pin as input.
  • Application Initialization - Initalizes I2C driver, resets the device, configures all pins as output and makes an initial log.
  • Application Task - (code snippet) This example shows the capabilities of the EXPAND 5 click by toggling each of 24 available pins.
void application_task ( )
{
    for ( pin_num = EXPAND5_P00; pin_num <= EXPAND5_P27; pin_num++ )
    {
        expand5_write_all_banks ( bank_low, bank_low, bank_low );
        expand5_write_pin ( pin_num, EXPAND5_HIGH );
        mikrobus_logWrite( "Pin ", _LOG_TEXT );
        ByteToStr( pin_num, log_txt );
        Ltrim( log_txt );
        mikrobus_logWrite( log_txt, _LOG_TEXT );
        mikrobus_logWrite( " is high!", _LOG_LINE );

        Delay_ms( 100 );
        expand5_write_all_banks ( bank_low, bank_low, bank_low );
    }
    mikrobus_logWrite( "-------------------", _LOG_LINE );
    Delay_ms( 1000 );
}

Other mikroE Libraries used in the example:

  • I2C
  • UART
  • Conversions

Additional notes and informations

Depending on the development board you are using, you may need USB UART clickUSB 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.

ALSO FROM THIS AUTHOR

Nano Power 3 click

0

Nano Power 3 Click is a compact add-on board that steps down voltages from its input (supply) to output (load). This board features the RPL-3.0-R, a buck converter with an integrated inductor from Recom Power. This thermally-enhanced converter uses, as input, voltage from 4 up to 18VDC, thus allowing 5V and 12V supply rails to be used.

[Learn More]

Angle 10 click

0

Angle 10 Click is a compact add-on board that detects the absolute angular position of a permanent magnet. This board features the AS5070A, a high-resolution angular position sensor with an analog output for precise absolute angle measurement from ams AG. Based on a Hall sensor technology, the AS5070A measures the orthogonal component of the flux density over a full-turn rotation and compensates for external stray magnetic fields with a robust architecture based on a 14-bit sensor array and analog front-end. Only a simple two-pole magnet rotating over the center of the AS5070A is required to measure the angle, providing an instant indication of the magnet’s angular position.

[Learn More]

6DOF IMU 4 click

5

6DOF IMU 4 Click is an advanced 6-axis motion tracking Click board, which utilizes the ICM-20602, a high-performance integrated motion sensor, equipped with a 3-axis gyroscope, and a 3-axis accelerometer.

[Learn More]