TOP Contributors

  1. MIKROE (2653 codes)
  2. Alcides Ramos (351 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 (136662 times)
  2. FAT32 Library (69900 times)
  3. Network Ethernet Library (55920 times)
  4. USB Device Library (46248 times)
  5. Network WiFi Library (41881 times)
  6. FT800 Library (41127 times)
  7. GSM click (28972 times)
  8. PID Library (26406 times)
  9. mikroSDK (26343 times)
  10. microSD click (25350 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: 3195 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

Relay click

0

Relay click is a dual relay Click board, which can be operated by the host MCU. This Click board offers an elegant and easy solution for controlling a wide range of high power applications.

[Learn More]

ECG 2 click

0

Track the patterns of your beating heart with ECG 2 click. ECG 2 click contains ADS1194 16-bit delta-sigma analog-to-digital converters from Texas Instruments, a built-in programmable gain amplifier (PGA), an internal reference, and an onboard oscillator.

[Learn More]

Stepper 20 click

0

Stepper 20 Click is a compact add-on board that contains a bipolar stepper motor driver. This board features the TB67S580FNG, a two-phase bipolar stepping motor driver from Toshiba Semiconductor. Fabricated with the BiCD process, it supports a PWM constant-current control drive and steps resolution from full to 1/32 for less motor noise and smoother control. It has a wide operating voltage range of 8.2V to 44V with a maximum output current capacity of 1.28A, decay modes selection function, protection, and several anomaly detection indicators.

[Learn More]