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 | External Port Problems

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

External Port Problems - Deena Naidoo - Nov 7 7:38:00 2002



Hi all !

I can write to the external port, but when I read from the same port
address, my return value, is the last value I wrote to it.

My ADC is connected to port8000, so if I write eg. 50h to the
configuration register in the ADC, then when I read from port8000 I
get 50h. :-( , I should be getting data!

this is my code:

volatile int x,y;
volatile ioport int port8000;
volatile ioport int port2; void main()

{ port2 = 0x80; /* enables external port */
port8000 = 0x0CAA; /* writes 0xCAA to external port */
delay(1000); /* Calls A delay routine */
y = port8000; /* reads from port8000 */

port2 = 0x00; /* disables external port */

/* prints data onto the screen using LOG */
delay(1000); /* delay*/
LOG_printf(&trace, "%x", y);

}
I would be gratefull for any kind of assistance!
I'm using CCS version 2. I'm writing my code in C.

THANKX!
> My other E-Mail address is:





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

Re: External Port Problems - Graham Trott - Nov 8 14:21:00 2002

I don't think this is a software problem. You don't say which hardware
you're using but on the '5402 the data written to off-board memory is held
on the data latches and reads back in again if nothing has replaced it.
Sounds like your ADC isn't putting anything on the bus.

-- GT

----- Original Message -----
From: "Deena Naidoo" <>
To: <>
Sent: Thursday, November 07, 2002 7:38 AM
Subject: [c54x] External Port Problems Hi all !

I can write to the external port, but when I read from the same port
address, my return value, is the last value I wrote to it.

My ADC is connected to port8000, so if I write eg. 50h to the
configuration register in the ADC, then when I read from port8000 I
get 50h. :-( , I should be getting data!





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