This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

EMIF using dsk6713 problem

Hi All

I am trying to use EMIF 'J4' on dsk6713. What I understood so far is that EMIF 'J4' on dsk has I/O pins ED0 - ED31. At a moment I am trying to use an external switch to control a LED to understand the basic working principle so that I can proceed with my project.I have attached the code. I am using the memory location 0xA0000000 to output the LED connected to ED0 pin 70 on J4. I have connected the switch to pin 40 ED0 on J4. The switch is connected to be pulled LOW when ON.  I am using memory location 0xA1111111 to read the contents.I used two simple routines to read and write to EMIF data bus. My question is do I need to change any other register values in order to switch between read & write the EMIF? and when I use any of the values from 0xA0000000 to 0xA1111111 to read and write separate or same, they are working OK i.e., they all have the same values what ever I write in any one of them?

Any help would be much appreciated.

Many Thanks

#define OUTPUT 0xA0000000
int *output = (int *)OUTPUT;
int *input;

int temp1, temp 2;

int temp3 = 0;

main( )

{

comm_poll( );                                                          // copied from chaissing book
DSK6713_LED_init();                                           // copied from chaissing book
DSK6713_DIP_init();                                            // copied from chaissing book

while (1)

{

*output = 0x00000000;                                               // LED connected to ED0 pin 70 on J4 turns OFF

input = (int*)0xA1111111;
temp3 = *input;

if (temp3 == 0)
{
for(temp1 = 0; temp1 <=10000; temp1++)        //two for loops for switch debouncing delay
{
for(temp2 = 0; temp2 <=1000; temp2++)
{
}
}
input = (int*)0xA1111111;
temp3 = *input;
if (temp3 == 16777216)                                                         // switch connected to ED24 pin 40 on J4 (Pin 24 High & all other Low)
{
*output = 0x00000001;                                                         // LED turns ON pin 70 J4 ED0
}
}

for(temp1 = 0; temp1 <=10000; temp1++)        //two for loops for delay for LED to stay ON
{
for(temp2 = 0; temp2 <=1000; temp2++)
{
}
}

}

}

  • Hi anybody to help on this issue please.....

  • Hi Naeem,

    One common problem is that you are required to pull J3.75 to ground. This pin acts as an "on/off" switch for the DSK headers. You can easily jumper J3.75 to J3.79, and then try this again to see if the behavior changes at all.

  • Hi

    Many thanks fo the feedback. Yes I have connected that pin 75 on J3 to GND. The querey is that I used the output function to send the value to the output and soon after that an input function to read the value from the port (as indicated in code) but during the input read function I changed manualy the status of one pin to high (3.75V). Now, the read function detects that change at the input as well as the other value I initially sent as the output..... Is it a normal behaviour? This is what I want to confirm from your experience!

    Regards