TOP Contributors

  1. MIKROE (2693 codes)
  2. Alcides Ramos (362 codes)
  3. Shawon Shahryiar (307 codes)
  4. jm_palomino (112 codes)
  5. Bugz Bensce (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 (137949 times)
  2. FAT32 Library (70759 times)
  3. Network Ethernet Library (56444 times)
  4. USB Device Library (46827 times)
  5. Network WiFi Library (42587 times)
  6. FT800 Library (41785 times)
  7. GSM click (29468 times)
  8. mikroSDK (27020 times)
  9. PID Library (26661 times)
  10. microSD click (25797 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: 4857 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

MUX 3 click

0

MUX 3 Click is the general purpose multiplexer which offers multiplexing one input channel to eight single-ended output channels.

[Learn More]

V to Hz 2 click

5

V to Hz 2 click is a device that converts an analog voltage input signal into a pulse wave signal of a certain frequency.

[Learn More]

EERAM 2 click

0

EERAM 2 Click is a standalone serial SRAM memory that includes shadow non-volatile backup. EERAM uses a small external capacitor to provide the energy needed to move the contents of the SRAM to the non-volatile cells when system power is lost.

[Learn More]