Keithley 194 Instruction Manual page 81

High speed voltmeter
Table of Contents

Advertisement

OPERATION
Reading Real Time Data
Real time data can be read by performing
a read opera-
tion to the low and high byte locations in sequence. The
exact memory locations will, of course, depend on the ad-
dress decoding scheme used. For example, assume that
the interface is located at four memory locations begin-
ning at address 5DF00, with the three locations decoded
as follows:
STATUS: 5DFO0
LOWBYTE: 5DF02
HIGH BYTE: $DF03
Further assume that the three status signals are assigned
the following
data bus lines:
OVERRUN:
Dl
NEW CONVERSION:
D2
MEASURING:
D3
The following
source code gives a simple example using
6502 assembly language on how to go about accessing real
time data and storing it in computer memory. The program
accesses 256 bytes (128 words) of instrument
data and
stores them in a memory buffer beginning
at location
$COOO.
SOURCE CODE
COMMENTS
START
LDX #$00
LOOP
LDA $DFOO
AND #$04
BEQ LOOP
LDA $DF02
STA $COOO,X
INX
LDA $DF03
STA $COOO,X
LDA $DFOO
AND #$08
BEQ PASS
INX
BNE LOOP
PASS
RTS
Clear memory pointer.
Load interface status
into accumulator.
Mask off NEW CON-
VERSION bit.
If no conversion,
branch back and wait.
Load low byte into
accumulator.
Put low byte in
memory location with
offset x.
Increment
memory
pointer.
Load high byte into
accumulator.
Put high byte into
memory location with
offset x.
Get interface status.
Mask off MEASUR-
ING bit.
If no longer measur-
ing, end routine.
Increment
memory
location pointer.
Branch back for next
reading.
Return to calling
routine.
3-42

Advertisement

Table of Contents
loading

Table of Contents