6-15
6000 Series user’s manual
EZ I/O
OUT 142H, 1CH
(00011100 binary = 1C hexadecimal)
3. Write a “3” to the control register (base r3). This places
the I/O chip back into “operation” mode:
OUT 143H, 3
(control register)
Writing and reading from EZ I/O
Writing to or reading from the desired EZ I/O port is accomplished with
single program statements:
1. To write a bit pattern to the desired EZ I/O port:
OUT 142H, FFH
All bits of port C go high; all input bits are unaffected.
2. To read a bit pattern from the desired EZ I/O port:
PORTC = INP(142H)
The byte read from port C is assigned to variable port C.
EZ I/O output program examples
To configure ports A, B, and C as all outputs, issue the command:
OUT 143H, 2
‘Direction’ Mode
OUT 140H, FFH
‘Port A’
OUT 141H, FFH
‘Port B’
OUT 142H, FFH
‘Port C’
OUT 143H, 3
‘Operation’ Mode
Note
With CAMBASIC, you can also accomplish the same configuration and
outputs with one statement. Enter:
CONFIG EZIO &140, &0, &FF, &0, &FF, &O, &FF
Syntax
The CAMBASIC syntax is as follows:
CONFIG EZIO
address, dirA, initA, dirB, initB, dirC,
initC
Parameters
Parameters are defined as follows:
n
address specifies the base address of the Octagon EZ I/O parallel I/O
device in use.
n
initA, initB, and initC specify the logic state of portA, port B, and
port C, respectively, when this statement is executed. The value
range is 0 to 255.
n
dirA, dirB, and dirC are the directions of port A, port B, and port C,
respectively. The value 0 of an individual bit specifies output and the
value 1 specifies input.
Note
Usually, once the chip is configures with the CONFIG EZ IO statement,
there is no reason to reconfigure this statement again
Summary of Contents for 6000 Series
Page 7: ...Notice to user PC 500 user s manual ...
Page 9: ...About this manual 6000 Series user s manual ...
Page 37: ...2 20 Quick start 6000 Series user s manual ...
Page 65: ...5 16 Serial ports 6000 Series user s manual ...
Page 87: ...6 22 EZ I O 6000 Series user s manual ...
Page 103: ...8 8 Analog I O 6000 Series user s manual ...
Page 119: ...14 2 PC 104 expansion 6000 Series user s manual ...
Page 133: ...16 4 Watchdog timer reset and remote reset 6000 Series user s manual ...
Page 139: ...17 6 Serial EEPROM 6000 Series user s manual ...
Page 157: ...21 2 Software utilities 6000 Series user s manual ...
Page 161: ...22 4 Troubleshooting 6000 Series user s manual ...
Page 177: ...A 16 6010 technical data 6000 Series user s manual ...
Page 215: ...D 16 6040 technical data 6000 Series user s manual ...
Page 229: ...F 2 Miscellaneous 6000 Series user s manual ...