LabVIEW Embedded

cancel
Showing results for 
Search instead for 
Did you mean: 

How to configure Elemental IO?

I am totally lost in figuring out how to reassign custom ARM target pin functions using the elemental IO wizard! Following "Programming Additional ARM Microcontrollers with LabVIEW (without the LabVIEW Microprocessor SDK)" was totally useless. It created a directory of broken plugin vi that are password protected so there is no hope of figuring out what is going on. I could find little or no meaningful description of how to create plugin vi required to generate elemental IO. Looking in the express VIs display blanks and comment indicated the function is implemented in C, again no help.

 

I understand that the plugins are required to create Labview wrappers for the C code of port R/W and configuration operations but how this is done remains a mystery after 3 days of searching Developer's Zone. Is there a description of how to use the plugin vi templates?

 

I would like to reconfigure the IO pins on my MCB2300 Keil Demo unit. Could you provide a step by step procedure to make the following changes to the MCB2300 Elemental IO configuration:

 

1. Add Analog Inputs

2. Change Digital Input to a Digital Output

3. Add Digital Output

4. Add a Digital Input

5. Change the function of a Pin.

 

I will not be insulted if you explain it to me like I'm a 3-year old.  Overall, I have been impressed with quality and ease of using the Embedded product, and I can see the benefit of elemental IO once it is configured. It's just this fundamentally simple processor configuration and R/W aliasing seems to have been made exceedingly confusing by the Elemental IO configuration concept as currently documented, leaving me to wonder why it's not easier just to edit a C header file?

 

Best regards,

Rick Ales

Message 1 of 10
(8,069 Views)

rales,

 

I'm sorry that you've not had too much success in finding what you want.  I'll try to help...

 

-When using the LabVIEW profile for the MCB2300 evaluation board itself ("MCB2300" is identified as being used in the Project Explorer Window), the specific pins used on the board have been pre-identified.  For example, LED0 is identified as a digital output instead of a specific digital pin (for which you would have to figure out yourself which specific pin was tied to each LED).

This portion of the help file explains how to do this: Creating New Elemental I/O Items (ARM)  From what I understand, this is what you've been doing thus far.

 

-There is another LabVIEW profile corresponding to the chip itself - not the evaluation board.  ("LPC2378" is identified as being used in the Project Explorer Window.)  This article explains how to access this chip profile.  (How do I access all Elemental I/O on my ARM Evaluation board?)  When using this profile, you have access to all pins on the chip.  However, you will have to do the research yourself though in order to correspond each pin to that which it's actually connected on the evaluation board.

 

-You should only use the porting guide (creating those plugin VIs) when creating a new profile for a non-Tier 1 supported chip.

 

Please let me know if I can explain something more in greater detail.

Kevin S.

Applications Engineer

National Instruments

0 Kudos
Message 2 of 10
(8,051 Views)

I totally stumbled across what I wanted to do!  I simply wanted to reasign Digital Inputs created in the Elemental IO to make them outputs.  If you right click on the elemental node in a vi or its properties in the project NOTHING!  If you right click on the connector then you get the option of "Change to Write". 

 

I probably have 20 hours invested scouring help, and Developer zone with no luck in uncovering this little nugget! 

 

But it is still a mystery how to program plugin VI's and use the Elemental IO Wizard to the configure the resource registers.  For example, I am now using P4 as GPIO which was provided in the Elemental IO configuration for the the Generic 2378 Target.  What if I want to use P4 for external memory bus?  How does that work?  Or use high level function currently defiened as Digital Inputs?

 

0 Kudos
Message 3 of 10
(8,035 Views)

rales,

 

Are you trying to use plugin VIs in the evaluation board profile or the chip's profile?


If you want to interface external memory to DIO pins, you'll have to create your own driver.  If you do this in LabVIEW, you can build your driver on top of the elemental I/O accesses to hardware.  If you do this in C, you can access the C code with an Inline C Node.

Kevin S.

