EasyManua.ls Logo

Radio Shack TRS-80 X-PAD GT-116 - Appendix D; X-Pad Data Interpretation

Radio Shack TRS-80 X-PAD GT-116
65 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Appendix
D/
X-Pad
Data Interpretation
The X-Pad
is one of the
easiest
peripherals
to
use. It
simply
outputs
the X- and
Y-coordinate positions
and Pen Status
information
consisting ofproximity, Pen
down, and
margin
conditions.
The
data
is represented by
numbers that
vary from a
value
of at
the
upper-left corner ofthe
surface (the
Origin) to
their
maximum values
as
the Pen is moved to the
lower-right corner.
Each data
output corresponds
directly with
a
position on
the
Screen.
Position numbers
created by the X-Pad are the
same as
those that
are
manually keyed into the Computer
to
select
a
desired
display location.
The Pen Status
information provides
additional
capabilities
in the use ofthe
X-Pad.
Pen proximity provides
a
means of
disabling
data
when the Pen is out of
range
ofthe
Writing Surface. X- and
Y-margins tell when the
Pen
is
beyond
the
7"
x
9"
Display Area
and defines left, top, and
right
margin
areas
that can be used
for
Menu or other
purposes.
A lower
margin
is not defined.
However, a lower
margin can
be
easily created in software. It
should
be
noted
that a
Menu
can be created
in
the
Display
Area,
as
well
as
in
the
Margin Area.
See Table
2 earlier in this manual for a
description of
Pen
Status
.
The
Computer reads
the X-Pad data
and
status
information
from three memory
addresses
X
=
PEEK(65376), Y
=
PEEK(65377),S
=
PEEK(65378).
The X-Pad
is
fully buffered to
allow the Computer
to
simply
input
or
read the data
and status
information in a random or
asynchronous
fashion. When the X- data
is read
by
the
Computer,
the Y-data
and
status
word
updates are
inhibited to
maintain a grouping ofthe
coordinate
data
pair
and status.
This is to
insure that the
data
and status are all
read
at a single
time
so
they
represent the Pen at a
single
location
while
the
Pen is
moving.
The
status
word
can be
read
at any time, for
example,
while
waiting for
a Pen-down
condition.
X- data,
Y-data,
and status
can then
be read in
order.
Data
Format
1st Word 2nd Word
3rd Word
Description
Output
X-data
Y-data
Status
Address 65376
65377
65378 The
Interface
is
fully
buffered
to
allow
the Computer
to read the
data
and
status
information.
Bits
When the
X-data
DO
O(LSB)
O(LSB) Pen
Down
word is
read by the
D1 1 1
Proximity
Computer, the Y-data
D2
2 2
X-margin
and
status word
D3
3 3
Y-margin
updates are
D4 4
4
Logic inhibited
to main-
tain
a
grouping.
D5
5 5
Logic
D6
6 6
Logic The
status
word
can
D7 7 7
Logic
be read
at
any
time.
47