dcsimg
Linux Today: Linux News On Internet Time.




More on LinuxToday


Rildo Pragana: Running a GDI printer under Linux - part 4 - real time techniques

Aug 20, 2000, 14:04 (0 Talkback[s])
(Other stories by Rildo Pragana)

WEBINAR:
On-Demand

Re-Imagining Linux Platforms to Meet the Needs of Cloud Service Providers


[ Thanks to Rildo Pragana for this link. ]

"While Bochs is a good tool when the speed is not a limiting factor, there are times where we need to see the printer events at full speed. This is somewhat more complex and we will need to compile a special kernel to host our capturing tool."

"There is a kernel extension known as RT-Linux valuable for this kind of signal processing, allowing us to use a second computer as a logic analyzer of low cost. RT-Linux let we have full control of our machine, running the regular Linux kernel as a lower priority task or thread than its specially designed threads. Suppose that this second machine, or spy machine, will be connected to a modified "T" printer cable and can capture all signal modification occured during some time interval. We can also set some triggering condition for starting the capture or filter what is important to be stored. It can be seen that this logic analyzer is even better than many commercial instruments available. And if we run the printer from a slower computer than our spy, we can get every detail on the parallel port signals."

"You will need to open the DB-25 connector of a standard PC-to-printer cable and solder several wires, with care for not disturbing the present connections. Then at the other side of these wires, you put another DB-25 connector, that will be attached to a printed circuit or perforated or even other solderless board with some TTL data buffers as a kind of data selector. This is needed because our parallel port only have 5 input signals (we could save one part, but we choose to stay with just 4 signals for simplicity) and we will select which signals to spy by lowering the level of only one such buffers at a time. In the circuit given, for example, the SEL_HIGH_DATA selection corresponds to the value 11111110 (binary) being output through the spy's data port. BASEPORT is the base address of the spy's parallel port, usually 0x378 (but could be 0x3bc, check your /proc/ioport for your parport0 device)."

Complete Story

Related Stories: