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]
Rating:
Author: MIKROE
Last Updated: 2018-02-12
Package Version: 1.0.0.0
mikroSDK Library: 1.0.0.0
Category: Buck-Boost
Downloaded: 5106 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.
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".
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 :
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:
Additional notes and information Depending on the development board you are using, you may need USB UART click, USB 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.