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).
|
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: |
|
|
|
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! |