Hz To V 2 Click Board
Hz To V 2 Click Board
The HZ to V 2 Click Board™ contains a device that can converts the input frequency of the signal with virtually any wave shape to a DC voltage output, with a level proportional to the input frequency. It features a specialised IC labelled as VFC32KU, which has a good linear response and temperature stability. By applying a signal with the frequency up to 120kHz on its input, the HZ to V 2 Click Board™ will generate a DC voltage up to 3.3V. The IC is supplied by a dual-voltage boost DC/DC converter IC, which provides the power supply of ±15V, required for the VFC32KU IC operation.
Software Support
We provide a demo application for the Hz to V 2 Click Board™ on our Libstock page, as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.
Library Description
Library provides generic functions for working with the click board.
Key functions :
void hztov2_enPin(uint8_t pinState)
- Function for enabling the click board.void hztov2_adcInit()
- Prepare the ADC for voltage readings.float hztov2_adcRead()
- Read the voltages and return the return the float voltage value.
Example Description
The application is composed of three sections:
- System Initialization - Initializes GPIO and UART structures.
- Application Initialization - Power on the click board and initializeS the ADC.
- Application Task - Voltage reading is done from the analog pin and the conversion result is converted and output via the UART output.
void applicationTask() { float voltage; char txt[20]; voltage = hztov2_adcRead(); if(voltage<0.99) { voltage = voltage * 1000.0; FloatToStr(voltage,txt); txt[5] = 'm'; txt[6] = 'V'; txt[7] = 0; } else { FloatToStr(voltage,txt); txt[5] = ' '; txt[6] = 'V'; txt[7] = 0; } mikrobus_logWrite(txt,_LOG_LINE); Delay_ms(100); }
The full application code, and ready to use projects can be found on our LibStock page.
Other mikroE Libraries used in the example:
- UART Library
- Conversions Library
- C_String Library
- ADC Library
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.
MIKROSDK
The Hz to V 2 Click Board™ is supported with mikroSDK - MikroElektronika Software Development Kit. To ensure proper operation of mikroSDK compliant click board demo applications, mikroSDK should be downloaded from the LibStock and installed for the compiler you are using.
Hz To V 2 Click Board
Frequently Asked Questions
Have a Question?
Be the first to ask a question about this.