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: 2019-07-23
Package Version: 1.0.0.0
mikroSDK Library: 1.0.0.0
Category: Buck
Downloaded: 2832 times
Not followed.
License: MIT license
Buck 12 Click is a high-efficiency step-down converter which provides 3.3V on its output, derived from the connected power supply voltage, in the range from 4.2V to 18V.
Do you want to subscribe in order to receive notifications regarding "Buck 12 click" changes.
Do you want to unsubscribe in order to stop receiving notifications regarding "Buck 12 click" changes.
Do you want to report abuse regarding "Buck 12 click".
Library Description
The library initializes and defines the SPI bus driver. The library includes function for enable or disable buck device. The user also has the function for read voltage on the input and output terminal.
Key functions:
void buck12_control(uint8_t ctrl)
- Function for enable or disable device.float buck12_getVoltage(uint8_t selectVolt)
- Function for get Voltage.Examples description
The application is composed of three sections :
Note: Voltage on VIN terminal must be between 2.5V and 18V. When the BUCK is enabled - the voltage on the VOUT terminal is about 3.3V..
void applicationTask()
{
char demoText[ 20 ];
float Voltage;
Voltage = buck12_getVoltage(_BUCK12_INPUT_VOLTAGE);
FloatToStr(Voltage, demoText);
mikrobus_logWrite("* VIN : ", _LOG_TEXT);
mikrobus_logWrite(demoText, _LOG_TEXT);
mikrobus_logWrite(" mV", _LOG_LINE);
Voltage = buck12_getVoltage(_BUCK12_OUTPUT_VOLTAGE);
FloatToStr(Voltage, demoText);
mikrobus_logWrite("* VOUT : ", _LOG_TEXT);
mikrobus_logWrite(demoText, _LOG_TEXT);
mikrobus_logWrite(" mV", _LOG_LINE);
mikrobus_logWrite("--------------------------", _LOG_LINE);
Delay_ms( 2000 );
}
Other mikroE Libraries used in the example:
Additional notes and informations
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.