TOP Contributors

  1. MIKROE (2662 codes)
  2. Alcides Ramos (357 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 (137052 times)
  2. FAT32 Library (70177 times)
  3. Network Ethernet Library (56054 times)
  4. USB Device Library (46374 times)
  5. Network WiFi Library (41992 times)
  6. FT800 Library (41324 times)
  7. GSM click (29083 times)
  8. mikroSDK (26522 times)
  9. PID Library (26466 times)
  10. microSD click (25449 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: 4651 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

VCP Monitor 4 click

0

VCP Monitor 4 Click is a compact add-on board that represents a high-precision power monitoring system. This board features the INA239, ultra-precise digital power monitor with a 16-bit delta-sigma ADC specifically designed for current-sensing applications from Texas Instruments.

[Learn More]

9DOF click

0

9DOF click carries ST’s LSM9DS1 inertial measurement module that combines a 3D accelerometer, a 3D gyroscope and a 3D magnetometer into a single device outputting so called nine degrees of freedom data...

[Learn More]

MCP2003B Click library

3

MCP2003B click is a mikroBUS add-on board with a bi-directional LIN transceiver. The click has three onboard screw terminals for connecting the transceiver to a LIN network (three wires: LIN, VBB and GND). MCP2003B click communicates with the target board MCU through the mikroBUS UART interface (RXD, TXD).

[Learn More]