Common Task Examples - HP 8112A Operating, Programming And Servicing Manual

50 mhz programmable pulse generator
Table of Contents

Advertisement

Common Task
Examples
Program DEL_ WID
Purpose
Comments
Note
!
10
Program name : DEL_WID
! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
20
30
This example shows how to program and increment some HP8 1 1 2A
!
40
paramet ers (width and delay) .
50
Addr = 7 1 2
60
70
CLEAR Addr
A = SPOLL (Addr)
80
90
100
OUTPUT Addr ; "PER40MS"
1 1 0
OUTPUT Addr ; " DEL9MS , WID22MS "
OUTPUT Addr ; " HIL2 . 5V , LOL - 2 . 5V "
120
130
OUTPUT Addr ; "DO "
140
150
CLEAR SCREEN
160
PRINT " The test s ignals are output now . "
170
PRINT
180
7-8
Programming Examples
These are more comprehensive program listings which provide further
examples of multiple commands involving program loops and sub
routines
This program shows how to program and change some of the
HP 8 1 12A parameters periodically. In this example every 2 second
Delay will be incremented by 1 ms while Width is decremented by 2
ms.
The interface is initialized and the HP 8 1 12A is set to the standard
(
settings
see Chapter)
Lines 100 to 120 setup period, delay, width, high-level, and low-level
and line 130 enables the output.
The test signal is now output from the HP 8 1 12A.
In
the " Width and delay loop "
delay is incremented by 1 ms while width is decremented by 2 ms.
The current values are printed in the Display subroutine
490).
Width finally reaches the value of 2 ms.
The output is not automatically disabled when the program is exited.
Device address of the HP8 1 12A
initial ize interface and s et HP8 1 12A to standard sett ing
clear the status byt e
(
lines 250 to 350), every 2 second
Set Period to 40 ms
Set Delay to 9 ms , Width to 22 ms
High Level = 2 . 5V , Low Level = - 2 . 5V
Enable Output
(
lines 440 to

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents