01.06.2015 Views

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

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

SMARTDOT Module S<strong>of</strong>tware Architecture<br />

SLEEP MODE<br />

Wake Up on<br />

Pressure Applied to<br />

Insert<br />

Not DARK enough<br />

at start-up<br />

START-UP TASK (Figure A-1A)<br />

Initialize Module<br />

Check Start-Up LITE Level<br />

Enable Interrupts<br />

Waited too long <strong>for</strong><br />

RELEASE<br />

PRE-SAMPLING TASK (Figure A-1B)<br />

Wait <strong>for</strong> Sample (IDLE)<br />

Check <strong>for</strong> RELEASE<br />

Select Active Scratch Pad<br />

Write to EEPROM (8 pre-samples)<br />

RELEASE<br />

detected<br />

RELEASE not detected<br />

LIGHT SAMPLE ISR<br />

(Figure A-2)<br />

Reached END <strong>of</strong><br />

Sample Space<br />

Scratch Pad END and<br />

sampling disabled<br />

SAMPLING TASK (Figure A-3)<br />

Wait <strong>for</strong> Sample (IDLE)<br />

Write to EEPROM (every 8 samples)<br />

Check <strong>for</strong> END <strong>of</strong> Sample Space<br />

Check <strong>for</strong> END <strong>of</strong> Scratch Pad<br />

Check <strong>for</strong> Sampling Enabled<br />

In TEST mode,<br />

wave<strong>for</strong>m VALID, and<br />

sampling disabled<br />

DISCRIMINATION TASK (Figure A-4)<br />

Check <strong>for</strong> Valid Wave<strong>for</strong>m<br />

Check <strong>for</strong> Test Mode<br />

Check <strong>for</strong> Sampling Enabled<br />

Wave<strong>for</strong>m invalid and<br />

not in TEST mode<br />

Wave<strong>for</strong>m is still VALID<br />

In TEST mode with<br />

sampling enabled<br />

COMMUNICATION TASK (Figure A-5)<br />

Wait <strong>for</strong> DARK (IDLE)<br />

Contact WAND<br />

Wait <strong>for</strong> LITE (IDLE)<br />

Acknowledge WAND<br />

Get Command<br />

(UART Receive Task - Figure A-7)<br />

Process Command<br />

(UART Receive Task - Figure A-7)<br />

Check <strong>for</strong> Command Retry<br />

Done trying<br />

Continue trying<br />

WAND DETECTION ISR<br />

(Figure A-6)<br />

BIT SAMPLE ISR<br />

(Figure A-8)<br />

RECEIVE TIME OUT ISR<br />

(Figure A-9)<br />

SHUTDOWN TASK (Figure A-10)<br />

Done Sampling<br />

Save Run Time<br />

Back to Sleep<br />

Figure 2-4<br />

22

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

Saved successfully!

Ooh no, something went wrong!