HP 9000 Series 300 Tutorials Manual page 97

Device i/o and user interfacing hp-ux concepts and tutorials
Hide thumbs Also See for HP 9000 Series 300:
Table of Contents

Advertisement

• Bits
D2, D1,
and
DO
are the 3-bit (value range
0
through
7)
value
representing which data line
(DO
through
D7
respectively) is to be used
when responding to a parallel poll.
For example, to program a given device to respond to a parallel poll by placing
a logic 1 on data line
DO
if it needs service, use a PARALLEL POLL ENABLE
command with a decimal value of
104
(binary
01101000).
The following code segment shows how to configure a device at bus address 5
to respond to a parallel poll by asserting data line D 1 with a logic 1 if it needs
service.
#include <dvio.h>
#include <fcntl.h>
#include <errno.h>
mainO
{
}
int eid, MTA;
char command [50] ;
if «eid
=
open ("/dev/raw_hpib", O_RDWR»
==
-1) {
printf("open failed, errno
=
%d\n", errno);
exit(2);
}
MTA
=
hpib_bus_status(eid, CURRENT_BUS_ADDRESS)
+
64; /*compute MTA*/
command[O]
=
MTA;
/*talk address of interface*/
command[l]
=
63;
/* the UNLISTEN command*/
command[2]
=
32
+
5;
/* the listen address for device at*/
command [3]
=
5;
command[4]
=
105;
/* address 5
*/
/* the PARALLEL POLL CONFIGURE command*/
/* the PARALLEL POLL ENABLE command*/
hpib_send_cmnd(eid, command, 5);
Controlling the HP-IB Interface
3-37

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Hp 9000 series 800

Table of Contents