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 (137077 times)
  2. FAT32 Library (70222 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 (26551 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

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: 4654 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

Rotary G click

5

Rotary G click carries a 15-pulse incremental rotary encoder with detents, surrounded by a ring of 16 LEDs. It’s a perfect solution for adding a precision input knob to your design. The encoder outputs A and B signals (out of phase to each other); the knob also acts as a push-button which sends an interrupt to the target board MCU.

[Learn More]

Spectral 2 click

0

Spectral 2 click is a multispectral color sensing device, which uses the state-of-the-art sensor IC for a very accurate color sensing.

[Learn More]

LDC click

0

LDC Click is a compact add-on board that measures inductance change which a conductive target causes when it moves into the inductor's AC magnetic field.

[Learn More]