TOP Contributors

  1. MIKROE (2663 codes)
  2. Alcides Ramos (358 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 (137075 times)
  2. FAT32 Library (70221 times)
  3. Network Ethernet Library (56094 times)
  4. USB Device Library (46407 times)
  5. Network WiFi Library (42028 times)
  6. FT800 Library (41372 times)
  7. GSM click (29109 times)
  8. mikroSDK (26550 times)
  9. PID Library (26487 times)
  10. microSD click (25483 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

USB-C Source click

Rating:

5

Author: MIKROE

Last Updated: 2021-01-29

Package Version: 1.0.0.0

mikroSDK Library: 1.0.0.0

Category: USB-C PD

Downloaded: 1556 times

Not followed.

License: MIT license  

USB-C Source Click is a compact add-on board that contains a standalone autonomous USB power delivery controller. This board features the STUSB4700, an independent USB power delivery controller optimized as a provider to negotiate a given amount of power to be sourced to an inquiring consumer device from STMicroelectronics.

No Abuse Reported

Do you want to subscribe in order to receive notifications regarding "USB-C Source click" changes.

Do you want to unsubscribe in order to stop receiving notifications regarding "USB-C Source click" changes.

Do you want to report abuse regarding "USB-C Source 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

USB-C Source Click

USB-C Source Click

Native view of the USB-C Source Click board.

View full image
USB-C Source Click

USB-C Source Click

Front and back view of the USB-C Source Click board.

View full image

Library Description

The library covers all the necessary functions to control USB-C Source Click board™. A library performs the communication with the device via I2C interface.

Key functions:

  • void usbcsource_default_config ( void ) - Default configuration function.
  • uint8_t usbcsource_get_pdo_config ( uint8_t pdo_numb, pdo_config_t *pdo_cfg_data ) - Get PDO configuration function.
  • void usbcsource_get_port_status ( port_status_t *port_status_data ) - Get port status function.

Examples description

The application is composed of three sections :

  • System Initialization - Initializes I2C and start to write log.
  • Application Initialization - Initialization driver enables - I2C, set hardware reset and default configuration and display configuration of the five PDOs, also write log.
  • Application Task - (code snippet) This is an example that demonstrates the use of the USB-C Source Click board™. In this example, we show port status, monitoring, and connections. All data logs write on USB uart changes every 5 sec.
void application_task ( )
{
    usbcsource_get_port_status( &port_status );
    display_port_status( );
    Delay_ms( 100 );
    mikrobus_logWrite( "- - - - - - - - - - - - - -", _LOG_TEXT );
    mikrobus_logWrite( "- - - - - - - - - - - - - -", _LOG_LINE );
    
    usbcsource_get_monitoring_status( &monitor_status );
    display_monitoring_status( );
    Delay_ms( 100 );
    mikrobus_logWrite( "- - - - - - - - - - - - - -", _LOG_TEXT );
    mikrobus_logWrite( "- - - - - - - - - - - - - -", _LOG_LINE );
    
    usbcsource_get_connection_status( &conn_status );
    display_connection_status( );
    Delay_ms( 100 );
    mikrobus_logWrite( "---------------------------", _LOG_TEXT );
    mikrobus_logWrite( "---------------------------", _LOG_LINE );
    Delay_ms( 5000 );
}


Additional Functions :

  • void display_port_status ( ) - Display port status info.
  • void display_monitoring_status ( ) - Display monitoring status info.
  • void display_connection_status ( ) - Display connection status info.

Other mikroE Libraries used in the example:

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

Angle 10 click

0

Angle 10 Click is a compact add-on board that detects the absolute angular position of a permanent magnet. This board features the AS5070A, a high-resolution angular position sensor with an analog output for precise absolute angle measurement from ams AG. Based on a Hall sensor technology, the AS5070A measures the orthogonal component of the flux density over a full-turn rotation and compensates for external stray magnetic fields with a robust architecture based on a 14-bit sensor array and analog front-end. Only a simple two-pole magnet rotating over the center of the AS5070A is required to measure the angle, providing an instant indication of the magnet’s angular position.

[Learn More]

BT click

5

BT Click is a compact add-on board targeted for applications that require both Bluetooth Smart and Classic connectivity.

[Learn More]

Gyro 2 click

6

The Gyro 2 click is a three-axis digital angular rate sensor which can sense the angular movement and velocity in three perpendicular axes. The Click board is equipped with the FXAS21002C, a three-axis integrated angular rate gyroscope.

[Learn More]