background image

7

110 data% = INP(ba7)
120 ........

3. Read in data of port 0 (In C language)

........
i = inportb(b0); /* data in i */
........

The following examples show you how to write data to an
output port:

Example 4: Write 20h to port 4 (In assembly language)

........
MOV DX,ba4

DX points to port 5 address

MOV AL,20H

;Initialize data

OUT DX,AL

;Write data out

........

Example 5: Set bit 6 of port 1 to "1", other bits not
affected (In BASIC language)

100 ........
110 data% = INP(ba1)
120 OUT (ba1, data% OR &H40)
130 ........

Example 6:. Write 55h to port 3 (In C language)

........
outportb(b3,0x55);
........

CHAPTER 4

SIGNAL CONNECTION

Figure 4-1 shows the connection of the digital I/O.

DO

DI

AR-B2201

Other TTL device

GND

Ground

Vcc

Figure 4-1 Digital I/O Connection

Summary of Contents for AR-B2201

Page 1: ...mmunity and reduce power consumption If the I O port is defined as an input port each input line is pulled up by a 4 7K Ohm resistor If an I O port is defined as an output port the output status can b...

Page 2: ...se I O ports is selected by using Base Address switch SW1 The AR B2201 is factory configured for a Base Address of 3E0 Hex If this base address is already occupied you will need to change the Base Add...

Page 3: ...PORTS The AR B2201 is configured with 4 input ports and 4 output ports by the factory Port 0 through port 3 is configured as input ports and port 4 through port 7 are configured as output ports Users...

Page 4: ...f port 3 21 Bit 2 of port 1 22 Bit 2 of port 3 23 Bit 3 of port 1 24 Bit 3 of port 3 25 Bit 4 of port 1 26 Bit 4 of port 3 27 Bit 5 of port 1 28 Bit 5 of port 3 29 Bit 6 of port 1 30 Bit 6 of port 3 3...

Page 5: ...and cords attached to the rear of the system unit and then disconnect 4 Remove the system unit cover refer to your computer user s guide if necessary 5 Choose an available option slot Remove the screw...

Page 6: ...rates TTL level low output The following describes the relay output registers A Power up reset scheme is implemented to insure that all output stay in their de active low state when power is first app...

Page 7: ...ints to port 5 address MOV AL 20H Initialize data OUT DX AL Write data out Example 5 Set bit 6 of port 1 to 1 other bits not affected In BASIC language 100 110 data INP baseport 1 120 OUT baseport 1 d...

Page 8: ...O Channels 64 TTL input or output channels 8 ports Input Buffer 74HCT244 with 4 7K Ohm pull up resistors Output Driver 74HCT273 Maximum sink current 24 mA Maximum source current 16 mA I O address Bas...

Reviews: