I'm trying to measure a voltage that my anemometer transmits with my 16F690, (voltage range between 0 - 5 V.)
(flowcode 4)
ADC voltage
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: ADC voltage
Hello,
You should just be able to use the ADC component to sample and read back the voltage.
You should just be able to use the ADC component to sample and read back the voltage.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: ADC voltage
Your Vin variable is a Byte.
Try creating a float variable and then use this to collect the voltage. Once you have done this you should be able to convert the float to a byte correctly.
Try creating a float variable and then use this to collect the voltage. Once you have done this you should be able to convert the float to a byte correctly.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel