Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi friends.
I want to know what is the basic diff between output of par and serial port of a Pc. As i know that serial port understands only ascii data and not non ascii(level signal). pralallel ports give non ascii output ie Ttl level signal. please tell me im right or wrong. Can seral ports also understand non ascii data ??. these are my doubts.
Data is data: ASCII is a way to interpret data: it's all just numbers. Parallel and serial ports carry data. Serial ports carry it 1 bit at a time; parallel ports carry it 8 bits at a time. Despite this, parallel ports were never much faster, and just about every other communication protocol (e.g., USB, SATA) carries data serially.
Are you really using serial and parallel ports? I haven't seen a new computer with them in 10 years. They're so much slower and flakier than everything else.
Yes. Signal levels have nothing to do with the actual transmitted data. Original RS-232 is +/- 15 VDC ( actual voltage depends on hardware) and the parallel port is TTL 0-5 VDC. While the typical serial port setting uses 8 bits that means the actual data can be anything from 0x00 - 0xff.
How you interpret that data is up to you.
Kind of a confusing question. The common serial port on a PC is controlled by a UART chip. Each model of computer may have slightly different uart's. That uart chip design is the key to how it can be used rather than the way the signal is inputted or outputted.
In a very simple sense, a serial is a bit by bit per clock while parallel is a set of signals per clock.
Again the features of the pc design could dictate all sorts of variations on power and current and timing.
I still use parallel port. Although I recently got a usb to parallel port adapter, so I could throw out the tank of an old machine. Although I only got it to use my tank of an old printer. Which I assume pre-dates the days of vendor locked print cartridges that think they're empty at 20% left. With an RPi 3B+ as the print server, which is about the size of one of the print cartridges.
So can i write program on pc to output irig-b signal output. I have seen that people mostly use printer port or par port for output a Irig signal . can we use serial port for the same.?
Not really. IRIG-B unmodulated signal is typically a TTL signal which is why the parallel port is used. The serial port is a +/- signal level which probably will not work.
Distribution: Cinnamon Mint 20.1 (Laptop) and 20.2 (Desktop)
Posts: 1,671
Rep:
The parallel port on a PC was also known as the Centronics port, taking its name from the Centronics company which sold dot matrix line printers. The port supplies eight bits plus a strobe bit which is used to clock the separate eight bits into a register within the printer so it could be decoded into which wire in the seven bit printhead "fires" to mark the paper. A character matrix of 7 x 5 dots was common. Centronics folded in 1987.
Parallel data transfer requires that the data bits are clocked to de-skew the information. (transmission of multiple bits down a parallel cable can mean that due to propagation delays in the cable, the data pulses can arrive at their destination at slightly different times, the clock or strobe pulse samples the data on the bus and de-skews it.)
The faster the data transfer speed, the greater chance the data will be incorrectly de-skewed causing corruption.
I believe the parallel port was capable of 150Kbits/sec
As mentioned above parallel data transfer to and from peripherals is now mainly via serial links as greater speed can be achieved. eg. PATA drives have been superseded by SATA, fibre links are mono directional serial with an RX and TX fibre, ethernet, including WiFi is serial.
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,195
Rep:
There is an important difference in the parallel and the serial port from a hardware point of view. Although you could theoretically access a few serial signal lines like RTS and CTS, the actual RxD and TxD cannot be accessed. You send a byte to the serial port, it is serialized and sent. The serializing is performed in hardware. You can write a byte to the serial port, and further than that you cannot access. Some serial chips allow you to set the handshake lines programmatically, other do not.
The lines of the parallel port however can be accessed individually. Note however that in Linux only kernel drivers have access to the hardware. You'd need a driver which is able to access the parallel port. I am not sure if these drivers are available by default in a normal installation, or that you have to use something like the Comedi drivers. Normally the printer port is controlled through the LP device, which is not suitable in your case.
What hardware will you use? Current PC's do not have serial and parallel ports anymore. Unless you install an interface card. You might consider the Raspberry Pi which has digital I/O. There are driver API's available for various languages.
So can i write program on pc to output irig-b signal output. I have seen that people mostly use printer port or par port for output a Irig signal . can we use serial port for the same.?
I assume the OP wanted to create a Time Code Generator but never really posted exactly what they really need i.e. modulated or unmodulated signal or why then needed IRIG-B. With any serious project I would purchase a GPS TCG.
I found a program many years ago that was written for BSD that used the audio output to generate an IRIG-B modulated signal but didn't take to time to debug it and get it to compile with linux.
Don't thank me yet. I've been wrong a few times...
IRIG-B is basically a series of pulses of varying widths that define reference points, binary 0 and binary 1. As stated earlier unmodulated code is a TTL signal which requires only one signal pin. NTP does have an audio driver to decode an IRIG-B signal but using GPS is more accurate.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.