vtohz2 2.0.0.0
|
V to Hz 2 click is a device that converts an analog voltage input signal into a pulse wave signal of a certain frequency.
We provide a library for the VToHz2 Click as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.
Package can be downloaded/installed directly form compilers IDE(recommended way), or downloaded from our LibStock, or found on mikroE github account.
This library contains API for VToHz2 Click driver.
- Initialization function.void vtohz2_cfg_setup ( vtohz2_cfg_t *cfg );
VTOHZ2_RETVAL vtohz2_init ( vtohz2_t *ctx, vtohz2_cfg_t *cfg );
- Function performs enabling and disabling of the device.uint8_t vtohz2_get_freq_out ( vtohz2_t *ctx );
void vtohz2_enable ( vtohz2_t *ctx, uint8_t state );
void vtohz2_pwm_start ( vtohz2_t *ctx );
This appliaction enables usage of a converter for analog voltage input signal into a pulse wave signal of a certain frequency.
The demo application is composed of two sections :
Initializes driver and enables the click board.
Sets the output frequency by incrementing the pwm duty cycle from 0 to 100% in an infinite loop. Results are being sent to USB UART terminal.
The full application code, and ready to use projects can be installed directly form compilers IDE(recommneded) or found on LibStock page or mikroE GitHub accaunt.
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.