TOP Contributors

  1. MIKROE (2659 codes)
  2. Alcides Ramos (356 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 (136941 times)
  2. FAT32 Library (70063 times)
  3. Network Ethernet Library (56015 times)
  4. USB Device Library (46330 times)
  5. Network WiFi Library (41943 times)
  6. FT800 Library (41264 times)
  7. GSM click (29050 times)
  8. mikroSDK (26465 times)
  9. PID Library (26441 times)
  10. microSD click (25401 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: 1918 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

LED Driver 7 click

0

LED Driver 7 click is a Click board™ equipped with the LTC3490, single cell 350mA LED driver from Analog Devices.

[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]

Scanner click

5

Scanner Click features a high-sensitivity 300-dpi, linear optical sensor array with integrated 8-bit analog-to-digital converters labeled as the TSL3301CL. This Click board™ has the array that consists of 102 pixels, each measuring 85 μm (H) by 77 μm (W) and spaced on 85 μm centers.

[Learn More]