Help answer threads with 0 replies.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 11-20-2007, 06:46 PM   #1
Registered: Aug 2005
Posts: 298

Rep: Reputation: 30
parallelport to breadboard

What are some way's I can connect a parallelport to a breadboard?

Currently I have wires sticking into parallelport which come out easily, and slight motion creates noticable noise. This is really frustrating. I got paralleport adapters to a breadboard but it doesn't fit into my breadboard.

For the parallel port Iam only using 7pins on it.
Old 11-20-2007, 07:04 PM   #2
LQ 5k Club
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,396
Blog Entries: 2

Rep: Reputation: 905Reputation: 905Reputation: 905Reputation: 905Reputation: 905Reputation: 905Reputation: 905Reputation: 905
Get a cable with a 25-pin male D-sub connector, a few feet long, and plug it into your PC's parallel interface. Leave the other end with bare wire pigtails. Mechanically fasten both the breadboard and pigtail cable end to a larger wooden board. Use something like a cable clamp screwed to the board, or a large staple (used in building wiring for stapling to wooden framing). You may need to strip and tin the bare wire ends if you use stranded conductor cable.

--- rod.
Old 11-20-2007, 07:48 PM   #3
Registered: Jul 2007
Location: United Kingdom, W Mids
Distribution: SUSE 11.0 as of Nov 2008
Posts: 195

Rep: Reputation: 40
Hi, I take it that this is an extension of your previous breadboard question. thread. If you need any further help can you let us know which 7 pins you are connecting, or is it just the physical security as addressed by theNombr?

I can understand how the wires coming adrift might have been a right pain - I have the t-shirt too and can definitely recommend a secured cable rather than one with a life of it's own. It seems that theNombre takes nailing things down almost literally If the staple seems like it might destroy the breadboard, hammer it in before you stick the breadboard to the wooden board. If you have neither a suitable screw clamp or are short of a fence staple or the hammer to whack it in with, then a copious amount of gaffer tape or a hot-melt glue gun might just about do the job.

On the basis that the cable may have conductors that aren't quite all as different as you might like, checking them out with a continuity tester or multi-meter and labeling them may also save you from a little further frustration as you progress. Good luck, do let us know how it's all going
and what pins you connected up - for the next guy to come along with a similar problem. You realise of course that now you have done it, there will be others wanting to connect up all sorts of gadgets in your footsteps. Human nature is like that.

Here is the paralell port spec again for your convenience. Parallel spec.

Last edited by PAix; 11-20-2007 at 07:52 PM.
Old 11-20-2007, 08:46 PM   #4
Registered: Aug 2005
Posts: 298

Original Poster
Rep: Reputation: 30
Yeah this is an extension of the previous question. The project is to make a CPU on an FPGA(a programmable chip). One problem is uploading data to a ram chip so the fpga can do something with the data. So far 2 8bit bytes were successfully uploaded. Some jitter with the setup I have really screws up the connection.

On parallel port, Iam using pins 2,3,4 (data0/1/2) (output) 10, 11, 12 (input) and some ground pin. as labeled here

The project is nearing completion soon. Me and my partner are thinking to make it open source. I wonder if anyone will really care about a processor for an FPGA (aside from school)?

Last edited by Four; 11-20-2007 at 08:47 PM.
Old 11-21-2007, 09:47 AM   #5
Registered: Jul 2007
Location: United Kingdom, W Mids
Distribution: SUSE 11.0 as of Nov 2008
Posts: 195

Rep: Reputation: 40
Hi again, I can't claim to fully understand what you are doing or how, but I have a general interest in the area of interfacing, have a little experience and a lot of reading on the subject.
Last question first. There is a lot of interest in FPGAs these days. In amateur radio circles software defined radio has taken off significantly in the last 24 months. A few very clever people have got together and produced the softrock 4, 5 and 6 series or receiver boards at truly pocket mondy prices which has enabled the amateur population to buy in and sample the technology and become very excited about it. The boards used a PC soundcard to decode the mode and tuning. Progressively this is moving to fast fpgas and within a couple of years the concept of an stand-alone economic sdr transceiver not tying up a PC will become the norm. Not every amateur will be out there trying to program fpgas, but we're an inquisitive bunch and more than a few will eventually dabble. So if your project offers a way of getting at the hardware for less, then it's likely to be of significant interest way beyond school.

I'm not surprised that you read the connector the wrong way around, it seems inevitable and happens to more people dabbling with these things than you might at first imagine.

So, when you set up your data, how does the fgpa board know that the data is valid and stable?
This is normally where the sending device would check the board wasn't busy and then set the data and after a moment for the data to settle would strobe cause the data on the pins to be read by the board.
I see that your use of the port appears to be bespoke.

What Altera board are you using please? I was following up a query I had looking for 82550/16550 UART data and came across this site which might be of more than passing interest to you. Almost certainly a similar sort of interfacing has been implemented before and could save you reinventing a wheel or two. I'll see what I can find that might be of interest.


Even more appropriate (parallel port control in Linux)

Last edited by PAix; 11-21-2007 at 11:16 AM.
Old 11-28-2007, 08:57 PM   #6
Registered: Aug 2005
Posts: 298

Original Poster
Rep: Reputation: 30
Scope: Using Altera DE2 board in verilog code using Quartus(Provided by Altera) compiler. To create an Processor on an FPGA. The problem in this thread is loading some data for the processor to process. solution was to use Parallel port.

So, when you set up your data, how does the fgpa board know that the data is valid and stable?
I do something primitive that is enough for our project. I have a line that sends a bit and a line that receives the same interpreted bit back. If the bit sent appears to be the bit received than the bit is assumed to be a valid bit. After 8 uninterrupted bits have been sent a byte is recorded and processed by the fpga board. Host controls clock for sending and receiving bits because the board is just a circuit and not code continuously checking.

To check for a busy board what is done there is an initialization sequence which "restarts" data sending communication (simplest terms its just a counter) (there is also a command to restart receiving). Every time the host wants to know if the board is busy a simple command is sent to check the state of the board (a reply of 0 means idle & accepting commands in our case). The command is "higher level" consisting of 4-bits.

there are 3 lines going out of host (output) and 3 lines going in (input). From the host perspective here are the lines
1. Data bit / clock for receiving data
2. Clock
3. Latch

1. data bit
2. Feed back
3. Not used any more

All this communication is done is for initialize the RAM so the processor has some meaningfully data to process. Which the goal of the project was to create a processor.

News: Thanks for parallel port help. Project successfully finished. And it worked. The Processor could do really basic thing like add numbers and do a loop successfully.

Me and my partner would like to make it open source and have started a project on If it ventures into standard PC's it would be kinda cool "I'm downloading an algorithm for my CPU ". And processors could be easily specialized for different things easily.

Last edited by Four; 11-28-2007 at 09:00 PM.
Old 11-28-2007, 09:12 PM   #7
Registered: Jul 2004
Distribution: Fedora
Posts: 241

Rep: Reputation: 31
I made my own parallel port to breadboard adapter back when I was working with it.

I simply took one of those cheap proto boards and stuck 22AWG solid wire up through consecutive holes and soldered them as "pins" leaving a bit hanging up through the top side. Then I used one of the solder-type of parallel connectors which can be wedged onto the proto board where the lower row of solder lugs are on the bottom of the proto board and the top row on the top of the proto board. You can hot-glue that in place and then solder the pins together. Worked great for me--in fact, it's been working for about 6 years.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
parallelport IO Four Programming 6 11-21-2007 01:06 AM
Parallelport communicate using asm LongName Programming 4 08-29-2004 11:22 PM

All times are GMT -5. The time now is 11:08 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration