SN8P2200 Series
USB 1.1 Low-Speed 8-Bit Micro-Controller
SONiX TECHNOLOGY CO., LTD
Page 107
Version 1.7
10
PS/2 INTERFACE
10.1
OVERVIEW
PS/2 interface is built in the microcontroller. There are two PS/2 interfaces. One is from SCK, SDA pins and includes
internal 5K pull-up resistors. The other is using P1.0, P1.1 open-drain mode to make PS/2 interface and the external
5K pull-up resistors must be set by user. Use firmware to achieve PS/2 communication. In behind sections, PS2_1 is
the PS/2 interface from SCK, SDA. PS2_2 is the PS/2 using P1.0, P1.1 open-drain function.
10.2
PS/2 OPERATION
PS/2 is a kind of serial interface to control PC’s peripheral devices. This interface extensively apply to mouse and
keyboard. PS/2 waveform is as following.
Device to Host:
CLOCK
DATA
ST
ART
BIT 0
BIT 1
BIT 2
BIT 3
BIT 4
BIT 5
BIT 6
BIT 7
PARI
T
Y
STOP
LSB
MSB
One pocket includes start bit (Clock and data pins are low status.), one byte data (LSB to MSB), parity bit (odd parity)
and stop bit (Clock is low status and data is high status.). The clock typical frequency is 15KHz.
Host to Divice:
STA
R
T
BIT 0
BIT 1
BIT 2
BIT 3
BIT 4
BIT 5
BIT 6
BIT 7
PARITY
STOP
AC
K
One pocket includes a period silence time (Clock falling to first clock rising. The period time is
≤
15ms.), start bit (Clock
and data pins are low status.), one byte data (LSB to MSB), parity bit (odd parity), stop bit (Clock is low status and data
is high status.) and ACK bit (Device set data pin to low status.). The clock typical frequency is 15KHz.
Firmware must include clock 15KHz signal generator, odd parity calculate, start/stop/ack bit routine to get a basic PS/2
protocol signal, and follow PS/2 protocol specification to define PC’s peripheral device (mouse or keyboard)
transmitting data form and contents.