LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Using an MSP430 to control an H-Bridge

Solved!
Go to solution

Hello,

 

I was assigned a project to use an MSP430 microcontroller to program a PWM ranging from 0.2 to 0.9 to drive an H-Bridge and use LabView to vary the code.

 

What I am wanting to accomplish is create a VI that allows a user to control the number range, then send that number to the MSP430 so that it will carry out the PWM code. I found a code that drives an H-Bridge using the myDAC, but since I am not using one, the code is full of question mark boxes (which is where the myDAC functions are called)

 

My ultimate question is if I created a VI that allows a user input for a number range, how do I get that to the MSP and what do I do to make it work with the PWM code.

 

Thank You

 

Note* I am using NI VISA but still have not figured out what to do

 

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

How to code the MSP430 is probably not a subject for this forum. But I guess you have to configure a uart in the msp430, and program some sort of commandset or protocol in the msp, so that when you give the msp one of these commands, it sets the pwm accordingly.

Once you have the commandset in place, it should be straightforward to make a VI that sends these commands to a serial-port connected to the msp430.

 

Best Regards

Message 2 of 7
(3,787 Views)

Thank you for the reply.

 

My issue is not programming the PWM itself, just getting the LabView code to the MSP430. Is it as simple as just creating the VI then connecting the ports to the computer?

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

I'm not sure what you mean by 'getting the labview code' to the msp430?

If you mean programming the msp430 with labview code, you cant do this directly.

However I know there is a c code generator  but I have never used it, and I dont know if you could use it for msp430?

 

If you dont have this toolkit, (it is purchased separatly as I understand it), you probably need to make the code that should run in the msp430 in c code yourself. There is probably good resources on Texas Instruments website on how to get started with this.

 

Getting the code to the msp430 would mean then, that you should generate some c - code, written for the msp430, whatever this is done from labview c-code generation or by writing it yourself.

Compile the c-code for the msp430.

Program the msp430 with a programmer.

 

Hopes this help you a bit.

 

 

Message 4 of 7
(3,771 Views)
Solution
Accepted by topic author whitenun

Hi

 

I found this article descriping how to develop in LabVIEW for MSP430, using the c code generator.

 

Best Regards

Message 5 of 7
(3,756 Views)

Thank you very much for helping me out, I really appreciate it.

0 Kudos
Message 6 of 7
(3,747 Views)

You're welcome.

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