4
MEMORY MAPPED I/O
Memory mapped I/O (MMIO) is implemented in the external data memory addresses 0000-7FFF when P5.1=0. For example:
CLR
P5.1
; this enables MMIO
MOV
DPH,#<port addr>
; DPH selects the port (DPL has no effect)
MOVX
A,@DPTR
; read the current port
MOVX
@DPTR,A
; write to the current port
Note that since the I/O decoding logic uses only the A8-A15 lines, only DPH (data pointer high byte register) is significant; the value of DPL
has no effect. Therefore, if DPL changes but neither P5.1 nor DPH are changed, the same port will be selected.
I/O PORTS
The I/O ports should not be confused with the special function registers. Though they may have similar purposes, the method of access is
different as just shown. The I/O port values that should be loaded into DPH are as follows:
Physical
MMIO
Value for DPH
Address range
Description
70H-7FH 7000H-7FFFH
EXTERNAL I/O (Chip select for devices connected to expansion connector)
30H
3000H-3FFFH
KEYPAD INTERFACE (read only)
20H-21H 2000H-2FFFH
LCD INTERFACE (20H=LCD command, 21H=data)
10H-13H 1000H-1FFFH
D/A OUTPUT (channels A,B,C and D correspond to DPH values 10H to 13H respectively)
00H-0FH 0000H-0FFFH
SC26C92 (COM1, COM2, timer/counter and digital I/O ports,)
Below is a detailed list of the SC26C92's ports (wr indicates a write register and rd a read register).
Value for DPH
LABEL
DESCRIPTION
00H
MR1A:
Mode register a (MR1A, MR2A) (rd/wr)
01H
SRA:
Status register A (rd)
01H
CSRA:
Clock select register A (wr)
02H
BRGTST:
Baud rate generator test (rd)
02H
CRA:
Command register A (wr)
03H
RHRA:
RX holding register A (rd)
03H
THRA:
TX holding register A (wr)
04H
IPCR:
Input port change register (rd)
04H
ACR:
Auxiliary control register (wr)
05H
ISR:
Interrupt status register (rd)
05H
IMR:
Interrupt mask register (wr)
06H
CTU:
Counter timer upper (wr)
06H
CTUR:
Counter timer upper read (rd)
07H
CTL:
Counter timer lower (wr)
07H
CTLR:
Counter timer lower read (rd)
08H
MR1B:
Mode register B (rd/wr)
09H
SRB:
Status register B (rd)
09H
CSRB:
Clock select register B (wr)
0AH
TST1X16:
1X/16X test (rd)
0AH
CRB:
Command register B (wr)
0BH
RHRB:
RX holding register B (rd)
0BH
THRB:
TX holding register B (wr)
0DH
UARTIN: Input port (rd)
0DH
OPCR:
Output port configuration register (wr)
0EH
STRTCNT:
Start counter command
0EH
OUTSET:
Set output port bits command
0FH
STOPCNT:
Stop counter command
0FH
OUTRES:
Reset output port bits command (wr)
Содержание MicroPac 535
Страница 22: ...APPENDIX D MicroPac 535 Schematics...
Страница 23: ......
Страница 24: ......
Страница 25: ......
Страница 26: ......