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 | Re: 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

Re: Please help me-How to use HPI0-HPI7 as output/GPIO to blink LED ? - Jeff Brower - Feb 15 15:57:50 2008



Dayah-

> 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.
> 
> Here is my program...but not working. Can someone help me ?

If this is with DSK 5416 board, then you may need to disable HPI (clear HPIENA pin at
boot-time).  If you use GPIO on HD0-HD7 then multiplexed HPI (HPI8 mode) will be
disabled -- on the DSK 5416 HPI8 is one of the expansion connectors.  Is that where
you are monitoring the pins?

-Jeff

> #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();
>  }
> }
>
Check Out Industry's First Single-Chip, Multi-Format, Real-Time HD Video Transcoding Solution
for Commercial & Consumer End Equipment: www.ti.com/dm6467



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