Quantcast
Channel: LabVIEW topics
Viewing all articles
Browse latest Browse all 66666

Unusually high data value being read (serially, UART) at launch

$
0
0

Hi,

 

I'm experiencing an issue upon startup with unexpectedly high sample values being read serially.

 

The data is being fed from a PIC (18F2550) 10-bit ADC sampled at 1kHz and it is sending the samples out through the UART protocol (19,200 baud rate). We expect values between 0-1023 to be coming from the UART. When these high values occur (up to 2^16-1), a little wiggle on the potentiometer ADC fixes this issue and the data plots as expected.

 

My main.vi illustrates my main applications initial flow, it is preconfigured through the Serial Configure block, it is just not shown there.

The serialreadtointeger.vi also expects 2 bytes at the com port. High byte has 6 MSb's equal to 0 with the last two LSb's being equal to the MSb's of the data sample with the remaining low byte containing the 8 LSb's of the sample adding up to 10 bits.

This youtube video we made shows the issue in more context: http://www.youtube.com/watch?v=2NZDPYPlSZI

 

Are the values being concatenated from the previous application's run or is something else happening?


Viewing all articles
Browse latest Browse all 66666

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>