Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Initializing a PIC Microcontroller with labview

Is it possible to do everything from initializing/configuring outputs to setting up a to d's on a PIC microcontroller in Labview? I am using a serial port and have followed the suggestions I've rad about using Visa open port, setup comport, etc. But how do you actually begin setting configuring the Pic? Does anyone know if there is code available for this?
0 Kudos
Message 1 of 6
(5,494 Views)
 
Hi rlg50,
 
Serial communication will allow you to send and receive strings of information from your computer to the PIC.  Configuring the settings of the PIC will totally depend on the specific PIC you are using.  Click here to reference a forum that talks more about serial to PIC communication.  I have also attached a link that explains serial communication in more detail.  
 
 
Regards,
Andy L.
Applications Engineer
National Instruments
0 Kudos
Message 2 of 6
(5,466 Views)
Thanks. I will look at these as soon as I get back to the office.
0 Kudos
Message 3 of 6
(5,441 Views)
Actually, I went ahead and looked at the first link that you referenced. I had already read this post during my initial search and it really isn't that helpful. But I will look at your other links of reference soon. Thanks again.
0 Kudos
Message 4 of 6
(5,440 Views)

The real key is that LabVIEW is not going to be able to everything on your PIC. Your PIC is going to have to have an application running on it which is capable of receiving commands over the serial port, and translating them to actions on the PIC. This application on your PIC would have to be written using a C (or other language) compiler for the PIC, or in PIC assembly using the tools that Microchip makes available.

I have done something similar in the past, where I created an application running on the PIC which was capable of receiving commands over the serial port.  These commands were then translated into pulse-width modulated square waves on some of the PICs outputs.  While this ultimately would allow me to use LabVIEW to control the PIC, I could not avoid developing the original application for the PIC to interpret the serial commands.

You may want to look into some of NI's low-cost USB interfaces, such as the NI USB-6008. This wil give you the ability to easy interface with analog and digital I/O, without the need to separately program a controller such as a PIC.

-Jason S.

 
Message 5 of 6
(5,435 Views)
Ahh, this would be a great alternative. Thanks for the great tip.
0 Kudos
Message 6 of 6
(5,431 Views)