Download presentation
1
Principles of Computers 9th Lecture
Pavel Ježek, Ph.D.
2
Inside RS-232 Ball & Wheel Mouse
3
Inside RS-232 Ball & Wheel Mouse (higher contrast for lecture)
4
Opto-mechanical Axis Sensors
sensor 1 current value sensor 1 value history 1 sensor 2 current value sensor 2 value history
5
Opto-mechanical Axis Sensors
sensor 1 current value sensor 1 value history 1 1 sensor 2 current value sensor 2 value history
6
Opto-mechanical Axis Sensors
sensor 1 current value sensor 1 value history 1 1 1 sensor 2 current value sensor 2 value history
7
Opto-mechanical Axis Sensors
sensor 1 current value sensor 1 value history 1 1 1 1 sensor 2 current value sensor 2 value history
8
Opto-mechanical Axis Sensors
sensor 1 current value sensor 1 value history 1 sensor 2 current value sensor 2 value history
9
Opto-mechanical Axis Sensors
sensor 1 current value sensor 1 value history 1 sensor 2 current value sensor 2 value history
10
Opto-mechanical Axis Sensors
sensor 1 current value sensor 1 value history sensor 2 current value sensor 2 value history
11
Opto-mechanical Axis Sensors
sensor 1 current value sensor 1 value history sensor 2 current value sensor 2 value history
12
Opto-mechanical Axis Sensors
sensor 1 current value sensor 1 value history sensor 2 current value sensor 2 value history
13
Opto-mechanical Axis Sensors
sensor 1 current value sensor 1 value history 1 sensor 2 current value sensor 2 value history
14
Opto-mechanical Axis Sensors
sensor 1 current value sensor 1 value history 1 sensor 2 current value sensor 2 value history
15
Opto-mechanical Axis Sensors
sensor 1 current value sensor 1 value history 1 sensor 2 current value sensor 2 value history
16
Opto-mechanical Axis Sensors
sensor 1 current value sensor 1 value history 1 sensor 2 current value sensor 2 value history
17
Opto-mechanical Axis Sensors
sensor 1 current value sensor 1 value history 1 sensor 2 current value sensor 2 value history
18
Opto-mechanical Axis Sensors
sensor 1 current value sensor 1 value history 1 sensor 2 current value sensor 2 value history
19
Opto-mechanical Axis Sensors
sensor 1 current value sensor 1 value history 1 sensor 2 current value sensor 2 value history
20
Opto-mechanical Axis Sensors
sensor 1 current value sensor 1 value history 1 sensor 2 current value sensor 2 value history
21
Opto-mechanical Axis Sensors
sensor 1 current value sensor 1 value history 1 sensor 2 current value sensor 2 value history
22
Opto-mechanical Axis Sensors
sensor 1 current value sensor 1 value history 1 sensor 2 current value sensor 2 value history
23
Opto-mechanical Axis Sensors
sensor 1 current value sensor 1 value history sensor 2 current value sensor 2 value history
24
ball & wheel mouse logic registers (packet data)
RS-232 Mouse Structure RS-232 data out RS-232 bus interface X axis Y axis ball & wheel mouse logic “magic” done via wiring registers (packet data) byte1 byte2 byte3 byte4 wheel Middle Button Right Button Left Button
25
RS-232 Mouse Firmware – Using GPIO Registers
DATA OUT GPIO(0) X sensor 1 X sensor 2 Y sensor 1 Y sensor 2 W sensor 1 W sensor 2 RS-232 data out RS-232 bus interface X axis Y axis ball & wheel mouse logic “magic” done via wiring registers (packet data) byte1 byte2 byte3 byte4 wheel Middle Button GPIO(1) Middle Btn Right Btn Left Btn Right Button Left Button
26
RS-232 Mouse Firmware – Two Distinct Algorithms
GPIO(2) DATA OUT GPIO(0) X sensor 1 X sensor 2 Y sensor 1 Y sensor 2 W sensor 1 W sensor 2 data (bit) transmit algorithm (B) RS-232 data out RS-232 bus interface X axis Y axis ball & wheel mouse logic gathering (measuring) input changes & calculating deltas algorithm (A) registers (packet data) byte1 byte2 byte3 byte4 wheel Middle Button GPIO(1) Middle Btn Right Btn Left Btn Right Button Left Button
27
gathering (measuring) input changes & calculating deltas algorithm (A)
RS-232 Mouse Firmware – Implementing Algorithm B (Specific for RS-232 Bus, BUT NOT Specific for Ball Mouse – Would Work for Optical Mouse As Well) GPIO(2) DATA OUT GPIO(0) X sensor 1 X sensor 2 Y sensor 1 Y sensor 2 W sensor 1 W sensor 2 RS-232 data out RS-232 bus interface byteId bitId X axis Y axis ball & wheel mouse logic gathering (measuring) input changes & calculating deltas algorithm (A) registers (packet data) byte1 byte2 byte3 byte4 wheel Middle Button GPIO(1) Middle Btn Right Btn Left Btn Right Button Left Button
28
ball & wheel mouse logic registers (packet data)
Ball Mouse Firmware – Implementing Algorithm A (part 2) (IS NOT RS-232 Specific!) GPIO(2) DATA OUT GPIO(0) X sensor 1 X sensor 2 Y sensor 1 Y sensor 2 W sensor 1 W sensor 2 data (bit) transmit algorithm (B) RS-232 data out RS-232 bus interface X axis Y axis ball & wheel mouse logic registers (packet data) byte1 byte2 byte3 byte4 wheel Middle Button current change data x y w buttons GPIO(1) Middle Btn Right Btn Left Btn Right Button Left Button
29
ball & wheel mouse logic registers (packet data)
Ball Mouse Firmware – Implementing Algorithm A (parts 1 & 2) (IS NOT RS-232 Specific!) GPIO(2) DATA OUT GPIO(0) X sensor 1 X sensor 2 Y sensor 1 Y sensor 2 W sensor 1 W sensor 2 data (bit) transmit algorithm (B) RS-232 data out RS-232 bus interface X axis Y axis ball & wheel mouse logic oldX oldY oldW newX newY newW registers (packet data) byte1 byte2 byte3 byte4 wheel Middle Button current change data x y w buttons GPIO(1) Middle Btn Right Btn Left Btn Right Button Left Button prevPacketButtons
30
RS-232 Mouse Firmware Structure (All Together)
GPIO(2) DATA OUT GPIO(0) X sensor 1 X sensor 2 Y sensor 1 Y sensor 2 W sensor 1 W sensor 2 RS-232 data out RS-232 bus interface byteId bitId X axis Y axis ball & wheel mouse logic oldX oldY oldW newX newY newW registers (packet data) byte1 byte2 byte3 byte4 wheel Middle Button current change data x y w buttons GPIO(1) Middle Btn Right Btn Left Btn Right Button Left Button prevPacketButtons
31
RS-232 Mouse Firmware Algorithms
GPIO(2) DATA OUT GPIO(0) X sensor 1 X sensor 2 Y sensor 1 Y sensor 2 W sensor 1 W sensor 2 data (bit) transmit algorithm RS-232 data out RS-232 bus interface byteId bitId X axis Y axis ball & wheel mouse logic oldX oldY oldW newX newY newW gathering (measuring) input changes & calculating deltas algorithm registers (packet data) byte1 byte2 byte3 byte4 wheel Middle Button current change data x y w buttons GPIO(1) Middle Btn Right Btn Left Btn Right Button Left Button prevPacketButtons
32
History UNIVAC (1951)
33
History UNIVAC (1951) Altair 8800 (1974) Intel 8080
34
History UNIVAC (1951) Altair 8800 (1974) Intel 8080 Apple I (1976)
MOS 6502
35
History UNIVAC (1951) Altair 8800 (1974) Intel 8080 Apple I (1976)
Apple II (1977) MOS 6502
36
History UNIVAC (1951) Altair 8800 (1974) Intel 8080 Apple I (1976)
Apple II (1977) MOS 6502 MOS 6502 Atari 2600 (1977) Atari 800 (1979)
37
History UNIVAC (1951) Altair 8800 (1974) Intel 8080 Apple I (1976)
Apple II (1977) MOS 6502 MOS 6502 Atari 2600 (1977) Atari 800 (1979) Atari 800XE (1985)
38
History UNIVAC (1951) Altair 8800 (1974) Commodore 6502 ZX Spectrum
Zilog Z80 Intel 8080 Tesla PMD 85 8080 Apple I (1976) Apple II (1977) MOS 6502 MOS 6502 Atari 2600 (1977) Atari 800 (1979) Atari 800XE (1985)
39
History UNIVAC (1951) Altair 8800 (1974) Commodore 6502 ZX Spectrum
Zilog Z80 Intel 8080 Tesla PMD 85 8080 Apple I (1976) Apple II (1977) MOS 6502 MOS 6502 Atari 2600 (1977) Atari 800 (1979) Atari 800XE (1985) IBM PC (1981) Intel 8088
40
History UNIVAC (1951) Altair 8800 (1974) Commodore 6502 ZX Spectrum
Zilog Z80 Intel 8080 Tesla PMD 85 8080 Apple I (1976) Apple II (1977) MOS 6502 MOS 6502 Atari 2600 (1977) Atari 800 (1979) Atari 800XE (1985) IBM PC (1981) PC 2015 Intel 8088 Intel i3/i5/i7
Similar presentations
© 2025 SlidePlayer.com Inc.
All rights reserved.