Agilent Technologies E1330B Manual do Utilizador Página 130

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 156
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 129
128 Agilent E1330B Digital I/O Module Register Information
Appendix B
Reading an
8-Bit Byte
Using the input algorithm described earlier, the following programs describe how
to input an 8-bit byte from your peripheral device. The program use a leading edge
handshake and flag-driven data transfer.
BASIC Version 10 Base_addr = DVAL("1FE400",16)
20 !Logical Address 144.
30 WRITEIO 9826,Base_Addr+DVAL("19",16);32
40 !Set Port 1 Handshake Register to leading edge handshake and flag
50 !driven transfer.
60 WRITEIO 9826,Base_Addr+DVAL("1D",16);00
70 !Set Port 1 Delay Register to 0.
80 WRITEIO 9826,Base_Addr+DVAL("21",16);00
90 !Set Port 1 Normalization Register (polarity) to positive-true
100 !(High = true).
110 WRITEIO 9826,Base_Addr+DVAL("11",16);64
120 !Set Port 1 Status Control bit 6 to enable output.
130 WRITEIO 9826,Base_Addr+DVAL("0D",16);2
140 !Set Port 1 Transfer Control Register bit 1 to Enable Handshake.
150 A = READIO (9826,Base_addr+DVAL("15",16))
160 Print A
170 !If more data to send, repeat lines 150 - 160.
180 WRITEIO 9826,Base_Addr+DVAL("0D",16);0
190 !Clear Port 1 Transfer Control Register bit 1 to Disable Handshake.
200 END
Vista de página 129
1 2 ... 125 126 127 128 129 130 131 132 133 134 135 ... 155 156

Comentários a estes Manuais

Sem comentários