Light pens?

Tony Duell ard at p850ug1.demon.co.uk
Sat Mar 19 18:08:41 CST 2005


> Okay, now my age and lack of experience is going to show:  Can someone explain 
> to me exactly *how* a light pen works?  What is the feedback mechanism if 

A light pen is beaically a small light detector (normally a 
phototransistor) that detects the ligth from the screen. Since the image 
on the screen is scanned (either as a raster, or as vectors), you get a 
pulse from the light pne output as the part of the image that the light 
pen is aimed at is being refreshed. 

Typcially, on raster scan systems (like almsot all microcomputers), the 
CRT controller takes the light pen signal and uses it to latch the 
current video RAM address, or the X/Y coordinates, or something like 
that. The latched values can then be read out by the processor.

> drawing on, say, a completely black screen?  How does the computer get 

It can't. Period. Any comptuer/light pen that claims to is doing one of 2
things.  Either displaying, say, a 3*3 array of pixels under the light
pen, and the computer moves said pattern to keep the middle pixel under 
the light pen (this is how a lot of vector displays did it -- if the 
light pen posiition is 'lost' for any reason, it was typical to sweep a 
line across the screen, then down the screen, to find it again)

Or more likely, the 'black' screen isn't totally black, but a very dark 
grey or something. Dark enough that _you_ don't notice it, but the light 
pen does

-tony



More information about the cctalk mailing list