LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Interfacing a high-level LabVIEW with a C8051F120 embedded controller

Good Morning, Folks!
 
     The test hardware uses a C8051F120 processor (not a NI product). My task is to read (only) some variables (a mix of I16, I8, bits) and read/write some bit values. I have access to the variable memory addresses but I haven't a clue how to use that information with the LabVIEW 8.5 and a serial port to get what is neeeded. Any suggestions (besides finding someone else to do it!)?
 
Thanks!
 
 
0 Kudos
Message 1 of 4
(3,553 Views)
Good morning to you, too 🙂

It sounds like you've got a fun application brewing! You mention a serial port, so I'm working under the assumption that your embedded controller communicates externally using something like an RS-232 connection. Keeping this in mind, LabVIEW and its respective drivers ship with some excellent examples on RS-232 serial communication. You can access them from within LabVIEW by clicking Help»Find Examples and navigating to Hardware Input and Output»Serial within the NI Example Finder. Basic Serial Write and Read.vi would probably be a good choice to start.

How do you physically connect this C8051F120 embedded controller with a PC running LabVIEW? More information on your system would enable us to better help ya out.

I hope this helps! Look forward to hearing from you.
Warm regards,

pBerg
0 Kudos
Message 2 of 4
(3,537 Views)
Thanks for the encouragement!  Just a few more added details: communication between the C8051 and the computer is made via an RS-232 connection to an adaptor component. This adaptor component then interfaces with the JTAG port on the controller card. This task is to develop the subVI which will interface with the C8051 for the supervisory LabVIEW VI. I have tried all of my old serial communication LabVIEW VIs from LabVIEW 4.1 through 8.5 but all I end up doing is crashing the C8051. I have also tried Hyperterminal and Vbasic with the same result. Where is the information to tell me WHAT to send to the C8051 (binary, hex, ASCII, text strings) and how to translate the C8051 response into meaningful data? Thanks again!
0 Kudos
Message 3 of 4
(3,532 Views)
Howdy,

We can definitely help you with reading data sent from the MCU and sending data to it, but questions of how to send data from the MCU or how to read data sent to it would have to be answered by its manufacturer or the person developing the program for it.

In an effort to help you get started, I did some research this morning and found a datasheet on the Silicon Labs site that discusses serial communication on the C8051F12x family. Chapters 20-22 outline the registers that the MCU uses for serial communication. You'll want to read through these chapters and familiarize yourself with them before proceeding.

The best way to approach a project like this would be to first create a program on the C8051F120 controller that sends data through its serial port to a COM port on your PC. Then you can use an example LabVIEW program mentioned in my previous post to read the data on your PC's RS-232 COM port sent from your controller.

I hope this helps!
Warm regards,

pBerg
0 Kudos
Message 4 of 4
(3,508 Views)