Download Print this page

Atari CX70 Operator's Manual page 53

Light pen

Advertisement

ATARI Light Pen Operator's Manual
APPENDIX B - ATARI LIGHT PEN CHARACTERISTICS
The ATARI Light Pen has several traits that must be noted by advanced
programmers in order to use it effectively.
The computer continuously reads pen values regardless of whether or
not the tip switch is pressed. This switch is left for the programmer
to interpret.
When the pen is plugged into controller jack h
the switch may be
checked by doing a PEEK of location 632 (decimal). For the other
controller jacksi the locations are as follows:
Jack 2
PEEK (633)
Jack 3
PEEK (634)
Jack 4
PEEK (635).
If there is insufficient light on the pen< the position registers
(54284--5) remain unchanged. This creates a condition that must be
checked by the programmer. For example^ a user might make a menu
selection with the pen and when that function is finished<
the menu is
displayed again. If the user now accidentally presses the tip switch
while the pen is not aimed at the monitor>
the same X«
Y coordinate
will be read and the previously performed function will be repeated.
Room light does not effect a change in pen values.
Pen sensitivities vary quite a bit. To determine the sensitivity of
your particular ATARI Light Pen/ enter the demo program listed as
Programming Example 1. Try your pen at different background luminance
levels (line 20). There will be a point at which your pen does not
seem to respond. This is the limit of your pen. Also# some hues must
have higher intensities in order to be read/ and some may be read at
lower intensities. For example/ the pen is more sensitive to blue than
to green and more sensitive to green than to red. At the middle of the
screen/ the pen tends to be more sensitive than near the corners.
Pen accuracy is directly proportional to screen intensity. You will
find that at higher intensities the pen values don't drift very much/
and pen noise is dramatically reduced. Also/ if you are plotting
points continuously and using a dark color/ as the pen sits in one
place/ the surrounding pixels filL in. This darkens the section of
screen below the pen/ which causes the pen to become less accurate/
drifting even further. If extreme accuracy is needed/ the solution is
to take only one read and then wait until the pen is lifted before
plotting the pixel. Be sure to set PENBUF's number of read commands
high to obtain the best resolution.
If the pen is used to do plotting/ the luminances of the plotted
points and the background should be matched as closely as possible.
Otherwise/ the pen values will drift toward the brighter pixels. It
also would be very difficult to plot points adjacent to very bright
pixels.
ATARI Light Pen Characteristics - 49

Advertisement

loading