LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to use RS232 to get data from PIC

HI

Thanks for the files.

Attached you will find what I did so far. Now the communication between the pic and Labview works.

The only problem I do have now is that the gauges tend to jitter.

I wonder If I made a huge mistake in the programm or that Labview is just not fast enough for that.

I do get a new inputstring every 100ms. When I change the constant of the waittimer it becomes better. But I think that is not the right way to get acceptable values.

Bye

0 Kudos
Message 11 of 15
(1,156 Views)
I am unable to look at your code, I am still working with LV 7.0 and I think you sent 7.1.
 
I take it you are making an analog measurement with your PIC.  I have that problem too as in my program I am using 10 bits to take in a 5V reference.  Check and see if you are using 8 bits or 10 bits, the code would be
 
#define ADC = 10
 
if you don't see this line, you are using the default and it is probably 8 bits.  But still that would be 19.5 mV separation at the PIC input.  I am using a cheap potentiometer as well as 10 bits so I expect some jitter with 5mV separation.
 
As for speed, I had my baud rate up to 38400, continuously taking in data and never had any problems (generally I operate at 9600). 
 
My guess is the jitter is coming from the PIC, I haven't done a lot of programming in LV or PIC's but I hope to do more in the future. 
0 Kudos
Message 12 of 15
(1,140 Views)

Hi,

 

wiring diagram please

 

Thx

0 Kudos
Message 13 of 15
(417 Views)

@nizartun wrote:

Hi,

 

wiring diagram please


To whom is your question addressed? And to what are you referring by "wiring diagram"? If you are referring to the block diagram, the VI was posted - just download it and look at it.

0 Kudos
Message 14 of 15
(412 Views)

I want to say electronic circuit diagram

0 Kudos
Message 15 of 15
(388 Views)