142 Agilent E1330B Digital I/O Module Register Information
Appendix B
/* port 3 */
ibpoke((bas port_hand_1),0x00);
ibpoke((bas port_del_1),0x00);
ibpoke((bas port_norm_1),0x00);
ibpoke((bas port_ctl_1),0x00);
ibpoke((bas port_xfr_1),0x00);
ibpoke((bas port_data_1),pattern_2);
/* return ports back to input state */
ibpoke((bas port_ctl_0),0x40);
ibpoke((bas port_xfr_0),0x00);
ibpoke((bas port_ctl_1),0x40);
ibpoke((bas port_xfr_0),0x00);
/* input a data byte at port 2, no handshake */
ibpoke((bas port_hand_2),0x00);
ibpoke((bas port_del_2),0x00);
ibpoke((bas port_norm_2),0x00);
ibpoke((bas port_ctl_2),0x40);
ibpoke((bas port_xfr_2),0x00);
data_byte = ibpeek(bas port_data_2);
printf(("port data register value = %02X\n",data_byte);
/* input a data byte at port 1, leading edge handshake */
ibpoke((bas port_hand_1),0x20);
ibpoke((bas port_del_1),0xF2);
ibpoke((bas port_norm_1),0x00);
ibpoke((bas port_ctl_1),0x40);
ibpoke((bas port_xfr_1),0x02);
count = 0;
while (test_drr(bas port_xfr_1)){
count = count++;
if (count == 100) {
printf("DRR bit not ready ");
exit (-1); }
}
data_byte = ibpeek(bas port_data_1);
printf(("port data register value = %02X\n",data_byte);
/* disable port handshake */
ibpoke((bas port_xfr_2),0x00);
ibpoke((bas port_xfr_1),0x00);
return 0; }
Summary of Contents for E1330B
Page 2: ......
Page 10: ...8 Notes ...
Page 11: ...9 Notes ...
Page 12: ...10 Notes ...
Page 32: ...30 Configuring the Agilent E1330B Digital I O Chapter 2 Notes ...
Page 42: ...40 Using the Agilent E1330B Digital I O Module Chapter 3 Notes ...
Page 58: ...56 Understanding the Agilent E1330B Digital I O Module Chapter 4 Notes ...
Page 104: ...102 Agilent E1330B Digital I O Module Command Reference Chapter 5 Notes ...