I/O output program examples
To configure ports A, B, and C as all outputs, issue the commands:
OUT 1053h, 2 ‘Direction’ Mode
OUT 1050h, FFh ‘PortA’
OUT 1051h, FFh ‘PortB’
OUT 1052h, FFh ‘PortC’
OUT 1053h, 3 ‘Operation’ Mode
Ports A, B, and C will now output all “1”s after issuing the following commands:
OUT 1050h, FFh (portA)
OUT 1051h, FFh (portB)
OUT 1052h, FFh (portC)
or all “0”s after:
OUT 1050h, 0 (portA)
OUT 1051h, 0 (portB)
OUT 1052h, 0 (portC)
I/O input program examples
To configure ports A and C as inputs and port B as outputs, issue the following
commands:
OUT 1053h, 2 ‘Direction Mode’
OUT 1050h, 0
OUT 1051h, FF
OUT 1052h, 0
OUT 1053h, 3 ‘Operation Mode’
To read ports A and C, issue the following commands:
PORTA = INP(1050h) (port A)
PORTC = INP(1052h) (port C)
69
Содержание 5266
Страница 18: ...Figure 2 1 5266 component diagram top 18 ...
Страница 19: ...Figure 2 2 5266 component diagram bottom 19 ...
Страница 20: ...Figure 2 3 5266 dimensions inches 20 ...
Страница 21: ...Figure 2 4 5266 dimensions mm 21 ...