05-13-2009 02:37 PM
I saw the screen shots of your example, but they don't address the issue I am having. I am experiencing the exact same issue as Liberty. I have a SPI device in which I must set the SSEL as a GPIO (P0.16) and then toggle that GPIO low while I send my SPI message. I have changed the ARM_SPI.c file to accomodate the change.
new - PINSEL1 |= 0x0000003C
Old - PINSEL1 |= 0x0000003F
How can I toggle the GPIO P0.16 in LabVIEW? I am using LabVIEW 8.6.
05-14-2009 04:46 PM
This is an old thread and instead of looking through all the old posts why don't you tell us what hardware are using, what you're trying to do, and what problems you are running into. I see that you are wanting to send a bit to the GPIO P0.16 to make it high/low but what hardware is this on? Thanks!!
05-15-2009 07:05 AM
I am using the Keil MCB2300 Evaluation Kit. The specific processor on the evaluation kit is the LPC2387. I am trying to communicate to an LTC1856 ADC. I have the MOSI, MISO, SCK, and SSEL lines (pins 86, 87, 89, and 90) from the Evalation Kit connected to my device. The chip select needs to go low when the SPI communication takes place. Normally it stays high. So I changed the ARM_SPI.c file located in C:\Program Files\National Instruments\LabVIEW 8.6\Targets\Keil\Embedded\RealView\MCB2300\Templat
05-15-2009 10:31 AM
You have two options.
You could change to the LPC2378 target and use an EIO node. You would need the PO16 node found under digital input. Once you drop this node you can change it to be digital ouput.
Another option - if you don't want to change your target or deal with EIO, is to directly use the code that the EIO relies on. However, things may go wrong as EIO handles a bit of extra things (such as possible hardware conflicts). You can find a VI (C:\Program Files\National Instruments\LabVIEW 8.6\vi.lib\Embedded\ARM\MCB2300\MCB2300_DigitalOut
05-15-2009 11:50 AM
How do you could change to the LPC2378 target and use an EIO node? If I open my ARM palette I have 2 EIO options. Property Node and EIO node. I can configure the EIO node as a digital output, but the only options are for the LEDs on the development kit. The only digital input option is for the INT0 button on the development kit. How would I get access toPO16?
05-15-2009 03:19 PM
You must create another target in your project (New > Targets and Devices...) and copy your VIs over to the new target (do not copy EIO, etc). You can create the LPC2378 by first adding the "Other" target. Once you add this target you can right click on the "Other" target and specify it as the LPC2378.
The LPC2378 targets the processor, rather than the board. So you won't see peripherals that are only present on the board (e.g. LEDs), but you can use more GPIO.
05-15-2009 03:55 PM
I created a new project with the target being the LPC2378. However when I put down an EIO node, I have nothing to select. See attached screen shot. I also haven't activated LabVIEW yet. Could this be an issue?
05-15-2009 04:34 PM - edited 05-15-2009 04:44 PM
Oh... I forgot you must select the elemental I/O as well. Right click the target again and choose "Select Elemental I/O..." and select the EIO for the MCB2300G.
If this still doesn't work try re-creating the target again.
And a found a guide on this. http://digital.ni.com/public.nsf/allkb/85DDB6218E7
05-18-2009 08:45 AM
I was able to add the correct EIO to my project. I created a small
app to constantly toggle the line. However the SSEL/P016 line stays
high at 3.3V. I had tried modifying the ARM_SPI.c file (located in
C:\Program Files\National Instruments\LabVIEW
05-18-2009 03:54 PM
Well, that's a bug..
The EIO is modifying the fast GPIO registers, but the chip is configured to use the slow/legacy GPIO registers for port 0 and port 1. To fix this problem:
Open the template project in microvision IDE (located at C:\Program
2. Open the LPC2300.s file and modify the following line:
SCS_Val EQU 0x00000021
3. Save and close out of microvision.
4. Delete the generated code for your LabVIEW project and do another build (This will force LabVIEW to copy the template project again).
Now you should be able to toggle lines on Port 0/1 fine. However, I did some testing and it appears that one canot toggle the lines at P0.15-18 (hardware/jumper issues perhaps), but all the others seem to work fine. So I would suggest using another pin as your SSEL.