LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

i want to control the switching of LED's on microcontroller side using serial port. i want to develop the VI which will have GUI that can turn on or turn off the LED using serial port communication. can you please help?

The LED's are connected on any port of microcontroller. Is it possible to switch on and off the LEDs by giving commands using serial port??

0 Kudos
Message 1 of 7
(3,095 Views)

(Please keep the subject line to a short descriptive sentence. Don't put your entire question there.)

 

LabVIEW can communicate via serial port. If the microcontroller listens to serial data, there must be a certain command to light a LED connected to a certain port. All you need is to check the manual to find out what the serial data needs to be.

 

0 Kudos
Message 2 of 7
(3,089 Views)

Yes, you can have labview right to the Port configuration registers for the IO port you are using and it can set individual pins to high or low.  Having the LEDs tied to those pins will let you control them individually. 

 

What microcontroller are you using?

0 Kudos
Message 3 of 7
(3,060 Views)

i am using Atmega32 microcontroller. I am using event structure for switching ON and OFF.  but its not working. In event structure, i have included commands to send on the port on which LED's are connected.

0 Kudos
Message 4 of 7
(3,017 Views)

Why don't you start a little more simple.  Try to put together a VI that sets the value high.  If you can turn the LED on, you can start to expand the architecture.  Right now, you don't know which part of the code is the issue.

0 Kudos
Message 5 of 7
(3,010 Views)

You need to configure the serial port as a USART.  Then find what you write to the microcontroller here.  They have example in C and Assembly on how to configure the port as a USART.  Hope this helps.

 

 

0 Kudos
Message 6 of 7
(2,987 Views)