TOP Contributors

  1. MIKROE (2655 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 (136781 times)
  2. FAT32 Library (69978 times)
  3. Network Ethernet Library (55948 times)
  4. USB Device Library (46274 times)
  5. Network WiFi Library (41888 times)
  6. FT800 Library (41184 times)
  7. GSM click (28987 times)
  8. PID Library (26419 times)
  9. mikroSDK (26372 times)
  10. microSD click (25381 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

LLC SPI click

Rating:

6

Author: MIKROE

Last Updated: 2019-01-03

Package Version: 1.0.0.0

mikroSDK Library: 1.0.0.0

Category: Port expander

Downloaded: 3208 times

Not followed.

License: MIT license  

The LLC SPI click is a very useful Click board which can be utilized as the level converter for logic signals. The topology of this logic level conversion (LLC) circuit is perfectly suited for SPI communication between devices with unmatched voltages of their logic signals.

No Abuse Reported

Do you want to subscribe in order to receive notifications regarding "LLC SPI click" changes.

Do you want to unsubscribe in order to stop receiving notifications regarding "LLC SPI click" changes.

Do you want to report abuse regarding "LLC SPI 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

LLC SPI click

LLC SPI click

Native view of the LLC SPI click board.

View full image
LLC SPI click

LLC SPI click

Front and back view of the LLC SPI click board.

View full image

Library Description

The library contains functions for writing data to SPI wires and reading data from SPI wires.

Key functions:

  • void spillc_setCS(uint8_t state) - Function for set CS pin state.
  • void spillc_write(uint8_t *pBuf, uint16_t nBytes) - Function executes write sequence of n bytes.
  • void spillc_read(uint8_t *pBuf, uint16_t nBytes) - Function executes read sequence of n bytes.
  • void spillc_transfer(uint8_t *pIn, uint8_t *pOut, uint16_t nBytes) - Function should executes read/write sequence of n bytes.

Examples description

The application is composed of the three sections :

  • System Initialization - Initializes SPI module and sets CS pin as OUTPUT
  • Application Initialization - Initialization driver init
  • Application Task - (code snippet) - Counter passes through the loop and logs the value of the counter on the bargraph display

Note - Connection between BarGraph and SPI-LLC is made through SPI interface. You can connect a BarGraph click and SPI-LLC click with the wires to make the connection between click boards. We use the BarGraph click to demonstrate the functions of the SPI-LLC click.

void applicationTask()
{
    uint16_t convert;
    uint8_t tmp[2];
    uint8_t cnt;

    // BarGraph display
    for (cnt = 0; cnt <= 10; cnt++)
    {
        convert  = (uint16_t)((1 << cnt) - 1);
        tmp[1] = (convert & 0x00FF);
        tmp[0] = (convert & 0xFF00) >> 8;

        spillc_setCS(0);
        spillc_write(&tmp[0], 2);
        spillc_setCS(1);
        
        Delay_ms( 1000 );
    }
}

Other mikroE Libraries used in the example:

  • I2C

Additional notes and information

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

Temp-Hum 6 click

5

Temp-Hum 6 click is a smart temperature and humidity sensing click board, packed with features that allow easy and simple integration into any design.

[Learn More]

GNSS 13 click

0

GNSS 13 Click is a compact add-on board that provides positioning, navigation, and timing services. This board features the LG77LICMD, a global-region standard-precision GNSS module from Quectel Wireless Solutions. This module utilizes concurrent reception of up to three GNSS systems (GPS, GLONASS (or BeiDou), and Galileo), maximizing position availability, especially under challenging conditions such as deep urban canyons. By combining EASY™ (Embedded Assist System), an advanced AGNSS feature, with GLP (GNSS Low Power), a low-power mode, the LG77LICMD module achieves high performance, low power consumption, and fully meets industrial standards. It also has a configurable host interface, anti-jamming technology, and a multi-tone active interference canceller.

[Learn More]

ISO 9141 click

5

ISO 9141 Click is a compact add-on board that contains a monolithic bus driver with ISO 9141 interface. This board features the L9637, a monolithic integrated circuit containing standard ISO 9141 compatible interface functions from ST Microelectronics.

[Learn More]