Parallel Slave Port of PIC18F452

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

Reply to
dimithri
Loading thread data ...

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

Reply to
Michael Lange

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

Reply to
dimithri

Sure. Just write code to control the data pins and control pins the way you want.

--
Thad
Reply to
Thad Smith

Yes, that what it means.

Reply to
Donald

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?

Reply to
dimithri

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:

formatting link

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) 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

Reply to
Donald

thnak you for the help

Reply to
dimithri

thank you for the help

Reply to
dimithri

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.