LabVIEW Embedded

cancel
Showing results for 
Search instead for 
Did you mean: 

How do i control Blackfin PG general IO pins?

I have an application such that i need to be able to individually set general I/O pins PG8 through PG14 high or low.  Right now the pins are connected to LEDs, but in the future they will contol other devices.  How do i do this with LVEmbedded 8.2?
0 Kudos
Message 1 of 4
(6,866 Views)
The only way to do that is insert a C inline, write a routine in C to control the general ports! Sorry my english.... is not very well!
0 Kudos
Message 2 of 4
(6,852 Views)
I got some help from NI staff - it's a lot easier than i thought.  I just opened an inline c node and inserted the code below.

{
   
     adi_flag_Open(ADI_FLAG_PG9);
     adi_flag_SetDirection(ADI_FLAG_PG9, ADI_FLAG_DIRECTION_OUTPUT);
     adi_flag_Set(ADI_FLAG_PG9);
   
}


The blackfin system services manual lists all the flag control functions.
0 Kudos
Message 3 of 4
(6,849 Views)

Hello!

Thanks for adding the information above since there are quite a bit of people that ask this specific question.

Regards,
Jimmie Adolph
Systems Engineering Manager, National Instruments Northern European Region

0 Kudos
Message 4 of 4
(6,777 Views)