05.06.2015 Views

DE2-115: User Manual

DE2-115: User Manual

DE2-115: User Manual

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

• Data transmit from the device to controller<br />

After sending an enabling instruction to the PS/2 mouse at stream mode, the device starts to send<br />

displacement data out, which consists of 33 bits. The frame data is cut into three similar slices, each<br />

of them containing a start bit (always zero) and eight data bits (with LSB first), one parity check bit<br />

(odd check), and one stop bit (always one).<br />

PS/2 controller samples the data line at the falling edge of the PS/2 clock signal. This could easily<br />

be implemented using a shift register of 33 bits, but be cautious with the clock domain crossing<br />

problem.<br />

• Data transmit from the controller to device<br />

Whenever the controller wants to transmit data to device, it first pulls the clock line low for more<br />

than one clock cycle to inhibit the current transmit process or to indicate the start of a new transmit<br />

process, which usually be called as inhibit state. After that, it pulls low the data line then release the<br />

clock line, and this is called the request state. The rising edge on the clock line formed by the<br />

release action can also be used to indicate the sample time point as for a 'start bit. The device will<br />

detect this succession and generates a clock sequence in less than 10ms time. The transmit data<br />

consists of 12bits, one start bit (as explained before), eight data bits, one parity check bit (odd<br />

check), one stop bit (always one), and one acknowledge bit (always zero). After sending out the<br />

parity check bit, the controller should release the data line, and the device will detect any state<br />

change on the data line in the next clock cycle. If there‟s no change on the data line for one clock<br />

cycle, the device will pull low the data line again as an acknowledgement which means that the data<br />

is correctly received.<br />

After the power on cycle of the PS/2 mouse, it enters into stream mode automatically and disable<br />

data transmit unless an enabling instruction is received. Figure 6-16 shows the waveform while<br />

communication happening on two lines.<br />

94

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!