Programming Examples; System Configuration; Resetting The Module - HP E1328A User Manual

D/a converter module
Hide thumbs Also See for E1328A:
Table of Contents

Advertisement

Programming Examples

System
Configuration
Resetting the
Module
HP IBASIC Version
72
HP E1328A Register-Based Programming
The examples in this section demonstrate how to program the module at the
register level. The programs follow the algorithm described in a previous
section. The examples include:

Resetting the Module

Reading the ID, Device Type, and Status Registers
Outputting a Voltage or Current
The following example programs were developed with the module at logical
address 72.
The HP BASIC programs were developed using the HP E1300
mainframe Series B HP IBASIC language.
The C language programs were developed on an HP Vectra PC
(IBM PC compatible) using Borland's Turbo C++
language, the HP 82335 HP-IB Interface and HP-IB Command
Library. The last C language programming example was developed
on the HP RADI-EPC7 Embedded Controller.
The following program resets the HP E1328A D/A Converter module. The
process is as follows:
1. Write a "2" to the Status/Control Register to set SFI high.
2. Write a "3" to the Status/Control Register to keep the SFI bit high
and set the reset bit.
3. Wait 200 mS.
4. Write a "2" to the Status/Control Register to keep the SFI bit high
and zero the reset bit.
5. Wait 100 mS.
6. Write a "0" to the Status/Control Register.
10
Base_addr = DVAL("1FD200",16)
20
Reg_addr = 04 ! Offset for Status Control Register.
30
! Write a 2 then a 3 to the Status Register.
40
WRITEIO -9826, Base_addr + Reg_addr; 2
50
WRITEIO -9826, Base_addr + Reg_addr; 3
60
WAIT .2 ! wait 200 mS.
70
WRITEIO -9826, Base_addr + Reg_addr; 2
80
WAIT .1 ! wait 100 mS.
90
WRITEIO -9826, Base_addr + Reg_addr; 0
100 END
®
programming
!Logical Address 72.
Appendix B

Advertisement

Table of Contents
loading

Table of Contents