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.

Sending digital PCM into the PC via the parallel port.

Status
Not open for further replies.

discrete

New Member
Hello to all of you.

In a project which I'm doing for a company, I have been provided a ProSLIC 3210 evaluation board. Basically, the board takes in analog signals from a regular telephone and converts them to digital PCM signals.

We want to send the PCM signal into the PC. The problem is that the signals are sent in serial from the board; unfortunately, the board does not support the RS232 protocol. This leads to the idea of using the parallel port where we use a SIPO (serial-in-parallel-out) chip to send data into the computer. Here comes the questions:

1) Is it possible to program the parallel port in such a way that it receives and transmits 8-bits data on each way?


2) I plan to direct the incoming PCM data into the sound card to use its D/A converter so while speaking into the phone I can hear my voice out of the computer's loudspeakers. Is this redirection possible?

Lastly, are there any other forums that are similar to this one?

Thanks. :)
 
discrete said:
Hello to all of you.

In a project which I'm doing for a company, I have been provided a ProSLIC 3210 evaluation board. Basically, the board takes in analog signals from a regular telephone and converts them to digital PCM signals.

We want to send the PCM signal into the PC. The problem is that the signals are sent in serial from the board; unfortunately, the board does not support the RS232 protocol. This leads to the idea of using the parallel port where we use a SIPO (serial-in-parallel-out) chip to send data into the computer. Here comes the questions:

1) Is it possible to program the parallel port in such a way that it receives and transmits 8-bits data on each way?


2) I plan to direct the incoming PCM data into the sound card to use its D/A converter so while speaking into the phone I can hear my voice out of the computer's loudspeakers. Is this redirection possible?



Lastly, are there any other forums that are similar to this one?

Thanks. :)

1) Yes.
2) It should be possible. I worked on a project awhile back that answered the phone and routed the analog signal to the audio-in of a sound card. Then software would record this into *.wav format. Once in wav format, it could be played back on the same sound card via D/A into the loud speakers. This system wasnt real time though. It sounds like you would like to sort of stream the PCM data into the PC and out of the sound card.

I'm not sure of the PCM rates and whether or not a crudy old parallel port can handle it.
 
Hello Optikon, thank you for your reply. With a D/A converter it would be "rather easier" to convert the digital PCM to analog signals so they can be lead into audio-in.

Standard PC parallel port (SPP) should be able to transfer up to 115 Kbps; mu-law PCM requires AFAIK 64 Kbps bandwidth so the parallel port should be able to follow but doubtfully in full duplex mode.
 
discrete said:
Hello Optikon, thank you for your reply. With a D/A converter it would be "rather easier" to convert the digital PCM to analog signals so they can be lead into audio-in.

Standard PC parallel port (SPP) should be able to transfer up to 115 Kbps; mu-law PCM requires AFAIK 64 Kbps bandwidth so the parallel port should be able to follow but doubtfully in full duplex mode.

Right, might be easier. But what kind of quality are you looking for? Consider that as soon as you turn your PCM into analog, you now must deal with noise and filtering so it may prove to be tougher if you need the highest quality possible. Leaving signals as PCM all the way to the sound card for final conversion to the output speakers seems to me would have the highest fidelity.

It may not be a problem for you at all depending on how much you can tolerate but it's just a thought...
 
:lol:
Parallel port in SPP mode is not bidirectional, data port have 8 lines of data only in output, not in input. The input can be done via status port in 2 phases for every byte: read L nibble and after that H nibble.

For bidirectional mode you must setup your LPT port from BIOS to work in Bidirectional mode(if support) or in EPP mode. In EPP mode LPT work like a 8 bit bus, the transfers are handle by hardware not by software as in SPP or Bidirectional modes.
 
Hello Optikon,

Leaving signals as PCM all the way to the sound card for final conversion to the output speakers seems to me would have the highest fidelity.

This was exactly my thought too. The sound card has (or, should have) dedicated DSP so why not leave the issues to it? :)

Hello tavib,

For bidirectional mode you must setup your LPT port from BIOS to work in Bidirectional mode(if support) or in EPP mode. In EPP mode LPT work like a 8 bit bus, the transfers are handle by hardware not by software as in SPP or Bidirectional modes.

Thanks for your comment. I intend to use EPP or ECP mode too. A question: now you are saying the transfers are handled by hardware, not by software, does this mean that I don't control handshaking, termination and the like on the software level but on the hardware level instead? What I'm a bit worred about at the moment is, that after reading the ECP specifications from Microsoft, it seems that I have to design a board which is ECP / EPP compliant before I can actually transfer PCM signal from the SLIC evaluation board into the PC. Maybe serial to serial RS232 communication is easier then?
 
Discrete:
Carefully check out specs on EPP mode for parallel port. It only has 4 commands, and is quite simple to use a 74ls138 decoder to decipher them.
Using EPP mode, you do not have to build software to toggle the control leads to impliment the function, as the parallel port controller does all that for you. Your program only needs to read or write to the EPP port data buffers at base address +3 or base address +4. The only other thing to consider is if you have a multi-mode parallel port controller that can do ECP+EPP. Then you need to set the correct functional mode into the ECP extended control register at base address +h'402. go to beyondlogic.org and dump all their sections on parallel port modes, read them ALL, and you will have a good idea how to use parallel port for what you need.
Dialtone
 
:lol:
Yes, the EPP have a hardware protocol build in, you must design your board for this protocol.
If your board is already designed on a different protocol then you must adapt it if want to use EPP.

Dialtone point a good documentation at https://www.beyondlogic.org
Thanks Dialtone.
 
Thanks Tavib and Dialtone for your responses. I have read several webpages regarding the parallel port including beyondlogic.org, the latter being one of the best I've seen so far. But I just can't gather my mind right now. Exactly, how much electronics do I need to do to make the evaluation board be compatible with the EPP specifications? It would be so nice if there was a diagram / PCB which shows an EPP interface. I've been googled a bit but without luck. The closest I can get is this EPP adapter https://www.electro-tech-online.com/custompdfs/2004/03/EPP_eng.pdf but it is interfaced to a modem.
 
Here is a very simplified 3 chip hardware interface that will run at the max
speed of the printer port (assuming the chips you select are fast enough)
in EPP mode. On my computer this equates to roughly 200ns of pulse
duration for the data/strobe leads (will probably vary in length from PC to PC though)
This interface will NOT support the peripheral interrupt feature of EPP, but
would be easy to add additional hardware (and supporting software) to administer it.
For your particular application, I cannot tell exactly what else you would
need, but from the sound of things, seems you will need a serial to
parallel conversion register of some sort. You can then tie either Address
Read function or Data read function lead in the schematic to trigger the
register output to the parallel port bus. I would suggest that you either
use a tri-state type register or insert a bus buffer chip between the
parallel port bus and the register output pins.
Dialtone
 

Attachments

  • Simple_EPP_interface.jpg
    Simple_EPP_interface.jpg
    126.3 KB · Views: 933
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top