English
Language : 

MEC1322 Datasheet, PDF (83/456 Pages) Microchip Technology – Keyboard and Embedded Controller for Notebook PC
MEC1322
5.8.3 CONFIGURATION PORT
The LPC Host can access the Chip’s Configuration Registers through the Configuration Port when CONFIG MODE is
enabled. The device defaults to CONFIG MODE being disabled.
Note: The data read from the Configuration Port Data register is undefined when CONFIG MODE is not enabled.
The Configuration Port is composed of an INDEX and DATA Register. The INDEX register is used as an address pointer
to an 8-bit configuration register and the DATA register is used to read or write the data value from the indexed config-
uration register. Once CONFIG MODE is enabled, reading the Configuration Port Data register will return the data value
that is in the indexed Configuration Register.
If no value was written to the INDEX register, reading the Data Register in the Configuration Port will return the value in
Configuration Address location 00h (default).
TABLE 5-10: CONFIGURATION PORT
Default I/O
Address
(Note 5-7)
Type
Register Name
Relative Address
Default
Value
Notes
002Eh
002Fh
Note 5-7
Read / Write
INDEX
Configuration Port’s Base Address + 0
00h
Note 5-7
Read / Write
DATA
Configuration Port’s Base Address + 1
00h
The default Base I/O Address of the Configuration Port can be relocated by programming the BAR
register for Logical Device Ch (LPC/Configuration Port) at offset 60h. The Relative Address shows
the general case for determining the I/O address for each register.
5.8.3.1 Enable CONFIG MODE
The INDEX and DATA registers are effective only when the chip is in CONFIG MODE. CONFIG MODE is enabled when
the Config Entry Key is successfully written to the I/O address of the INDEX register of the CONFIG PORT while the
CONFIG MODE is disabled (see Section 5.8.3.2, "Disable CONFIG MODE").
Config Entry Key = < 55h>
5.8.3.2 Disable CONFIG MODE
CONFIG MODE defaults to disabled on a VCC1_RESET, nSIO_RESET, and when LRESET# is asserted. CONFIG
MODE is also disabled when the following Config Exit Key is successfully written to the I/O address of the INDEX PORT
of the CONFIG PORT while CONFIG MODE is enabled.
Config Exit Key = < AAh>
5.8.3.3 Configuration Sequence Example
To program the configuration registers, the following sequence must be followed:
1. Enable Configuration State
2. Program the Configuration Registers
3. Disable Configuration State.
The following is an example of a configuration program in Intel 8086 assembly language.
;----------------------------.
; ENABLE CONFIGURATION STATE
;----------------------------'
MOV
DX,CONFIG_PORT_BASE_ADDRESS
MOV
AX,055H; Config Entry Key
OUT
DX,AL
;----------------------------.
; CONFIGURE BASE ADDRESS, |
; LOGICAL DEVICE 8
|
;----------------------------'
MOV
DX,CONFIG_PORT_BASE_ADDRESS
MOV
AL,07H
OUT
DX,AL; Point to LD# Config Reg
MOV
DX,CONFIG_PORT_BASE_ADDRESS+1
 2014 - 2015 Microchip Technology Inc.
DS00001719D-page 83