Applications Engineer

National Instruments

0 Kudos
Message 4 of 10
(8,028 Views)

Hi,

 

I downloaded the ARM kit (evaluation) from NI.com, ... and i own the keil MCB2300 board with the ARM LPC2378 => if i use the LV features and the MCB board, everything OK.

 

But now, i want to use the lpc2378 => in an other application => outside the MCB2300 board from keil.

 

The µC Ports are 32 bits ... 

 

And i want to use bit 8 to15 from PORT 0 => as Digital output, how can i do that ? 

 

I added an "other" device (see attachment arrow 1)

And if i drag the PO0 to my block diagram ( arrow 2) , the is no possibility to wire the elemental I/O node...

 

So if i'm reading this topic right, i have to insert a c - node (and write c code ....) , before i can use the other µC pins as I/O?

 

 

Thanks 

0 Kudos
Message 5 of 10
(7,613 Views)

Lone Rider,

 

You're going about your evaluation in the right way:

1) use the chip profile (for the LPC2378) instead of the board profile (for the MCB2300)

2) access digital pins through the elemental I/O

 

If you want to access pins 8 through 15 without touching 0 through 7, you won't want to use the Digital Bank elemental I/O (for either 8, 16, 32 bits).  The template in LabVIEW hasn't been built up enough to allow you to select which 8 bits within a 32-bit range.  I see a few options for you:

1) Use 8 separate elemental I/O (one for each pin 8 through 15).  (I'd recommend this at least initially if you're not too savvy with C code.)

2) Build up the current LabVIEW API such that you have the option to read to/write from any pins you choose.

3) Use C code.

 

The reason your PO0 Digital Input node is not usable in your VI is because that VI is located under your MCB2300 target.  (Look in the lower left of the VI's window....there's a project path showing to what target that VI belongs.)  Simply close the VI, drag that VI in the project and drop it under the LPC2378 target, and reopen the VI.  The elemental I/O node will now appear as mine.

 

Kevin S.

Applications Engineer

National Instruments

 

20971i9ABB7B65AEEAC49A

0 Kudos
Message 6 of 10
(7,566 Views)

(somehow, my profile got confused....here's my post again but under my correct user profile.)

 

Lone Rider,

 

You're going about your evaluation in the right way:

1) use the chip profile (for the LPC2378) instead of the board profile (for the MCB2300)

2) access digital pins through the elemental I/O

 

If you want to access pins 8 through 15 without touching 0 through 7, you won't want to use the Digital Bank elemental I/O (for either 8, 16, 32 bits).  The template in LabVIEW hasn't been built up enough to allow you to select which 8 bits within a 32-bit range.  I see a few options for you:

1) Use 8 separate elemental I/O (one for each pin 8 through 15).  (I'd recommend this at least initially if you're not too savvy with C code.)

2) Build up the current LabVIEW API such that you have the option to read to/write from any pins you choose.

3) Use C code.

 

The reason your PO0 Digital Input node is not usable in your VI is because that VI is located under your MCB2300 target.  (Look in the lower left of the VI's window....there's a project path showing to what target that VI belongs.)  Simply close the VI, drag that VI in the project and drop it under the LPC2378 target, and reopen the VI.  The elemental I/O node will now appear as mine.

 

Kevin S.

Applications Engineer

National Instruments

 

20973iA95767CDC38A3496

Message 7 of 10
(7,562 Views)

Hey Kevin,

 

Thanks the code works fine !

 

Maybe you can help me with an other question => about the LPC2387.

Is there a possibility to use the internal Real Time Clock without using the c - node ?

 

Thanks & greets 

 

 

0 Kudos
Message 8 of 10
(7,534 Views)

The Line Rider,

 

If you could, let's start another thread for that question (about internal Real Time Clock).

 

Kevin S.

Applications Engineer

National Instruments

0 Kudos
Message 9 of 10
(7,531 Views)
0 Kudos
Message 10 of 10
(7,500 Views)