PIC PSP port bus contention

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View

Hi

We're trying to interface a PIC micro to an 8052 micro using the
Parallel Slave Port on the PIC.  The 8052 can read bytes written to it
by the PIC ok, but when the 8052 writes to the PIC, the PIC tends to
read what it last wrote and not what the 8052 sent.  The voltage levels
on the data bus show contention with "half levels" when the PIC and 8052
are opposite states.

Is there something that has to be set differently in the PIC when it's
in "read mode" than when it's in write mode?

TIA

Re: PIC PSP port bus contention
Quoted text here. Click to load it

Which PIC are you using ??

Quoted text here. Click to load it
Please show your work. Schematic ??


Quoted text here. Click to load it
I too have interfaced the PSP to a 8051 buss without problems.

What does you PIC code look like ??

donald


Quoted text here. Click to load it

Re: PIC PSP port bus contention

Quoted text here. Click to load it


It turns out a bug in the PIC software was clobbering the IOPort setup.
It took a while to track down.  Now it's working fine.

Thanks for the reply.

Re: PIC PSP port bus contention
Hi darkknight,
How are you notifying the 8052 that the byte is ready / has been read?
It seemed to me that the external flag system to the bus was poorly
supported.
Regards
Rocky


Re: PIC PSP port bus contention

Quoted text here. Click to load it

We use a "manually" controlled signal that connects to the EXT 0
interrupt pin on the 8052 and the PIC software drives it high then low
to tell the 8052 that a byte is ready or has been read.  The data sent
between the two micros is multibyte messages and each message indicates
which micro will transmit next after the current message.  One single
lost (or possibly corrupted) character and the link dies - upon which
the 8052 reboots both micros.

darkknight

Re: PIC PSP port bus contention
Hi,

Quoted text here. Click to load it
<Snip>
Quoted text here. Click to load it

thanks for the feedback

Rocky


Re: PIC PSP port bus contention

Quoted text here. Click to load it

It would seem that you are driving the bus with both devices at the
same time. The problm arises beause you have 2 masters. You need to
devise some sort of syncronisation or protocall system to determine who
has control of the bus at any given time.


Site Timeline