05-12-2010 12:51 AM
Hi every body here!
problem description: using the PC's parallel port to generate a squre waveform with a 10M HZ frequency.
possibility: I have read the IEEE1284 and known that when the port is set to ECP mode, it's output rate can reach 2.4MB/s, or 2.4*8=19.2Mb/s,so I supposed that the parallel port can generate a squre waveform at 9.8M HZ.
But when I write a program to test it, I found the output signal is at a much lower frequency,only 100k HZ which was far beyond my expection.
brief decription of my program:generate the squre signal data(by inverting a boolean repeatedly), flattern it to string and put the flatterned string to the visa's write buffer. In doing so I supposed that the parallel port control circuit can output the data as fast as it could. But it failed!Does there anything wrong? Thank you for pointing out someting gets wrong or giving some comments, thank you!
Solved! Go to Solution.
05-12-2010 03:39 AM
Hi,
"I have read the IEEE1284 and known that when the port is set to ECP mode, it's output rate can reach 2.4MB/s, or 2.4*8=19.2Mb/s"
Well, you know it why it's called "parallel port"? It is called that way because the 8 bit lines are parallel...
When your information is valid, then you may be able to get max 2.4Mbits per line from your port. That's just a theoretical maximum. As the port is not intended to drive exact signals I doubt you will get a square waveform at that frequency...
05-12-2010 04:35 AM
GerdW wrote:Hi,
"I have read the IEEE1284 and known that when the port is set to ECP mode, it's output rate can reach 2.4MB/s, or 2.4*8=19.2Mb/s"
Well, you know it why it's called "parallel port"? It is called that way because the 8 bit lines are parallel...
When your information is valid, then you may be able to get max 2.4Mbits per line from your port. That's just a theoretical maximum. As the port is not intended to drive exact signals I doubt you will get a square waveform at that frequency...
-_-! I am so sorry for making this so stupid problem.But there still left the question:from the 1284 standard, I can get a 2.4Mbit/s output, but there's only 50k. At first glance, I thought the unexpected low frequency was due to VISA because I had heared some complaints about the inefficiency of VISA, so I had an other version of my program using the raw in port.vi and out port.vi shipped with labview7.1, and the period of the outputed squre waveform was reduced from 20us to 18us.
05-12-2010 04:41 AM
Hi,
having a signal length of 18µs on a port designed to drive printers is quite good.
What else would you expect?
Does your computer really support data rates up to a standardization maximum or does it only support a "common sense" part of that specification? Even when the standard allows for high speed operation modes it doesn't need to be incorporated in the actual hardware...
It's like expecting 1MBit/s from an old serial port designed for 115kbit/s because some specification is allowing such mode...
05-12-2010 04:49 AM
飞雨天 wrote:Hi every body here!
problem description: using the PC's parallel port to generate a squre waveform with a 10M HZ frequency.
possibility: I have read the IEEE1284 and known that when the port is set to ECP mode, it's output rate can reach 2.4MB/s, or 2.4*8=19.2Mb/s,so I supposed that the parallel port can generate a squre waveform at 9.8M HZ.
But when I write a program to test it, I found the output signal is at a much lower frequency,only 100k HZ which was far beyond my expection.
brief decription of my program:generate the squre signal data(by inverting a boolean repeatedly), flattern it to string and put the flatterned string to the visa's write buffer. In doing so I supposed that the parallel port control circuit can output the data as fast as it could. But it failed!Does there anything wrong? Thank you for pointing out someting gets wrong or giving some comments, thank you!
Perhaps with a proper low level driver you could perhaps achieve 2.4MB/s rate. But I doubt it. Then using a high level language such as Labview you will certainly not get this high speed. And neither Labview for Windows, or Windows is designed for realtime applications so your timing will not be very accurate and highly dependent on both hardware and software running on the machine. I think your 100KHz frequency is not bad at all. You have a update rate equal to 200KHz. As you need two updates to toggle the pin status. one update to turn on and one to turn it off.
05-12-2010 06:44 AM
How about a simple 10MHz oscillator and use one dig out for an enable?
Or hock up a DDS to the printerport 🙂
05-12-2010 08:04 PM
Henrik Volkers wrote:How about a simple 10MHz oscillator and use one dig out for an enable?
Or hock up a DDS to the printerport 🙂
Thank you for your advice, but for some economical reason, I was told that the single parallel port can generate the required signal, and there already had a success solution by other people from other company. But after in-depth studying what indeed a parallel port is and how the 8255 chip works, I had enough reason to doubt the exactness of what I was told. After all, the device attached to the parallel port would work under a low frequency input such as 1k only sacrificing the speed and the 20M HZ is the highest frequency the perpheral device can accept.
I had got some detail material dealing with parallel port, and decided to write a assembly program to see my parallel port's highest output frequency. If I would have got a higher frequency, I will post the result here. Now let's label this post as solved because 50k is a acceptable signal.
05-12-2010 08:19 PM
GerdW wrote:Hi,
having a signal length of 18µs on a port designed to drive printers is quite good.
What else would you expect?
Does your computer really support data rates up to a standardization maximum or does it only support a "common sense" part of that specification? Even when the standard allows for high speed operation modes it doesn't need to be incorporated in the actual hardware...
It's like expecting 1MBit/s from an old serial port designed for 115kbit/s because some specification is allowing such mode...
Because I had found the ECP mode in my computer's BIOS setting, I thought the parallel port would support this mode. Then I assumed every parallel port, as long as it works under the ECP mode, it would comply with the IEEE 1284 that support up to 2.4MB/s output. But it seems as if I was wrong, for real hardware implementation does not need to support all the characters the standard defines. Thank you for such a impressive comments.