Cga Write/Read Program Example - Fluke 9100A-017 Manual

Vector output i/o module
Hide thumbs Also See for 9100A-017:
Table of Contents

Advertisement

addition to performing writes and reads to the CGA Card, the
9100 probe and clock module can take signatures of the RGBI
outputs to test the outputs.

CGA Write/Read Program Example

The following program initializes the CGA Card in the 80
column character mode, fills the screen with ASCII characters,
and then reads back two locations.
******************************************************************************
program cga_prog
declare
global string devname
end declare
! ****************************************************************************
! READ_LOC (ADDR)
! vector start number (which corresponds to the address to be read), and
! processes the returned byte read.
! ****************************************************************************
function read_loc (addr)
declare
numeric addr
end declare
! *****get the vector start address*****
! $B8000 = 1, $B8001 = 4, $B8002 = 7,. . .
vec_num = ((addr - $BB000) * 3) + 1
! *****go do the read*****
byte_str = read_cycle vec_start vec_num
! *****check for stable levels on the read (no "*"'s)*****
if (instr (byte_str, "*") = 0) then
else
end if
return errflg
end function
! ****************************************************************************
!
READ_CYCLE (VEC_START)
!
returns the stored readword byte.
! ****************************************************************************
function read_cycle (vec_start)
declare
numeric vec_start
global string devname
end declare
! *****set up input section for read*****
sync device devname, mode "capture"
arm device devname
vectordrive device devname, startmode "now"; vector vec_start
loop until (drivepoll device devname) = 3
end loop
readout device devname
byte_str = readword device devname, word 1, mode "stored"
return byte_str
-
This function calls the read_cycle function with the
! *****stable read*****
byte_nun = val (byte_str,2)
print "Read @ "+ str (addr,16) +" = " + str (byte_num,16)
! *****unstable read*****
print "Read @ " + str (addr,16) + " Is Not Stable"
-
This function drives the vector at vec_start
9100A-017
7.10.
7-11

Advertisement

Table of Contents
loading

This manual is also suitable for:

9100a series

Table of Contents