[Cialug] Realtime X programming?

Morris Dovey mrdovey at iedu.com
Mon Sep 13 22:32:28 CDT 2010


On 9/13/2010 9:40 PM, L. V. Lammert wrote:
> On Mon, 13 Sep 2010, Morris Dovey wrote:
>
>> I've used X in a real time context - but output to a screen is generally
>> only one side of an output-input pairing, and the human side is
>> typically a /lot/ slower (and less reliable).
>>
>> Can I be nosy and ask what problem are you trying to solve?
>>
> We need to know the exact timing of elements on the screen, .. nothing as
> simple as waiting for a response - have to either know the time or provide
> it.

Yuk. I'd use either an oscilloscope or a USB logic analyzer on another 
computer in conjunction with a photo-detector circuit (think: light 
pen). Trigger on some signal that can be wiggled by your program 
immediately before the write request, and read out the delay before the 
photo detector registers the screen change. You shouldn't be off by even 
a usec.

Your photo-detector circuit shouldn't take more than a voltage source, a 
current-limiting resistor, a pull-up resistor, and a photo-darlington 
(probably < $2 from any decent electronics source). An 8-channel USB 
logic analyzer (if you don't have a scope) will set you back about $150.

I would guess that Matt Nuzum could help, and might already have 
everything needed...



More information about the Cialug mailing list