Sign in

username:

password:



Not a member?

Search c54x



Search tips

Subscribe to c54x



c54x by Keywords

5409 | 5416 | AD5 | ADC | BIOS | Boot | Booting | Bootloader | C540 | C5402 | C5409 | C5416 | CCS | Codec | DMA | Dmad | DSK | DSKPlus | Dsplib | EVM | FFT | FIR | Flash | GPIO | HPI | Initialization | Interrupt | JTAG | LOG_printf | MCBSP | RFFT | RTDX | Sampling | STLM | UART | VC540

Ads

Discussion Groups

Discussion Groups | TMS320C54x | Please help me-How to use HPI0-HPI7 as output/GPIO to blink LED ?

Technical discussions about the TI C54x DSPs (including the c5401, c5402, c5402a, c5404, c5407, c5409, c5409a, c5410, c5410a, c5416, c5420, c5421, c5441, c549, c5470 and c5471).

  

Post a new Thread

Please help me-How to use HPI0-HPI7 as output/GPIO to blink LED ? - daya...@yahoo.com - Feb 11 19:59:09 2008



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<dsk5416.h>
#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

______________________________
New Year Gift for Members of DSPRelated.com.  Details here.


(You need to be a member of c54x -- send a blank email to c54x-subscribe@yahoogroups.com )