Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

PIC32 PMP Slave Port help required please.....

Status
Not open for further replies.

johnnysh

Newbie level 1
Newbie level 1
Joined
Aug 21, 2013
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Visit site
Activity points
29
PIC32 PMP Slave Port Addressing help required please.....

I have a PIC 32MX795F512L as my PMP master device and a PIC 32MX360F512L set up as my slave device.

the slave device has 3 modes of operation legacy, buffered and addressed,

In slave addressed mode, sadly there is only 4 address bytes to play with ? I would have liked many more, so that the master pic could have read and written to different address locations on the slave device.

My requirements are for the PIC master (PMP Port) to be able to read data ether (16/32bits wide) from slave or to send data (16bits/32bits wide) to slave PIC (PMP) at different addresses (for example 64 different address locations on the slave PMP).
and I would like to communicate between both pics as fast as I can, thus why I have chosen the PMP port

I have a Real ICE emulator and the two PIC 32 Starter Kits setup in my workshop and have a working master to slave setup via PMP

I am using Interrupts on the PMP slave device and at the moment In slave address mode, I am able to send 4 bytes of data on the master, and trigger an interrupt on my slave PIC and thus read the 4 bytes of data on the slave PMP PIC.

this works well and I am only interrupting on the 4th byte of PMP data in on the slave device. So at the moment I can send 4 bytes of Data from my Master Pic to my slave pic,

I now need to added a little more intelligence with addressing and not sure the best way to do this, as there seems nothing in the way of examples or help with master to slave PMP examples,

Should I make my master send the first 8bit data byte to the slave pic, bits 1-6 = address value to either READ or Write Slave, Bit 7 is either Read or a Write bit. Bit 8 Not used.
if Master is writing to Slave, Master will continue to send either 16/32 bit data value and slave will know data is on it's way.

If Master is Reading data from slave pic, Master will stop the TX to Slave, Slave will pre-pair the correct data from address value just sent by master
Master will now read from slave either 16/32 bit data value.

Not sure if this is the correct way to try to do what I want, it all sound very complex, and trying to get the interrupt code to deal with this could be a real pain and what happens if either pic get reset half way through a data read or write etc.

it's shame there are not a lot more address decoding locations between pic master and slave

any help will be very much appreciated. I hope I have made it clear what I am trying to achieve. should I consider some additional hardware for addressing on the slave/master device??

Thanks in advance for any advice

is it worth trying on the master pic to multiplex address & data in partially multiplexed mode, and on slave pic interrupt trying to decode address and data etc,
or use a 373 address latch & PMALL to give me 8 bits of address for the slave and use a further 8 pins on the slave for address latch value sent from master, not sure if this would work but in principle it should.
I would also use the PMALL signal to interrupt slave (external Int) to arrange correct data in or out, from address values.

just totally at a loss as to how to continue, I know what I want to do, just don't know best way
 
Last edited:

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top