From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

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,862 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,848 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,845 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,773 Views)