Reply by daya...@yahoo.com February 11, 20082008-02-11
Hi there,

I want to use HPI0-HPI7 as the output pins/GPIO to blink the external LEDs. How to do this by using c programming ? I'm using dsk5416. What I know is I need to set the address for GPIOCR(003Ch) and the GPIOSR(003Dh). Then I need to set which pin that I want to use as input or output for GPIOCR. Then I need to set the output as GPIOSR. Thanks.

Here is my program...but not working. Can someone help me ?

----------------

#include
#define GPIOCR 0x003c;
#define GPIOSR 0x003d;

ioport unsigned port3C,GPIOCR;
ioport unsigned port3D,GPIOSR;

void delay(void)
{
long i, j=0;
for(i=0;i<1000;i++)
{
j++;
}

}
void main()
{
GPIOCR=0xf0;

while(1)
{
GPIOSR=0x00;
delay();
GPIOSR=0xf0;
delay();
}

}

-------------------------------

Regards,
Dayah
Check Out Industry's First Single-Chip, Multi-Format, Real-Time HD Video Transcoding Solution for Commercial & Consumer End Equipment: www.ti.com/dm6467