vtohz 2.0.0.0
|
V to HZ click is a device that converts an analog voltage input signal into a pulse wave signal of a certain frequency. It has a linear response, so applying a voltage in a range of 0 to 5V on its input, will result in generating the pulse train with frequency linearly proportional to the input voltage.
We provide a library for the VtoHz 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 VtoHz Click driver.
- Initialization function.void vtohz_cfg_setup ( vtohz_cfg_t *cfg );
VTOHZ_RETVAL vtohz_init ( vtohz_t *ctx, vtohz_cfg_t *cfg );
- Stop PWM module.void vtohz_set_duty_cycle ( vtohz_t *ctx, pwm_data_t duty_cycle )
void vtohz_pwm_stop ( vtohz_t *ctx );
void vtohz_pwm_start ( vtohz_t *ctx );
This application converts an 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.
Alternates between different output frequencies.
Output frequency may vary depending on the offset and gain potentiometers on board the click.
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.