PARALLEL MASTER PORT communication problem

Status
Not open for further replies.

bikashh

Full Member level 5
Joined
Nov 28, 2009
Messages
264
Helped
3
Reputation
6
Reaction score
3
Trophy points
1,298
Location
india
Visit site
Activity points
3,132
Hello Friends,
I am doing a project around PIC32MX675F512L in which I need to communicate with external RAM(IDT71V016SA) connected parallel. I am using "PARALLEL MASTER PORT (PMP)" for communication.
But when reading into a buffer from external RAM, all the locations gets filled with the last value being written in the write process. I checked the hardware but everything seem OK.

My code is as below:

mPMPEnable();
mPMPOpen(CONTROL, MODE1, PORT, INTERRUPT);
PMADDR = 0;
for (i=0; i<10; i++)
{
PMPMasterWrite(i);
buffer1=PMPMasterRead();
PMADDR++;
}
// PMADDR = 0;
for (i=0; i<10; i++)
{
buffer1 = PMPMasterRead();
PMADDR++;
}


Thank you in advance
 

Thanks for the reply,

Actually the code is like this,

mPMPEnable();
mPMPOpen(CONTROL, MODE1, PORT, INTERRUPT);//interrupt is disabled

PMADDR = 0;
for (i=0; i<10; i++)
{
PMPMasterWrite(i);//I is the value I am writing to external RAM
PMADDR++; // incrementing RAM address
}

PMADDR = 0;
for (i=0; i<10; i++)
{
buffer1 = PMPMasterRead(); //reading from RAM 1st location and writing to buffer1
PMADDR++;
}


Tried different ways but failed.
Thanks
 

I am using C32 compiler.
 

Attachments

  • 61128G.pdf
    991.6 KB · Views: 72

mPMPOpen(PMP_ON | PMP_READ_WRITE_EN, PMP_MODE_MASTER_1 | PMP_AUTO_ADDR_INC, PMP_PEN_ALL, PMP_INT_OFF)

Post your full code and also the circuit showing interfacing of the external device to PMP port. What external device is interfaced?
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…