A Performance Analysis System for the Sport of Bowling
A Performance Analysis System for the Sport of Bowling
A Performance Analysis System for the Sport of Bowling
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
covered by <strong>the</strong> wand). When <strong>the</strong> module detects <strong>the</strong> appropriate level <strong>of</strong> darkness, it<br />
assumes <strong>the</strong> COMM wand is in place, and transmits a specific "HI" character to <strong>the</strong> wand.<br />
An ASCII 'U' (0x55 - 01010101b) is used as <strong>the</strong> "HI" character because it requires an<br />
alternating light level <strong>of</strong> 38400 Hz to be detected, which is highly unlikely to occur under<br />
ambient light conditions.<br />
If <strong>the</strong> COMM wand is actually in place over <strong>the</strong> insert, it receives <strong>the</strong> "HI" character, and<br />
responds with a NULL character at 600 baud. The NULL character (0x00) appears to <strong>the</strong><br />
module as a light pulse <strong>of</strong> a fairly precise length (~16.7 msec - 10 consecutive '0' bit<br />
times, including <strong>the</strong> START bit and <strong>the</strong> EVEN parity bit) in an o<strong>the</strong>rwise dark ambient<br />
background, ano<strong>the</strong>r condition that is unlikely to occur under ambient conditions. The<br />
module waits <strong>for</strong> up to 200 msecs to receive <strong>the</strong> COMM wand's acknowledgment. If <strong>the</strong><br />
module does not receive a valid acknowledgement light pulse within this time, it<br />
retransmits <strong>the</strong> "HI" character, and waits <strong>for</strong> <strong>the</strong> COMM wand's response. The module<br />
tries to contact <strong>the</strong> COMM wand three times be<strong>for</strong>e assuming <strong>the</strong> wand is not present, at<br />
which time it shuts down. Refer to Figures A-5 (Communication Task Flowchart), A-6<br />
(Wand Detection ISR Flowchart), and A-9 (Receive Time Out ISR Flowchart).<br />
If <strong>the</strong> module receives a valid light pulse, it transmits ano<strong>the</strong>r "HI" character to <strong>the</strong><br />
COMM wand, at which point a "conversation" ensues between <strong>the</strong> SMARTDOT module<br />
and <strong>the</strong> COMM wand. If <strong>the</strong> protocol fails at anytime, or a reception error is detected, <strong>the</strong><br />
module aborts <strong>the</strong> conversation and tries to reestablish communications with <strong>the</strong> COMM<br />
wand from <strong>the</strong> beginning, <strong>for</strong> a total <strong>of</strong> three attempts, be<strong>for</strong>e finally shutting down.<br />
2.7.10 Commands<br />
The MASTER program can issue various commands through <strong>the</strong> COMM wand to <strong>the</strong><br />
module to retrieve data, to select <strong>the</strong> module's sampling mode, and to configure certain<br />
module parameters shown in Figure 2-5a. Be<strong>for</strong>e <strong>the</strong> bowler can view <strong>the</strong> wave<strong>for</strong>m <strong>the</strong><br />
SMARTDOT module has captured, <strong>the</strong> MASTER must upload that data from <strong>the</strong> module<br />
by issuing <strong>the</strong> TRANSMIT command, which instructs <strong>the</strong> module to transmit <strong>the</strong> contents<br />
<strong>of</strong> its data memory.<br />
As an example, <strong>the</strong> protocol <strong>for</strong> uploading data from <strong>the</strong> module to <strong>the</strong> MASTER is:<br />
MODULE: "HI" 'U' (0x55) @ 38400 baud - "Are you <strong>the</strong>re?"<br />
MASTER: NULL 0x00 @ 600 baud - "I'm Here"<br />
MODULE: "HI" 'U' (0x55) @ 38400 baud - "Clear to Send"<br />
MASTER: 'T' "Transmit" mnemonic @ 600 baud<br />
MODULE: 'T' Echoed back to MASTER @ 38400 baud<br />
MASTER: 'XON' 0x11 @ 600 baud, MASTER is ready to receive data<br />
MODULE: EEPROM contents 512 bytes @ 38400 baud<br />
To accommodate baud rate switching in <strong>the</strong> MASTER, <strong>the</strong> SMARTDOT module inserts a<br />
delay between each reception from <strong>the</strong> MASTER and subsequent transmission to <strong>the</strong><br />
MASTER. Including <strong>the</strong> delays, <strong>the</strong> entire upload process still takes less than a second.<br />
Appendix C includes timing diagrams <strong>for</strong> <strong>the</strong> individual command protocols: Figures C-1<br />
(Upload Command), C-2 (Mode Command), and C-3 (Configuration Command).<br />
27