Pir Interrupts On The Agilent E1330 - Agilent Technologies E1330B User's Manual And Scpi Programming Manual

75000 series b quad 8-bit digital i/o module
Hide thumbs Also See for E1330B:
Table of Contents

Advertisement

PIR Interrupts
on the
Agilent E1330
Appendix B
When debugging, it is often necessary to go between editing and running of the
program. To accelerate this activity it is very helpful to assign a line label to the first
line of a subprogram that is the same as the subprogram name. This makes it
possible to start editing by typing EDIT
This example demonstrates how to use the four PIR interrupt lines that exist on the
Agilent E1330A/B digital I/O module. This example produces true interrupts from
these lines. Register programming must be used to access this capability as the
Agilent E1330 SCPI driver does not use these lines.
The routines have been written in a style so it is easy to go between the
Agilent E1330 register documentation and the code.
i.e. OUTPUT@Sys;"DIAG:POKE"&VAL$(Base+(DVAL("10",16))) &",8,64".
This code means output write to register 10 (hex), a 8 bit byte of value 64.
MAIN
The MAIN line code 10-240 provides a error handling shell.
E13xx_errorsChecks for any errors in all instruments.
Reset_dig
Resets the E1330 using the *RST command.
The following subprograms do register programming to the Agilent E1330:
Reg_dump Prints the full register contents for debugging.
Enable_pir0 Enables pir0 to produce a interrupt.
Enable_pir1 Enables pir1 to produce a interrupt.
Enable_pir2 Enables pir2 to produce a interrupt.
Enable_pir3 Enables pir3 to produce a interrupt.
Enable_int A second level enable that allows PIR0-3 to reach the backplane.
Res0_0
Drives Res0 (pin 9) to 0 !Used as a testing signal source.
Res0_1
Drives Res0 (pin 9) to 1 if pull-up is connected.
The following subprograms were added to show how to handle interrupts:
Main (lines 390-680)
interrupts.
Intr_ser (lines 930-1250) Provides on going servicing of PIR interrupts by
determining which PIR occurred and then re-enables.
Since interrupts are events that get latched, once they have occurred most all
features in the interrupt path must be re-enabled in order to prepare for another
event. Re-enabling may require either a read or a write to each element in the
interrupt path. To properly service a interrupt the Subprogram Intr_ser does the
following:
1. Re-enables the Agilent E1330 hardware to pull a backplane interrupt.i.e.
1070 Enable_pir0
1110 Enable_pir1
1150 Enable_pir2
1190 Enable_pir3
1210 Enable_int
Agilent E1330B Digital I/O Module Register Information
<
subprogram
>
Initializes the Agilent E1330 and sets up for
.
131

Advertisement

Table of Contents
loading

Table of Contents