VT82C686B

Manufacturer Part NumberVT82C686B
ManufacturerETC-unknow
VT82C686B datasheet
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
Page 41
42
Page 42
43
Page 43
44
Page 44
45
Page 45
46
Page 46
47
Page 47
48
Page 48
49
Page 49
50
Page 50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
Page 47/128:

Keyboard Controller Command Codes

Download datasheet (2Mb)Embed
PrevNext
7HFKQRORJLHV ,QF
Port 64 - Keyboard / Mouse Command .......................... WO
This port is used to send commands to the keyboard / mouse
controller.
The command codes recognized by the
VT82C686B are listed n the table below.
Note: The VT82C686B Keyboard Controller is compatible
with
the
VIA
VT82C42
Industry-Standard
Controller except that due to its integrated nature, many of the
input and output port pins are not available externally for use
as general purpose I/O pins (even though P13-P16 are set on
power-up as strapping options). In other words, many of the
commands below are provided and “work”, but otherwise
perform no useful function (e.g., commands that set P12-P17
high or low). Also note that setting P10-11, P22-23, P26-27,
and T0-1 high or low directly serves no useful purpose, since
these bits are used to implement the keyboard and mouse ports
and are directly controlled by keyboard controller logic.
Table 4. Keyboard Controller Command Codes
Code
Keyboard Command Code Description
20h
Read Control Byte (next byte is Control Byte)
21-3Fh
Read SRAM Data (next byte is Data Byte)
60h
Write Control Byte (next byte is Control Byte)
61-7Fh
Write SRAM Data (next byte is Data Byte)
9xh
Write low nibble (bits 0-3) to P10-P13
A1h
Output Keyboard Controller Version #
A4h
Test if Password is installed
(always returns F1h to indicate not installed)
A7h
Disable Mouse Interface
A8h
Enable Mouse Interface
A9h
Mouse Interface Test (puts test results in port 60h)
(value: 0=OK, 1=clk stuck low, 2=clk stuck high,
3=data stuck lo, 4=data stuck hi, FF=general error)
AAh
KBC self test (returns 55h if OK, FCh if not)
ABh
Keyboard Interface Test (see A9h Mouse Test)
ADh
Disable Keyboard Interface
AEh
Enable Keyboard Interface
AFh
Return Version #
B0h
Set P10 low
B1h
Set P11 low
B2h
Set P12 low
B3h
Set P13 low
B4h
Set P22 low
B5h
Set P23 low
B6h
Set P14 low
B7h
Set P15 low
B8h
Set P10 high
B9h
Set P11 high
BAh
Set P12 high
BBh
Set P13 high
BCh
Set P22 high
BDh
Set P23 high
BEh
Set P14 high
BFh
Set P15 high
Revision 1.71 June 9, 2000
Keyboard
Code
Keyboard Command Code Description
C0h
Read input port (read P10-17 input data to
the output buffer)
C1h
Poll input port low (read input data on P11-13
repeatably & put in bits 5-7 of status
C2h
Poll input port high (same except P15-17)
C8h
Unblock P22-23 (use before D1 to change
active mode)
C9h
Reblock P22-23 (protection mechanism for D1)
CAh
Read mode (output KBC mode info to port 60
output buffer (bit-0=0 if ISA, 1 if PS/2)
D0h
Read Output Port (copy P10-17 output port values
to port 60)
D1h
Write Output Port (data byte following is written to
keyboard output port as if it came from keyboard)
D2h
Write Keyboard Output Buffer & clear status bit-5
(write following byte to keyboard)
D3h
Write Mouse Output Buffer & set status bit-5 (write
following byte to mouse; put value in mouse input
buffer so it appears to have come from the mouse)
D4h
Write Mouse (write following byte to mouse)
E0h
Read test inputs (T0-1 read to bits 0-1 of resp byte)
Exh
Set P23-P21 per command bits 3-1
Fxh
Pulse P23-P20 low for 6usec per command bits 3-0
All other codes not listed are undefined.
-41-
VT82C686B
Register Descriptions - Legacy I/O Ports