TOP Contributors

  1. MIKROE (2650 codes)
  2. Alcides Ramos (350 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 (136538 times)
  2. FAT32 Library (69734 times)
  3. Network Ethernet Library (55842 times)
  4. USB Device Library (46177 times)
  5. Network WiFi Library (41801 times)
  6. FT800 Library (40989 times)
  7. GSM click (28922 times)
  8. PID Library (26384 times)
  9. mikroSDK (26280 times)
  10. microSD click (25298 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 8 click

Rating:

5

Author: MIKROE

Last Updated: 2021-05-19

Package Version: 1.0.0.0

mikroSDK Library: 1.0.0.0

Category: Port expander

Downloaded: 1863 times

Not followed.

License: MIT license  

Expand 8 Click is a compact add-on board that contains a multi-port I/O expander with bi-directional input/outputs. This board features the MAX7317, 10-Port SPI-interfaced I/O expander with overvoltage and hot-insertion protection from Maxim Integrated. The MAX7317 provides microprocessors with 10 I/O ports rated to 7V. Each port can be individually configured as either an open-drain output or an overvoltage-protected Schmitt input that supports hot insertion. All port pins remain high impedance in Power-Down mode with up to 8V asserted on them.

No Abuse Reported

Do you want to subscribe in order to receive notifications regarding "Expand 8 click" changes.

Do you want to unsubscribe in order to stop receiving notifications regarding "Expand 8 click" changes.

Do you want to report abuse regarding "Expand 8 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 8 Click

Expand 8 Click

Native view of the Expand 8 Click board.

View full image
Expand 8 Click

Expand 8 Click

Front and back view of the Expand 8 Click board.

View full image

Library Description

The library covers all the necessary functions to control Expand 8 click board.
The library performs a standard SPI interface communication.

Key functions:

  • void expand8_write_data ( uint8_t addr, uint8_t tx_data ); - Generic write data function.
  • uint8_t expand8_read_data ( uint8_t addr ); - Generic read data function.
  • EXPAND8_RETVAL_T expand8_set_port ( uint8_t sel_port, uint8_t sel_imped ); - Set port function.

Examples description

The application is composed of three sections :

  • System Initialization - Initializes SPI, set the CS pin as outputs
     and begins to write log.
  • Application Initialization - Initialization driver enables - SPI,
     also, write a log.
  • Application Task - (code snippet) This is an example that demonstrates the use of the Expand 8 click board.
     Expand 8 click by toggling each of 10 available ports every 1 second.
     Results are being sent to the Usart Terminal where you can track their changes.
void application_task ( )
{

    expand8_set_port( select_port,
                      EXPAND8_SET_LOW_IMPEDANCE );
   
    mikrobus_logWrite( "     Port P", _LOG_TEXT );
    ByteToStr( select_port, demo_text );
    Ltrim( demo_text );
    mikrobus_logWrite( demo_text, _LOG_TEXT );
    mikrobus_logWrite( " ON", _LOG_LINE );
    mikrobus_logWrite( "- - - - - - - - - - -", _LOG_LINE );
    Delay_ms( 1000 );
        
    expand8_set_port( select_port,
                      EXPAND8_SET_HIGH_IMPEDANCE );
    mikrobus_logWrite( "     Port P", _LOG_TEXT );
    ByteToStr( select_port, demo_text );
    Ltrim( demo_text );
    mikrobus_logWrite( demo_text, _LOG_TEXT );
    mikrobus_logWrite( " OFF", _LOG_LINE );
    mikrobus_logWrite( "---------------------", _LOG_LINE );
    Delay_ms( 1000 );

    select_port++;

    if ( select_port > EXPAND8_ADDR_OUT_LVL_PORT_P9 )
    {
        select_port = EXPAND8_ADDR_OUT_LVL_PORT_P0;
    }
}

Other mikroE Libraries used in the example:

  • SPI
  • 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

SAML Touch click

5

SAML Touch Click is a Click board equipped with two capacitive touchpads and one capacitive slider.

[Learn More]

Nano Power click

0

Nano Power click is a boost (step-up) DC-DC converter click with extremely high efficiency and very low input voltage, aimed at the low power IoT market and battery-powered sensors and other devices.

[Learn More]

Charger 26 click

0

Charger 26 Click is a compact add-on board that provides a single-cell charging solution. This board features the MAX1811, a USB-powered Li+ charger from Analog Devices. The charger uses an internal FET to deliver the battery up to 500mA charging current. It has pre-conditioning that soft-starts a near-dead battery cell before charging.

[Learn More]