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 (136652 times)
  2. FAT32 Library (69879 times)
  3. Network Ethernet Library (55906 times)
  4. USB Device Library (46245 times)
  5. Network WiFi Library (41880 times)
  6. FT800 Library (41118 times)
  7. GSM click (28970 times)
  8. PID Library (26404 times)
  9. mikroSDK (26334 times)
  10. microSD click (25347 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

MCP16331 INV click

Rating:

5

Author: MIKROE

Last Updated: 2018-02-12

Package Version: 1.0.0.0

mikroSDK Library: 1.0.0.0

Category: Buck-Boost

Downloaded: 4589 times

Not followed.

License: MIT license  

MCP16331 INV click works as a buck-boost voltage regulator, a type of switching mode power supply topology that combines the principles of the buck conversion (step-down) and the boost conversion (step-up) integrated on a single device.

No Abuse Reported

Do you want to subscribe in order to receive notifications regarding "MCP16331 INV click" changes.

Do you want to unsubscribe in order to stop receiving notifications regarding "MCP16331 INV click" changes.

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

MCP16331 INV click

MCP16331 INV click

Native view of the MCP16331 INV Click board.

View full image
MCP16331 INV click

MCP16331 INV click

Front and back view of the MCP16331 INV Click board.

View full image

Library description
Initializes SPI bus driver and click driver functions witch set DAC analog output voltage to the desired value, but in the inverted value compared to the reference voltage, VREF (VDD). Functions have the ability to set the device in the active or shutdown mode or to enable or disable internal pull up on the VIN. For more details check the documentation.

Key functions
void mcp16331inv_setDACVout( uint16_t DAC_value, uint8_t gain_value, uint8_t mode ) - The function determines DAC output voltage value in depending on the input DAC_value (0x0000 - 0x0FFF) and gain_value. The function also can put the device in the active or the shutdown mode.
void mcp16331inv_enableVin( uint8_t state ) - The function enables or disables internal VIN pull up.

The application is composed of three sections :

  • System Initialization - Initializes pins, directions, and SPI bus.
  • Application Initialization - Initializes the click driver and enables the pull-up.
  • Application Task - (code snippet) - Sets DAC output voltage to 3500mV when the gain is set up on 1xVREF, with 4s delay time, and then sets DAC output voltage to 5000mV, when the gain is now set up on 2x VREF, with 4s delay time. The VIN voltage must be greater than 4V.
void applicationTask()
{
    mcp16331inv_setDACVout( MCP16331INV_3500_MV_1X_GAIN, 
        MCP16331INV_GAIN_X_VREF, MCP16331INV_ACTIVE_MODE );
    Delay_ms( 4000 );
    mcp16331inv_setDACVout( MCP16331INV_5000_MV_2X_GAIN, 
        MCP16331INV_GAIN_2X_VREF, MCP16331INV_ACTIVE_MODE );
    Delay_ms( 4000 );
}


Other MikroElektronika Libraries used in the example:

  • SPI

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

GSM 5 click

0

GSM 5 Click is a compact add-on board representing a compact GSM cellular network communication solution. This board features the SARA-G450, a GSM/GPRS quad-band cellular module certified and approved by the main regulatory bodies and operators from u-blox. It features class 12 GSM/GPRS connectivity in the popular u-blox SARA form factor and comes with a comprehensive feature set, including an extensive set of internet protocols designed to provide fully integrated access to u-blox GNSS positioning with embedded A-GPS (AssistNow Online and AssistNow Offline) functionality. Besides a data rate up to 85.6 kbps and an advanced jamming detection feature, this board also offers a high-quality integrated audio interface allowing voice communication.

[Learn More]

BattMon click

5

BATT-MON Click is a very versatile, high accuracy, multiple-chemistry battery gauge for applications single-cell batteries.

[Learn More]

OLED C click

0

OLED C click is equipped with the 96x96 high-color OLED display. It can display up to 65K/262K different colors and shades on a compact size display, based on the OLED technology.

[Learn More]