Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

PIC 2 PC: Parallel (Port) Read

Status
Not open for further replies.

Electrix

Member
How does one interface the PIC and a PC in parallel data fashion to transfer data to the PC.
I think that the Parallel Post cannot read parallel data but can do it serially, how does it do it and which pins are involved ??

If the parallel port is not suitable, how do i make my PC read parallel data from my PIC

btw I am using a PIC 16F74 in parallel slave mode...
 
A standard PC parallel port is uni-directional, and ALL PC parallel ports are compatible with this standard. However, there are a number of later parallel port standards, such as EPP or ECP - these are bi-directional, but require different programming than a standard port.

A standard port has five handshake lines which are inputs, and for maximum compatibility you should probably only use that method (which will work on any PC parallel port). If you remember the old DOS program LapLink?, that used the standard port to transfer data a nibble at a time (4 bits).

Anyway, why do you want to use the parallel port for transferring data, and not the serial port? - it's a lot easy to use the serial port, and it's generally much faster than required.
 
Well, ur right, the serial port is faster but it may not always be easier ! Sync Problems compelled me to think of using the Parallel Slave Port of the PIC 16F74. Any way, my aim is to receive data using C and form a user interface. Ur suggestions ??
 
Electrix said:
Well, ur right, the serial port is faster but it may not always be easier ! Sync Problems compelled me to think of using the Parallel Slave Port of the PIC 16F74. Any way, my aim is to receive data using C and form a user interface. Ur suggestions ??

There are no sync problems, it's really VERY easy to do serial comms with a PIC, and with the PC - there's also the added advantage that the PC end is simple, and you may even be able to use an existing PC program such as Hyperterminal.

Have a look at my PIC RS232 tutorials to see how easy it is!.
 
HyperTerminal

Hey Nigel, thanks for the tutorial, it was great !

Could u also give me some more info abt HyperTerminal and how I can use it in my project. ie:to receive info from my PIC to PC.
 
Re: HyperTerminal

Electrix said:
Hey Nigel, thanks for the tutorial, it was great !

Could u also give me some more info abt HyperTerminal and how I can use it in my project. ie:to receive info from my PIC to PC.

HyperTerminal is just a simple comms program, you need to set it to use "Direct to Com1" (or whichever com port you're using, and NOT your modem), and to the same standard as the PIC - in the case of my tutorials 9600 baud, and 8N1 (8 data bits, no parity, 1 stop bit).
 
hello,

i just wonder if serial ports is really much faster than parallel ports in terms of file transfer? because before i tried to use serial port and parallel port connection PC to PC using Direct Cable Connection (DCC). based from info i gathered from different sites
serial DCC cable: can use long wires, but slower transmission
parallel port DCC cable: uses shorter wires, but faster transmission
 
Electrix said:
How does one interface the PIC and a PC in parallel data fashion to transfer data to the PC.
I think that the Parallel Post cannot read parallel data but can do it serially, how does it do it and which pins are involved ??

If the parallel port is not suitable, how do i make my PC read parallel data from my PIC

btw I am using a PIC 16F74 in parallel slave mode...

Let's assume your computer only supports Standard Parallel Port mode.

Use 4 status lines as inputs, and read 2 of them at a time. Take the output of the PIC (assuming it is an 8-bit output) and connect it to a multiplexer. The output of the multiplexer goes to the 4 status lines.

When writing data, you must write the 1st 4 bits, then write the next 4 bits.

On the computer, make the calculations to form the correct byte.
 
GraveYard_Killer said:
hello,

i just wonder if serial ports is really much faster than parallel ports in terms of file transfer? because before i tried to use serial port and parallel port connection PC to PC using Direct Cable Connection (DCC). based from info i gathered from different sites
serial DCC cable: can use long wires, but slower transmission
parallel port DCC cable: uses shorter wires, but faster transmission

Parallel port is faster, but speed is rarely an issue, usually serial is already many times faster than required (particularly with a PIC, where you don't have large quantities of data to move).

But serial is so much easer to do, requires a simpler cable, and is usually likely to be all that's required.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top