EmbeddedRelated.com
Forums

Parallel Slave Port of PIC18F452

Started by dimi...@gmail.com March 15, 2006
Hello people,

I'm wondering if anyone has used the PSP device of the PIC18F452. I
want to connect the PIC's PSP device as the master where is initiates
reads and writes (in the data sheet reads are defined as reads from
PORTD and Write is write into PORTD).

As I understand when the PSP device on the PIC18f452 is enabled the
PORTE become inputs. So can I change their state from software?

Also if anybody has any design examples on using the PSP device and
don't mind sharing it with me I would be utterly grateful

Thank you,

Dimithri

Hi Dimithri,

in short: I know something about PIC, however not 18F452 in special. But 
  the description means, that the PIC can act by Port D as a Slave of a 
parallel communication, not that you can connect a slave on it.

HTH
Michael
Hello Michael,

Thanks for the reply and I guess the 18f452's PSP and of the PIC family
PSP work the same way. However, does this mean I can't use it as a
master (or connect a slave to it)? I need to connect it to a device
which also has 8bit data pins which are controlled by RD, WR and CS
pins. Affectively what I am asking is it possible to connect two PSP
devices together where one acts the master.

Thank you & regards,
Dimithri

dimithri@gmail.com wrote:

> Thanks for the reply and I guess the 18f452's PSP and of the PIC family > PSP work the same way. However, does this mean I can't use it as a > master (or connect a slave to it)? I need to connect it to a device > which also has 8bit data pins which are controlled by RD, WR and CS > pins. Affectively what I am asking is it possible to connect two PSP > devices together where one acts the master.
Sure. Just write code to control the data pins and control pins the way you want. -- Thad
dimithri@gmail.com wrote:
> Hello Michael, > > Thanks for the reply and I guess the 18f452's PSP and of the PIC family > PSP work the same way. However, does this mean I can't use it as a > master (or connect a slave to it)? I need to connect it to a device > which also has 8bit data pins which are controlled by RD, WR and CS > pins. Affectively what I am asking is it possible to connect two PSP > devices together where one acts the master. > > Thank you & regards, > Dimithri >
>> does this mean I can't use it as a master Yes, that what it means.
Ok now I'm a bit confused... If I can write code to externally control
the RD, WR and CS pins why can't I use it as a master?

dimithri@gmail.com wrote:
> Ok now I'm a bit confused... If I can write code to externally control > the RD, WR and CS pins why can't I use it as a master? >
This is one of those posts that is obvious to those who have read the PIC manual and have actually programmed the part. So I could be very nasty and say RTFM. But, the answer is on page 100 of this manual: http://ww1.microchip.com/downloads/en/DeviceDoc/39564b.pdf RD, WR and CS are _inputs_ only when in "slave port" mode. "PORTD operates as an 8-bit wide Parallel Slave Port, or microprocessor port when control bit, PSPMODE (TRISE<4>) is set. It is asynchronously readable and writable by the external world through RD control input pin, RE0/RD and WR control input pin, RE1/WR." However, If you set PE0, PE1 and PE2 as outputs and PD as output, then you can software control the 8-bit port any way you want. So your confusion is based on NOT reading the manual or english is not your native language. Posts like these are where some have a disgust with anyone who posts from gmail accounts. Those who post from gmail do not seem to be able read manuals or take simple advice. Good Luck donald
thnak you for the help

thank you for the help