Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

READ SERIAL PORT

I'm sending data from pic 18F452, I can read data with VISA read without problems but sometimes the byte is incorrect, the byte received is different of byte transmitted.

Is problem de Labview(reading to the port) or the serial transmission with the PIC?
0 Kudos
Message 1 of 4
(3,973 Views)
Hi AMR:

I don't exactly understand where the byte count is different. Are you missing some information when you perform the VISA read? What are you specifying as the byte count in the VISA read? Is it that this byte count is different from the return count on the VISA read? Also, what version of LabVIEW are you using?

Thank you,

Emilie S.
National Instruments
Applications Engineer
0 Kudos
Message 2 of 4
(3,939 Views)
Thanks to answer

I was testing some and I think that the problem is in the instability of the crystal, since for correct recepcion/transmision rate depends on the stability of baud and this it depends as well on the frequency of crystal oscillation whereupon pic works, this I say it because it increases baud rate in pic and happens that read values different from which send, because it does not even finish reading a byte already when received the other, the version with which work is Labview 7,0, the byte count is 1, the transmission is asincrona.

The instability of the crystal can be observed in the oscilloscope, when the frequency the this stable data are received correctly, but sometimes changes the frequency for a moment and the problem appears, because consequently it changes baud rate.

Thanks friend!
0 Kudos
Message 3 of 4
(3,933 Views)
Hi AMR:

I just wanted to confirm that you have figured out the problem and that it is in the changing baud rates?

Thank you,

Emilie S.
National Instruments
Applications Engineer
0 Kudos
Message 4 of 4
(3,913 Views)