Pic/Parallel Slave Port interface to PC

Pic/Parallel Slave Port interface to PC

Post by Mark O'Riell » Sun, 17 Mar 2002 03:28:01



I've been trying to set up a bi-directional parallel slave port on a
Microchip PIC16F877 which I want to interface to my PC's port.  There
seems like a complete lack of information available both on microchips
homepage and on the web about this..

The first step is obviously setting up the registers properly, etc.. but
I'm wondering how I actually wire up the hardware..

On the pic side I have 8 data lines, a read line, a write line, and a
chip select - an easy enough interface.. but it doesn't correspond to
the signals on any of the parallel port modes..

Is there a particular parallel port mode I am supposed to use (ie. ECP,
EPP, Byte mode?)

Is external logic necessary?  Or can I wire up the three control signals
directly to my pc's port?

 
 
 

Pic/Parallel Slave Port interface to PC

Post by Ned Kon » Sun, 17 Mar 2002 04:03:58



> I've been trying to set up a bi-directional parallel slave port on a
> Microchip PIC16F877 which I want to interface to my PC's port.  There
> seems like a complete lack of information available both on microchips
> homepage and on the web about this..

This wasn't the intention of the parallel slave port, as far as I can tell.
"Parallel" only means that you have multiple data bits, not that it works
with a PC parallel port.

The intention of the PSP, AFAICT, is to provide a simple byte-wide port
for other processors to communicate with; this way you could use a PIC as a
memory- or IO-mapped peripheral.

The non-enhanced parallel ports can't do 8 bit at a time IO, so you have to
use ECP or EPP.

I'd look into the definition of the various port modes, perhaps at
http://www.lvr.com/parport.htm

 
 
 

Pic/Parallel Slave Port interface to PC

Post by Robert Reimille » Sun, 17 Mar 2002 04:17:58


On Fri, 15 Mar 2002 13:28:01 -0500, Mark O'Rielly

>On the pic side I have 8 data lines, a read line, a write line, and a
>chip select - an easy enough interface.. but it doesn't correspond to
>the signals on any of the parallel port modes..

You have to be creative...

Quote:>Is there a particular parallel port mode I am supposed to use (ie. ECP,
>EPP, Byte mode?)

Using the connection that I use I setup the port as EPP.

Here's the basic connections I use:

Parallel Pin    PIC Pin      Function
 1 (Strobe)      ~CS (RE2)    Chip select to PIC
 2 (Data 0)      RD0          Data Bus 0
 3 (Data 1)      RD1          Data Bus 1
 4 (Data 2)      RD2          Data Bus 2
 5 (Data 3)      RD3          Data Bus 3
 6 (Data 4)      RD4          Data Bus 4
 7 (Data 5)      RD5          Data Bus 5
 8 (Data 6)      RD6          Data Bus 6
 9 (Data 7)      RD7          Data Bus 7
14 (AutoLF)      ~WR (RE1)    Write strobe to PIC
17 (Select)      ~RD (RE0)    Read strobe to PIC

For my application I transfer data to/from the PIC in variable length
messages using a 1Khz "tick" generated by the PIC. The pic sends the
1Khz signal to the ACK input on the printer port. In addition, two other
lines are used to coordinate communications.

Parallel Pin    PIC Pin      Function
16 (Reset)       RB0          1 from PC when writing message to PIC
10 (ACK)         RB1          Low going pulse to initiate interrupt
11 (Busy)        RB2          1 from PIC if still bytes to send to PC

Bob

 
 
 

1. PIC Parallel Slave Port to/from PC parallel port

Greetings All,

I would like to try to build a byte-wide bidirectional interface between a a pic
16f877 parallel slave port and a PC printer port capable of a couple hundred
Kbytes/sec.

Are there any dll's, add-ins or whatever that would allow me to communicate
bidirectionally with the parallel port in a way similar to a COM port in Visual
C++ or Visual Basic?

Are there any examples of this sort of interface you know of?

Thanks In Advance,
 Daniel Simon

2. Connection Speed

3. Interfacing PIC microcontroller to PC Parallel Port?

4. /bin/login vuln test code?

5. i2c Slave using PC-parallel port

6. Remote Domain Login

7. SPI interface with PC parallel or serial port

8. Java application performance on VxWorks

9. Devices with parallel slave port or alike

10. Experience w/PIC Slave Port?

11. Parallel Port interface Tape Backup: Request

12. WinNT Parallel Port Utilities for SPI interface and cleap logic analyzer?

13. Interfacing an LCD to a computer parallel port