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.

PC Interface

Status
Not open for further replies.

saiello

New Member
Hi,
I'd like to interface my PC's parallel port with an SPI controlled DAC ( TLC5628 ) and ADC ( TLC2543 ). I've heard that the PC's parallel port can be damaged if not used correctly. Can I interface these IC's directly to the parallel port or will I risk damage? If so, what circuitry will I need to adopt?

Thanks.
 
hi,
There is another thread running called 'Demultiplexer', its using the parallel port.

Also within the posts are some parallel port links.

**broken link removed**

Look at these and come back for more help if required.
 
Reply

What would damage your parallel port is you applying voltage levels past what it is rated for, like putting your data pins directly to your mains. We usually would like to isolate the parallel port from things like transformers, inductors etc and Opto Isolators come in handy here. Another point to note is you trying to source more current than the parallel port can supply: we usually use buffers to make the parallel port supply more currents or darlington pair of transistors.
 
Hi, Thanks for the responses ( and link! ). I've seen circuits where 74LS multiplexer and other types of IC are connected directly to the port but not DAC's/ADC's. As DAC/ADC IC's source/sink similar small currents at 5V max, logic dictates that connecting them directly would also be ok. I've seen posts and info on the 'net that seem to suggest that the parallel port is inherently sensitive and could be damaged if not treated with care so this put some doubt in my mind as to whether this was safe practice..! ;o) From your postings I take it that this would be ok?

Thanks again.
 
hi,

Use of the parallel port on a PC is very common.
There are many well used circuits available on the web for a wide range of port add on's.

Read the parallel port link and use that as a guide, main point to remember is that the port is TTL based.
Treat it as you would with any other TTL device and you should not damage it.

If you are using Win XP in your PC, you may require a 'inpout32.dll' in the Windows/System directory,
you can get this off the web.

If there are any points you are unsure about, ask.
 
Hi Again,
I also found this link very useful: **broken link removed**. I'm using XP for development and have written software to drive LED's using inpout32.dll. Ultimately the software will run under Win 98. There will be an issue over TTL-CMOS which will need to be addressed as the IC's I have in mind are CMOS.

Thanks!
 
Hello Again,
I need a tad more help! ;o) I've checked out the ADC/DAC ICs ( tlc2543/tlc5628 ) and although they are stated in the datasheets as CMOS devices ( no reference at all to TTL in the documentation or elsewhere on the internet for these IC's ) the inputs seem to cater for TTL levels, e.g. on the ADC tlc2543 the high-level control input voltages ( Vin ) are specified to be a minimum of 2V, which is a TTL high switching level. Does this mean that for IC's like this that catering for TTL is standard practice and as a result there is no need for mention of it? I'm really not sure. Anyway, the good news is that it looks like I can connect these IC's directly to the parallel port. :eek:)
The last piece of the puzzle I need to sort out is a common ground between the PC and my circuit. The ground on the parallel port is different to that on my circuit ( not by much though ). If I connect the two grounds together how would this work in practice? I've seen circuits where the assumption is that both grounds are the same and the two have been connected together but I'm cautious about doing this if they are different. If I do connect both grounds together and the parallel port outputs a 5V 'high' what voltage will be seen by the external circuit? Once this problem is sorted I can finally get my circuit together! ;o)

Thanks again.
 
hi,
>> The last piece of the puzzle I need to sort out is a common ground between the PC and my circuit. The ground on the parallel port is different to that on my circuit ( not by much though ). If I connect the two grounds together how would this work in practice? I've seen circuits where the assumption is that both grounds are the same and the two have been connected together but I'm cautious about doing this if they are different. If I do connect both grounds together and the parallel port outputs a 5V 'high' what voltage will be seen by the external circuit? Once this problem is sorted I can finally get my circuit together! ;o)

You should connect the ground 0V pin on the parallel port to the ground 0V pin on your project pcb.

I would suggest, as a get to know task, measure the voltage levels on the output pins of the port, without your pcb connected.
They will most likely not be at +5V or 0V, perhaps in the order of +3 to +4.5V and +0.5V, this is normal.

If you study the port documentation you will see some of the pins have the 'bar' symbol '/' which means the signal level you send
from the PC program will be of the opposite sense, +5V high when a 0V low command has sent.
 
Hi! I've just checked the high and low voltages on the port by setting pin D0 to 1 and 0 and they are 4.65V and 0.05V respectively, so this seems fine. I've also done a check on the port ground and the battery supply ground by connecting the two via a 10K resistor and measuring the voltage across it and... it reads 0V! This makes perfect sense as ground should mean ground whatever the device. When doing this test before, I think I simply had my wires crossed..! ;o) Ah well, you live and learn as they say!
As a bit of background, I am building my own design for a general purpose data aquisition unit for automotive use with sensors for tachometer, temperature, pressure, etc. The software is my own written in VB for display and data logging. The interface is the 'glue' between these two 'components', which now that these few niggles have been ironed out I can forge ahead with! ;o)

Thanks again for your help!
 
hi,
>> I've also done a check on the port ground and the battery supply ground by connecting the two via a 10K resistor and measuring the voltage across it and... it reads 0V!

You should remove the resistor 10K and connect the two grounds directly together, otherwise you will have problems with voltage levels.
 
Geez, until I read the dates on the original thread, I thought that Eric was back. Where is Eric?
 
hi,
This is a method I used with VisBasic5, works OK.

In the zip are all the VB5 files for the 4 and 8 channel A2D MCP3204/8
[They are rough and not fully commented]

The circuit diagram shows the parallel port pins and OPA's.

E.
 

Attachments

  • AAesp01.gif
    AAesp01.gif
    21.6 KB · Views: 149
  • AAesp03.gif
    AAesp03.gif
    17.6 KB · Views: 155
  • AAesp04.gif
    AAesp04.gif
    18.3 KB · Views: 153
  • SPIDemo1.zip
    125.4 KB · Views: 117
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top