TOP Contributors

  1. MIKROE (2750 codes)
  2. Alcides Ramos (372 codes)
  3. Shawon Shahryiar (307 codes)
  4. jm_palomino (118 codes)
  5. Bugz Bensce (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 (139022 times)
  2. FAT32 Library (71563 times)
  3. Network Ethernet Library (56975 times)
  4. USB Device Library (47295 times)
  5. Network WiFi Library (43003 times)
  6. FT800 Library (42291 times)
  7. GSM click (29727 times)
  8. mikroSDK (27853 times)
  9. PID Library (26846 times)
  10. microSD click (26093 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: 2199 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

mikroBootloader

10

To make it as simple as possible to program MCUs on our dev boards, most of them come with a preloaded USB-HID bootloader. While the bootloader firmware is specific to each chip, the PC utility for loading your HEX file to the target microcontroller is universal. It’s done in four steps and takes less than 20 seconds.

[Learn More]

BATT-MAN Click

0

BATT-MAN Click is a very versatile battery operated power manager. When powered via mikroBUS™, it will charge the connected Li-Ion/Li-Po 3.7V battery, while providing the output voltage on all its outputs at the same time. The interesting feature of this device is that it can provide additional current to the connected load if the current provided from the mikroBUS™ socket is not enough.

[Learn More]

Charger 9 Click

0

Charger 9 Click is a Li-Ion (Li+, Li-Po) battery charger, capable of charging one, two or three battery cells.

[Learn More]