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: 2020-12-18
Package Version: 1.0.0.0
mikroSDK Library: 1.0.0.0
Category: Measurements
Downloaded: 4265 times
Not followed.
License: MIT license
V to HZ click is a device that turns analog voltage into a pulse wave signal of a certain frequency.
Do you want to subscribe in order to receive notifications regarding "V to Hz Click" changes.
Do you want to unsubscribe in order to stop receiving notifications regarding "V to Hz Click" changes.
Do you want to report abuse regarding "V to Hz Click".
Examples Description
The demo application is composed of the application task, and set frequency function :
MikroElektronika libraries used in the example:
v2hz_setOutputFrequency(float frequency) { float dutyCycle; dutyCycle = PWM_TIM5_Init(50000); dutyCycle *= frequency; dutyCycle /= 10000; PWM_TIM5_Set_Duty(dutyCycle, _PWM_NON_INVERTED, _PWM_CHANNEL1); PWM_TIM5_Start(_PWM_CHANNEL1, &_GPIO_MODULE_TIM5_CH1_PA0); } void applicationTask() { v2hz_setOutputFrequency(1000); //1000 Hz output Delay_ms(3000); v2hz_setOutputFrequency(2000); //2000 Hz output Delay_ms(3000); v2hz_setOutputFrequency(5000); //5000 Hz output Delay_ms(3000); v2hz_setOutputFrequency(10000); //10000 Hz output Delay_ms(3000); }
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.