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: 2018-03-09
Package Version: 1.0.0.0
Example: 1.0.0.0
Category: Measurements
Downloaded: 4602 times
Not followed.
License: MIT license
HZ to V click is a device that can convert input frequency of the signal with virtually any wave shape to a DC voltage output, with a level proportional to the input frequency.
Do you want to subscribe in order to receive notifications regarding "Hz to V click" changes.
Do you want to unsubscribe in order to stop receiving notifications regarding "Hz to V click" changes.
Do you want to report abuse regarding "Hz to V click".
Examples Description
The demo application shows how to control the Hz to V click using MCU's PWM module.
The demo application is composed of two sections:
//Sets the output voltage in millivolts void hz2v_setOutputVoltage(uint16_t voltage) { pwmPeriod = PWM_TIM5_Init(voltage*2); PWM_TIM5_Set_Duty(pwmPeriod/2, _PWM_NON_INVERTED, _PWM_CHANNEL1); PWM_TIM5_Start(_PWM_CHANNEL1, &_GPIO_MODULE_TIM5_CH1_PA0); } void applicationTask() { hz2v_setOutputVoltage(5000); //5 V output Delay_ms(3000); hz2v_setOutputVoltage(2500); //2.5 V output Delay_ms(3000); hz2v_setOutputVoltage(1000); //1 V output Delay_ms(3000); hz2v_setOutputVoltage(500); //0.5 V output Delay_ms(3000); }
Other MikroElektronika Libraries used in the example:
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.