Light pens?

Kapteyn, Rob kapteynr at cboe.com
Mon Mar 21 14:05:52 CST 2005


I have a "home made" light pen on my Altair.

There was an article in one of the early BYTE magazines on how to do it.
It is just a phototransistor stuck into a fat ballpoint pen body on a long wire.
The circuitry is very simple -- you adjust a threshold at which the transistor triggers an processor interrupt.
When you get the interrupt, you software reads the scan position of the monitor from a register in the video card.
The Cromemco VDM-1 allows this.

We had a very simple drawing program that read the pen position and toggled the background color of characters underneath.

-Rob


-----Original Message-----
From: cctalk-bounces at classiccmp.org
[mailto:cctalk-bounces at classiccmp.org]On Behalf Of Tony Duell
Sent: Saturday, March 19, 2005 6:09 PM
To: cctalk at classiccmp.org
Subject: Re: Light pens?


> 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