https://wiki.hevs.ch/fsi/index.php5?title=Kart/serial_link&feed=atom&action=historyKart/serial link - Revision history2024-03-29T07:15:22ZRevision history for this page on the wikiMediaWiki 1.18.1https://wiki.hevs.ch/fsi/index.php5?title=Kart/serial_link&diff=3235&oldid=prevAxel.amand: /* Sensors */2023-07-07T09:49:25Z<p><span class="autocomment">Sensors</span></p>
<table class='diff diff-contentalign-left'>
<col class='diff-marker' />
<col class='diff-content' />
<col class='diff-marker' />
<col class='diff-content' />
<tr valign='top'>
<td colspan='2' style="background-color: white; color:black;">← Older revision</td>
<td colspan='2' style="background-color: white; color:black;">Revision as of 09:49, 7 July 2023</td>
</tr><tr><td colspan="2" class="diff-lineno">Line 179:</td>
<td colspan="2" class="diff-lineno">Line 179:</td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>| Voltage</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>| Voltage</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>| Uint16</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>| Uint16</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div>| Battery voltage, U = register * <del class="diffchange diffchange-inline">250*e</del>-6 * 7.8 [V]</div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div>| Battery voltage, U = register * <ins class="diffchange diffchange-inline">250e</ins>-6 * 7.8 [V]</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>| Kart -> Smartphone</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>| Kart -> Smartphone</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>| When a delta of at least SENS_BATT_DELTA_MV (50) from the last registered value happens</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>| When a delta of at least SENS_BATT_DELTA_MV (50) from the last registered value happens</div></td></tr>
<tr><td colspan="2" class="diff-lineno">Line 186:</td>
<td colspan="2" class="diff-lineno">Line 186:</td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>| Current</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>| Current</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>| Uint16</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>| Uint16</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div>| Consumed current, I = register * <del class="diffchange diffchange-inline">250*10*e</del>-6 / (100 * <del class="diffchange diffchange-inline">5*10*e</del>-3) [A]</div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div>| Consumed current, I = register * <ins class="diffchange diffchange-inline">250e</ins>-6 / (100 * <ins class="diffchange diffchange-inline">5e</ins>-3) [A]</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>| Kart -> Smartphone</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>| Kart -> Smartphone</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>| When a delta of at least SENS_CURR_DELTA_MA (50) from the last registered value happens</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>| When a delta of at least SENS_CURR_DELTA_MA (50) from the last registered value happens</div></td></tr>
<tr><td colspan="2" class="diff-lineno">Line 193:</td>
<td colspan="2" class="diff-lineno">Line 193:</td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>| Range finder</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>| Range finder</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>| Uint16</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>| Uint16</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div>| Distance to sensor, register * 25.4 / (147<del class="diffchange diffchange-inline">*10</del>*e-6 * (10M / 10)) [mm]</div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div>| Distance to sensor, register * 25.4 / (147*e-6 * (10M / 10)) [mm]</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>Register zeroed if less than 152 mm (sensor min distance) or greater than 1500 mm (arbitrary max distance), event not sent in such case</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>Register zeroed if less than 152 mm (sensor min distance) or greater than 1500 mm (arbitrary max distance), event not sent in such case</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>| Kart -> Smartphone</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>| Kart -> Smartphone</div></td></tr>
</table>Axel.amandhttps://wiki.hevs.ch/fsi/index.php5?title=Kart/serial_link&diff=3234&oldid=prevAxel.amand: /* Frame example */2023-07-07T09:35:40Z<p><span class="autocomment">Frame example</span></p>
<table class='diff diff-contentalign-left'>
<col class='diff-marker' />
<col class='diff-content' />
<col class='diff-marker' />
<col class='diff-content' />
<tr valign='top'>
<td colspan='2' style="background-color: white; color:black;">← Older revision</td>
<td colspan='2' style="background-color: white; color:black;">Revision as of 09:35, 7 July 2023</td>
</tr><tr><td colspan="2" class="diff-lineno">Line 60:</td>
<td colspan="2" class="diff-lineno">Line 60:</td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>| 0b11110100</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>| 0b11110100</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>| 0x74</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>| 0x74</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del style="color: red; font-weight: bold; text-decoration: none;">|}</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del style="color: red; font-weight: bold; text-decoration: none;"></del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del style="color: red; font-weight: bold; text-decoration: none;">If the BLE module wants to read the current battery voltage, supposing we have 4 LEDs, the frame is such as:</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del style="color: red; font-weight: bold; text-decoration: none;">{| cellpadding="8" cellspacing="0" border="1"</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del style="color: red; font-weight: bold; text-decoration: none;">! SoF (1 byte)</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del style="color: red; font-weight: bold; text-decoration: none;">! Address (1 byte)</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del style="color: red; font-weight: bold; text-decoration: none;">! Data High (1 byte)</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del style="color: red; font-weight: bold; text-decoration: none;">! Data Low (1 byte)</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del style="color: red; font-weight: bold; text-decoration: none;">! EoF (1 byte)</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del style="color: red; font-weight: bold; text-decoration: none;">|-</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del style="color: red; font-weight: bold; text-decoration: none;">| 0xAA</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del style="color: red; font-weight: bold; text-decoration: none;">| 0b10000101</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del style="color: red; font-weight: bold; text-decoration: none;">| Any</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del style="color: red; font-weight: bold; text-decoration: none;">| Any</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del style="color: red; font-weight: bold; text-decoration: none;">| CRC</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>|}</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>|}</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr>
</table>Axel.amandhttps://wiki.hevs.ch/fsi/index.php5?title=Kart/serial_link&diff=3211&oldid=prevFrancois.corthay: /* Kart init */2022-09-06T11:15:17Z<p><span class="autocomment">Kart init</span></p>
<table class='diff diff-contentalign-left'>
<col class='diff-marker' />
<col class='diff-content' />
<col class='diff-marker' />
<col class='diff-content' />
<tr valign='top'>
<td colspan='2' style="background-color: white; color:black;">← Older revision</td>
<td colspan='2' style="background-color: white; color:black;">Revision as of 11:15, 6 September 2022</td>
</tr><tr><td colspan="2" class="diff-lineno">Line 287:</td>
<td colspan="2" class="diff-lineno">Line 287:</td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>The Kart is now ready to function !</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>The Kart is now ready to function !</div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;">Note that the '''Control Registers | restart''' bit is automatically reset back to 0 when the</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;">''stepper_end'' input is activated.</ins></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>== Testing through USB ==</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>== Testing through USB ==</div></td></tr>
</table>Francois.corthayhttps://wiki.hevs.ch/fsi/index.php5?title=Kart/serial_link&diff=3129&oldid=prevMichael.clausen: /* Sensors */2022-08-22T08:57:26Z<p><span class="autocomment">Sensors</span></p>
<table class='diff diff-contentalign-left'>
<col class='diff-marker' />
<col class='diff-content' />
<col class='diff-marker' />
<col class='diff-content' />
<tr valign='top'>
<td colspan='2' style="background-color: white; color:black;">← Older revision</td>
<td colspan='2' style="background-color: white; color:black;">Revision as of 08:57, 22 August 2022</td>
</tr><tr><td colspan="2" class="diff-lineno">Line 184:</td>
<td colspan="2" class="diff-lineno">Line 184:</td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>|  </div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>|  </div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>|-</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>|-</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div>| <del class="diffchange diffchange-inline">3</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div>| <ins class="diffchange diffchange-inline">7</ins></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div>| <del class="diffchange diffchange-inline">LED4</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div>| <ins class="diffchange diffchange-inline">LED8</ins></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>| Bit + Uint15</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>| Bit + Uint15</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>| ''See LED1''</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>| ''See LED1''</div></td></tr>
<tr><td colspan="2" class="diff-lineno">Line 191:</td>
<td colspan="2" class="diff-lineno">Line 191:</td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>|  </div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>|  </div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>|-</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>|-</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div>| <del class="diffchange diffchange-inline">4</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div>| <ins class="diffchange diffchange-inline">8</ins></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>| Voltage</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>| Voltage</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>| Uint16</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>| Uint16</div></td></tr>
<tr><td colspan="2" class="diff-lineno">Line 198:</td>
<td colspan="2" class="diff-lineno">Line 198:</td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>| When a delta of at least SENS_BATT_DELTA_MV (50) from the last registered value happens</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>| When a delta of at least SENS_BATT_DELTA_MV (50) from the last registered value happens</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>|-</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>|-</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div>| <del class="diffchange diffchange-inline">5</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div>| <ins class="diffchange diffchange-inline">9</ins></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>| Current</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>| Current</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>| Uint16</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>| Uint16</div></td></tr>
<tr><td colspan="2" class="diff-lineno">Line 205:</td>
<td colspan="2" class="diff-lineno">Line 205:</td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>| When a delta of at least SENS_CURR_DELTA_MA (50) from the last registered value happens</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>| When a delta of at least SENS_CURR_DELTA_MA (50) from the last registered value happens</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>|-</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>|-</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div>| <del class="diffchange diffchange-inline">6</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div>| <ins class="diffchange diffchange-inline">A</ins></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>| Range finder</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>| Range finder</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>| Uint16</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>| Uint16</div></td></tr>
<tr><td colspan="2" class="diff-lineno">Line 213:</td>
<td colspan="2" class="diff-lineno">Line 213:</td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>| When a delta of at least SENS_RANGEFNDR_MM (60) from the last registered value happens</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>| When a delta of at least SENS_RANGEFNDR_MM (60) from the last registered value happens</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>|-</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>|-</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div>| <del class="diffchange diffchange-inline">7</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div>| <ins class="diffchange diffchange-inline">B</ins></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>| End switches</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>| End switches</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>| Vector(16)</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>| Vector(16)</div></td></tr>
<tr><td colspan="2" class="diff-lineno">Line 220:</td>
<td colspan="2" class="diff-lineno">Line 220:</td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>| On any edge change of any sensor</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>| On any edge change of any sensor</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>|-</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>|-</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div>| <del class="diffchange diffchange-inline">8</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div>| <ins class="diffchange diffchange-inline">C</ins></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>| Hall1</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>| Hall1</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>| Uint16</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>| Uint16</div></td></tr>
<tr><td colspan="2" class="diff-lineno">Line 227:</td>
<td colspan="2" class="diff-lineno">Line 227:</td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>| Each 100 ms if value changed from last time</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>| Each 100 ms if value changed from last time</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>|-</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>|-</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div>| <del class="diffchange diffchange-inline">9</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div>| <ins class="diffchange diffchange-inline">D</ins></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>| Hall2</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>| Hall2</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>| Uint16</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>| Uint16</div></td></tr>
</table>Michael.clausenhttps://wiki.hevs.ch/fsi/index.php5?title=Kart/serial_link&diff=3128&oldid=prevAxel.amand: /* Testing through USB */2022-08-18T15:10:11Z<p><span class="autocomment">Testing through USB</span></p>
<table class='diff diff-contentalign-left'>
<col class='diff-marker' />
<col class='diff-content' />
<col class='diff-marker' />
<col class='diff-content' />
<tr valign='top'>
<td colspan='2' style="background-color: white; color:black;">← Older revision</td>
<td colspan='2' style="background-color: white; color:black;">Revision as of 15:10, 18 August 2022</td>
</tr><tr><td colspan="2" class="diff-lineno">Line 291:</td>
<td colspan="2" class="diff-lineno">Line 291:</td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>[[File:Kart_kci.jpg|450px|right|Kart Command Interpreter]]</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>[[File:Kart_kci.jpg|450px|right|Kart Command Interpreter]]</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>To test the Kart from a PC directly, one can do as follows:</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>To test the Kart from a PC directly, one can do as follows:</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div>* Remove the [[Kart/Bluetooth|BLE]] from the [[Kart/Motherboard|motherboard]]</div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div>* Remove the [[Kart/Bluetooth|BLE]] from the [[Kart/Motherboard|motherboard]] <ins class="diffchange diffchange-inline">(or, at least, do not connect to a smartphone)</ins></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>* Power the [[Kart/Motherboard|motherboard]] with a DC voltage regulator (+12V)</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>* Power the [[Kart/Motherboard|motherboard]] with a DC voltage regulator (+12V)</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>* Wire the USB-C present on the daughterboard to your PC</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>* Wire the USB-C present on the daughterboard to your PC</div></td></tr>
<tr><td colspan="2" class="diff-lineno">Line 297:</td>
<td colspan="2" class="diff-lineno">Line 297:</td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>* Download and open the '''Kart Command Interpreter''' utility (available in the VHDL project -> CommandInterpreter)</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>* Download and open the '''Kart Command Interpreter''' utility (available in the VHDL project -> CommandInterpreter)</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>** [https://github.com/hei-synd-2131-eln/eln-kart/blob/master/CommandInterpreter/KartCommandInterpreter_WIN.exe Windows 10]</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>** [https://github.com/hei-synd-2131-eln/eln-kart/blob/master/CommandInterpreter/KartCommandInterpreter_WIN.exe Windows 10]</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del style="color: red; font-weight: bold; text-decoration: none;">** [https://github.com/hei-synd-2131-eln/eln-kart/blob/master/CommandInterpreter/KartCommandInterpreter_MAC macOS (ARM64/Apple Silicon)]</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del style="color: red; font-weight: bold; text-decoration: none;">** [https://github.com/hei-synd-2131-eln/eln-kart/blob/master/CommandInterpreter/KartCommandInterpreter_MAC_amd64 macOS (AMD64/Intel)]</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>** [https://github.com/hei-synd-2131-eln/eln-kart/blob/master/CommandInterpreter/KartCommandInterpreter_LIN Linux]</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>** [https://github.com/hei-synd-2131-eln/eln-kart/blob/master/CommandInterpreter/KartCommandInterpreter_LIN Linux]</div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;">** [https://github.com/hei-synd-2131-eln/eln-kart/blob/master/CommandInterpreter/commandInterpreter.py Source code]</ins></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>* In the top menu '''Serial -> Port''', select the correct COM port (should be the biggest of the two new ports)</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>* In the top menu '''Serial -> Port''', select the correct COM port (should be the biggest of the two new ports)</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div>** You can also change the baudrate, by default '''115'200''' (the correct one if it was not modified <del class="diffchange diffchange-inline">in the VHDL '''Kart_pkg.vhd'''</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div>** You can also change the baudrate, by default '''115'200''' (the correct one if it was not modified<ins class="diffchange diffchange-inline">)</ins></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>To test the connection, click the '''Read''' button. The '''Tx''' and '''Rx''' values should change, and a text added to the text area.</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>To test the connection, click the '''Read''' button. The '''Tx''' and '''Rx''' values should change, and a text added to the text area.</div></td></tr>
<tr><td colspan="2" class="diff-lineno">Line 310:</td>
<td colspan="2" class="diff-lineno">Line 309:</td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>* '''Init Kart''' button</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>* '''Init Kart''' button</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>** Will set the DC prescaler, stepper prescaler, and execute the restart sequence. '''Must be clicked first.'''</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>** Will set the DC prescaler, stepper prescaler, and execute the restart sequence. '''Must be clicked first.'''</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div>** <del class="diffchange diffchange-inline">You may need to modifiy </del>the <del class="diffchange diffchange-inline">[[Kart/serial_link#Control_Registers|'''CReg -> HW Control''']] register to correspond to </del>your <del class="diffchange diffchange-inline">Kart design</del>. <del class="diffchange diffchange-inline">Only change x in the following value: '''0b100xxx'''</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div>** <ins class="diffchange diffchange-inline">Answer </ins>the <ins class="diffchange diffchange-inline">4 prompts following </ins>your <ins class="diffchange diffchange-inline">hardware configuration</ins>.</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>* '''DC Motor''' button</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>* '''DC Motor''' button</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>** Will set the DC speed to full for 2s, quickly 0, then reversed full speed for 2s</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>** Will set the DC speed to full for 2s, quickly 0, then reversed full speed for 2s</div></td></tr>
</table>Axel.amandhttps://wiki.hevs.ch/fsi/index.php5?title=Kart/serial_link&diff=3127&oldid=prevAxel.amand: /* Kart init */2022-08-18T15:06:41Z<p><span class="autocomment">Kart init</span></p>
<table class='diff diff-contentalign-left'>
<col class='diff-marker' />
<col class='diff-content' />
<col class='diff-marker' />
<col class='diff-content' />
<tr valign='top'>
<td colspan='2' style="background-color: white; color:black;">← Older revision</td>
<td colspan='2' style="background-color: white; color:black;">Revision as of 15:06, 18 August 2022</td>
</tr><tr><td colspan="2" class="diff-lineno">Line 278:</td>
<td colspan="2" class="diff-lineno">Line 278:</td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>* Write '''DC Motor | Prescaler''' to '''31''' (around 21 kHz PWM frequency)</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>* Write '''DC Motor | Prescaler''' to '''31''' (around 21 kHz PWM frequency)</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>* Write '''Stepper Motor | Prescaler''' to '''400''' (250 Hz coil switching frequency)</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>* Write '''Stepper Motor | Prescaler''' to '''400''' (250 Hz coil switching frequency)</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div>* Write '''Control Registers | Hardware Control''' to restart the system <del class="diffchange diffchange-inline">while telling the BLE client is connected </del>(<del class="diffchange diffchange-inline">0b110xxx</del>)</div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins class="diffchange diffchange-inline">* Tell the smartphone is connected by writing '''Control Registers | BT status''' to 1</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div>* Write '''Control Registers | Hardware Control''' to restart the system (<ins class="diffchange diffchange-inline">0b10xxx</ins>)</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>** The stepper should turn until hitting the end switch, except if already on it</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>** The stepper should turn until hitting the end switch, except if already on it</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>* Read '''Stepper Motor | Stepper HW''' and check the last bit</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>* Read '''Stepper Motor | Stepper HW''' and check the last bit</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>** If is '1', it means we are already zeroed</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>** If is '1', it means we are already zeroed</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>** If not, wait for an event from this register to tell the reset is complete</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>** If not, wait for an event from this register to tell the reset is complete</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div>* Write '''Control Registers | Hardware Control''' to deassert the reset (<del class="diffchange diffchange-inline">0b100xxx</del>)</div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div>* Write '''Control Registers | Hardware Control''' to deassert the reset (<ins class="diffchange diffchange-inline">0b00xxx</ins>)</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>The Kart is now ready to function !</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>The Kart is now ready to function !</div></td></tr>
</table>Axel.amandhttps://wiki.hevs.ch/fsi/index.php5?title=Kart/serial_link&diff=3126&oldid=prevAxel.amand: /* Control Registers */2022-08-18T15:05:25Z<p><span class="autocomment">Control Registers</span></p>
<table class='diff diff-contentalign-left'>
<col class='diff-marker' />
<col class='diff-content' />
<col class='diff-marker' />
<col class='diff-content' />
<tr valign='top'>
<td colspan='2' style="background-color: white; color:black;">← Older revision</td>
<td colspan='2' style="background-color: white; color:black;">Revision as of 15:05, 18 August 2022</td>
</tr><tr><td colspan="2" class="diff-lineno">Line 240:</td>
<td colspan="2" class="diff-lineno">Line 240:</td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>Writing range : 0xE0 to 0xFF</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>Writing range : 0xE0 to 0xFF</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del style="color: red; font-weight: bold; text-decoration: none;">{{WarningBox|content=</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del style="color: red; font-weight: bold; text-decoration: none;">The control registers module is '''WRITE ONLY''' for now !</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del style="color: red; font-weight: bold; text-decoration: none;">}}</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>{| cellpadding="4" cellspacing="0" border="1"</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>{| cellpadding="4" cellspacing="0" border="1"</div></td></tr>
<tr><td colspan="2" class="diff-lineno">Line 250:</td>
<td colspan="2" class="diff-lineno">Line 247:</td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>! Description</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>! Description</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>! Direction</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>! Direction</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div>! <del class="diffchange diffchange-inline">Event</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div>! <ins class="diffchange diffchange-inline">Comment</ins></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>|-</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>|-</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>| 0</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>| 0</div></td></tr>
<tr><td colspan="2" class="diff-lineno">Line 263:</td>
<td colspan="2" class="diff-lineno">Line 260:</td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>Bit 4: restart the stepperMotor module, stops the DC motor while '1'</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>Bit 4: restart the stepperMotor module, stops the DC motor while '1'</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del style="color: red; font-weight: bold; text-decoration: none;"></del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del style="color: red; font-weight: bold; text-decoration: none;">Bit 5: when '1', the BLE connection has been established (otherwise, the Kart should not be able to move)</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>| Smartphone -> Kart</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>| Smartphone -> Kart</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>| The end sensor always defines angle 0. Angles are always positive numbers in registers.</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>| The end sensor always defines angle 0. Angles are always positive numbers in registers.</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>If bits 1 and 2 are different, the stepper motor phase sequence has to be inverted.</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>If bits 1 and 2 are different, the stepper motor phase sequence has to be inverted.</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>If the Bluetooth connection is lost, the DC motor has to be stopped.</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>If the Bluetooth connection is lost, the DC motor has to be stopped.</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del style="color: red; font-weight: bold; text-decoration: none;">|}</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del style="color: red; font-weight: bold; text-decoration: none;"></del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del style="color: red; font-weight: bold; text-decoration: none;"></del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del style="color: red; font-weight: bold; text-decoration: none;"></del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del style="color: red; font-weight: bold; text-decoration: none;"></del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del style="color: red; font-weight: bold; text-decoration: none;">==== Sequence control register ====</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del style="color: red; font-weight: bold; text-decoration: none;"></del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del style="color: red; font-weight: bold; text-decoration: none;">''The sequence control register is not yet re-implemented.</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del style="color: red; font-weight: bold; text-decoration: none;">The old behavior, kept for reference, is the following:''</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del style="color: red; font-weight: bold; text-decoration: none;"></del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del style="color: red; font-weight: bold; text-decoration: none;">The sequence control register is used to load a new sequence from start of memory as well as to start and stop a sequence.</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del style="color: red; font-weight: bold; text-decoration: none;"></del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del style="color: red; font-weight: bold; text-decoration: none;">{| cellpadding="4" cellspacing="0" border="1"</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del style="color: red; font-weight: bold; text-decoration: none;">! Bit</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del style="color: red; font-weight: bold; text-decoration: none;">! Meaning</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del style="color: red; font-weight: bold; text-decoration: none;">! Description</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del style="color: red; font-weight: bold; text-decoration: none;">|-</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del style="color: red; font-weight: bold; text-decoration: none;">| 0</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del style="color: red; font-weight: bold; text-decoration: none;">| Reset sequence</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del style="color: red; font-weight: bold; text-decoration: none;">| sets the sequence RAM write and read addresses back to 0</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>|-</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>|-</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>| 1</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>| 1</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div>| <del class="diffchange diffchange-inline">Run / stop</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div>| <ins class="diffchange diffchange-inline">BT Status</ins></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div>| <del class="diffchange diffchange-inline">starts or stops a sequence</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div>| <ins class="diffchange diffchange-inline">Vector1</ins></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div>|<del class="diffchange diffchange-inline">}</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div>| <ins class="diffchange diffchange-inline">Bit 0: when '0'</ins>, the <ins class="diffchange diffchange-inline">smartphone </ins>is <ins class="diffchange diffchange-inline">disconnected</ins></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div> </div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div>| <ins class="diffchange diffchange-inline">NRF </ins>-> <ins class="diffchange diffchange-inline">Kart</ins></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline">===== Sequence operations register =====</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins class="diffchange diffchange-inline">| </ins>The register is set <ins class="diffchange diffchange-inline">by </ins>the <ins class="diffchange diffchange-inline">NRF itself</ins>, <ins class="diffchange diffchange-inline">since it is </ins>not <ins class="diffchange diffchange-inline">possible </ins>to <ins class="diffchange diffchange-inline">foresee </ins>the <ins class="diffchange diffchange-inline">disconnection</ins>.</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div> </div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline">The sequence memory is made out of 16-bit controls and the sequence can range up to 2<sup>10</sup> operations.</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline">From the communication point of view</del>, the <del class="diffchange diffchange-inline">sequence memory </del>is <del class="diffchange diffchange-inline">seen as a FIFO&nbsp;:</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline">the sequence operations are pushed one after the other into the sequence register,</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline">starting at the first one of the list after the <code>reset sequence</code> bit</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline">has been set in the [[#Control register</del>|<del class="diffchange diffchange-inline">control register]]</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div> </div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline">The sequence operations are split into 2&nbsp;parts: a 4</del>-<del class="diffchange diffchange-inline">bit command and optional parameters.</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline">A sequence register has been defined in order to build loops:</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline">the <code</del>><del class="diffchange diffchange-inline">goto</code> operation is only carried out if the register is not zero.</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div>The register is <del class="diffchange diffchange-inline">initialised with all bits to&nbsp;'1'.</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div> </div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline">{| cellpadding="4" cellspacing="0" border="1"</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline">|</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline">! colspan = "2" | command</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline">! parameter</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline">| comment</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline">|-</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline">| Bits</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline">! colspan = "2" | 15 ÷ 12</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline">! 11 ÷ 0</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline">|</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline">|-</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline">| rowspan = "13" | || 0 || nop || ||</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline">|-</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline">| 1 || set speed || speed || </del>set the <del class="diffchange diffchange-inline">propulsion motor speed</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline">|-</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline">| 2 || set angle || angle || set the direction motor angle</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline">|-</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline">| 3 || drive LEDs || pattern || specify a given pattern for turning the LEDs on or off</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline">|-</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline">| 4 || set LEDs || mask || set bits from '1's of mask</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline">|-</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline">| 5 || clear LEDs || mask || clear bits from '1's of mask</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline">|-</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline">| 6 || blink LEDs || period</del>, <del class="diffchange diffchange-inline">mask || ''</del>not <del class="diffchange diffchange-inline">implemented yet''</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline">|-</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline">| 8 || run distance || hall ticks || run until the Hall counter has augmented by at least a given tick number</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline">|-</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline">| 9 || run for || milliseconds || run for a specified time span</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline">|-</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline">| A || run until || event || ''not implemented yet''</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline">|-</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline">| D || modify register || operation, operand || bits 11÷10 : 00 = set, 10 = add, 11 = sub / bits 9÷0 : operand</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline">|-</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline">| E || goto nz || address || jumps </del>to the <del class="diffchange diffchange-inline">specified sequence step as long as the register is not zero</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline">|-</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline">| F || end || || the sequence controller in the FPGA stops and the <code>running</code> status bit is cleared, announcing that the sequence is terminated</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline">|}</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div> </div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline">===== Sequence status register =====</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div> </div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline">The sequence status register tells what operation is currently active</del>.</div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div> </div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline">{| cellpadding="4" cellspacing="0" border="1"</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline">! Bit</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline">! Meaning</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline">! Description</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline">|-</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline">| 15 ÷ 12</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline">| Current command</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline">| indicates which command is currently being processed</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline">|-</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline">| 0</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline">| Running</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline">| indicates that a sequence is currently running</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>|}</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>|}</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr>
</table>Axel.amandhttps://wiki.hevs.ch/fsi/index.php5?title=Kart/serial_link&diff=3125&oldid=prevAxel.amand: /* Sensors */2022-08-18T15:03:20Z<p><span class="autocomment">Sensors</span></p>
<table class='diff diff-contentalign-left'>
<col class='diff-marker' />
<col class='diff-content' />
<col class='diff-marker' />
<col class='diff-content' />
<tr valign='top'>
<td colspan='2' style="background-color: white; color:black;">← Older revision</td>
<td colspan='2' style="background-color: white; color:black;">Revision as of 15:03, 18 August 2022</td>
</tr><tr><td colspan="2" class="diff-lineno">Line 196:</td>
<td colspan="2" class="diff-lineno">Line 196:</td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>| Battery voltage, U = register * 250*e-6 * 7.8 [V]</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>| Battery voltage, U = register * 250*e-6 * 7.8 [V]</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>| Kart -> Smartphone</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>| Kart -> Smartphone</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div>| When a delta of at least SENS_BATT_DELTA_MV (<del class="diffchange diffchange-inline">100</del>) from the last registered value happens</div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div>| When a delta of at least SENS_BATT_DELTA_MV (<ins class="diffchange diffchange-inline">50</ins>) from the last registered value happens</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>|-</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>|-</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>| 5</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>| 5</div></td></tr>
<tr><td colspan="2" class="diff-lineno">Line 211:</td>
<td colspan="2" class="diff-lineno">Line 211:</td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>Register zeroed if less than 152 mm (sensor min distance) or greater than 1500 mm (arbitrary max distance), event not sent in such case</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>Register zeroed if less than 152 mm (sensor min distance) or greater than 1500 mm (arbitrary max distance), event not sent in such case</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>| Kart -> Smartphone</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>| Kart -> Smartphone</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div>| When a delta of at least SENS_RANGEFNDR_MM (<del class="diffchange diffchange-inline">100</del>) from the last registered value happens</div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div>| When a delta of at least SENS_RANGEFNDR_MM (<ins class="diffchange diffchange-inline">60</ins>) from the last registered value happens</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>|-</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>|-</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>| 7</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>| 7</div></td></tr>
<tr><td colspan="2" class="diff-lineno">Line 232:</td>
<td colspan="2" class="diff-lineno">Line 232:</td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>| ''See Hall1''</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>| ''See Hall1''</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>| Kart -> Smartphone</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>| Kart -> Smartphone</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div>| <del class="diffchange diffchange-inline">''See Hall1''</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div>| <ins class="diffchange diffchange-inline">Each 101 ms if value changed from last time</ins></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>|}</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>|}</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr>
</table>Axel.amandhttps://wiki.hevs.ch/fsi/index.php5?title=Kart/serial_link&diff=3124&oldid=prevAxel.amand: /* Stepper Motor */2022-08-18T15:01:43Z<p><span class="autocomment">Stepper Motor</span></p>
<table class='diff diff-contentalign-left'>
<col class='diff-marker' />
<col class='diff-content' />
<col class='diff-marker' />
<col class='diff-content' />
<tr valign='top'>
<td colspan='2' style="background-color: white; color:black;">← Older revision</td>
<td colspan='2' style="background-color: white; color:black;">Revision as of 15:01, 18 August 2022</td>
</tr><tr><td colspan="2" class="diff-lineno">Line 142:</td>
<td colspan="2" class="diff-lineno">Line 142:</td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>| Actual steering angle, in motor steps (0 = end switch)</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>| Actual steering angle, in motor steps (0 = end switch)</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>| Kart -> Smartphone</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>| Kart -> Smartphone</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div>| When a delta of at least STP_ANGLE_DELTA_DEG (<del class="diffchange diffchange-inline">10°</del>) from the last registered value happens</div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div>| When a delta of at least STP_ANGLE_DELTA_DEG (<ins class="diffchange diffchange-inline">3°</ins>) from the last registered value happens</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>|-</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>|-</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>| 3</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>| 3</div></td></tr>
</table>Axel.amandhttps://wiki.hevs.ch/fsi/index.php5?title=Kart/serial_link&diff=3123&oldid=prevAxel.amand: /* Message Format */2022-08-18T15:00:24Z<p><span class="autocomment">Message Format</span></p>
<table class='diff diff-contentalign-left'>
<col class='diff-marker' />
<col class='diff-content' />
<col class='diff-marker' />
<col class='diff-content' />
<tr valign='top'>
<td colspan='2' style="background-color: white; color:black;">← Older revision</td>
<td colspan='2' style="background-color: white; color:black;">Revision as of 15:00, 18 August 2022</td>
</tr><tr><td colspan="2" class="diff-lineno">Line 42:</td>
<td colspan="2" class="diff-lineno">Line 42:</td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>** The FPGA will '''respond to a request''' with the exact same address when W = '0'</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>** The FPGA will '''respond to a request''' with the exact same address when W = '0'</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>** The FPGA will '''save incoming data in the targeted register''' when W = '1'</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>** The FPGA will '''save incoming data in the targeted register''' when W = '1'</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div>** The FPGA will '''send data on predefined events''' with the W bit set to '<del class="diffchange diffchange-inline">1</del>'</div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div>** The FPGA will '''send data on predefined events''' with the W bit set to '<ins class="diffchange diffchange-inline">0</ins>'</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>* RRRRR : targeted register</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>* RRRRR : targeted register</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr>
<tr><td colspan="2" class="diff-lineno">Line 61:</td>
<td colspan="2" class="diff-lineno">Line 61:</td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>| 0x74</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>| 0x74</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>|}</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>|}</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del style="color: red; font-weight: bold; text-decoration: none;"></del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del style="color: red; font-weight: bold; text-decoration: none;"></del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del style="color: red; font-weight: bold; text-decoration: none;">When the stepper end switch is pressed, imagining that the desired position is reached in the meantime, the FPGA will send the following:</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del style="color: red; font-weight: bold; text-decoration: none;">{| cellpadding="8" cellspacing="0" border="1"</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del style="color: red; font-weight: bold; text-decoration: none;">! SoF (1 byte)</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del style="color: red; font-weight: bold; text-decoration: none;">! Address (1 byte)</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del style="color: red; font-weight: bold; text-decoration: none;">! Data High (1 byte)</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del style="color: red; font-weight: bold; text-decoration: none;">! Data Low (1 byte)</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del style="color: red; font-weight: bold; text-decoration: none;">! EoF (1 byte)</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del style="color: red; font-weight: bold; text-decoration: none;">|-</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del style="color: red; font-weight: bold; text-decoration: none;">| 0xAA</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del style="color: red; font-weight: bold; text-decoration: none;">| 0b01100011</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del style="color: red; font-weight: bold; text-decoration: none;">| 0b00000000</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del style="color: red; font-weight: bold; text-decoration: none;">| 0b00000011</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del style="color: red; font-weight: bold; text-decoration: none;">| 0x47</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del style="color: red; font-weight: bold; text-decoration: none;">|}</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del style="color: red; font-weight: bold; text-decoration: none;"></del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>If the BLE module wants to read the current battery voltage, supposing we have 4 LEDs, the frame is such as:</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>If the BLE module wants to read the current battery voltage, supposing we have 4 LEDs, the frame is such as:</div></td></tr>
<tr><td colspan="2" class="diff-lineno">Line 93:</td>
<td colspan="2" class="diff-lineno">Line 76:</td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>| CRC</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>| CRC</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>|}</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>|}</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del style="color: red; font-weight: bold; text-decoration: none;">The FPGA will then respond with something like (for a 11.998V reading):</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del style="color: red; font-weight: bold; text-decoration: none;">{| cellpadding="8" cellspacing="0" border="1"</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del style="color: red; font-weight: bold; text-decoration: none;">! SoF (1 byte)</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del style="color: red; font-weight: bold; text-decoration: none;">! Address (1 byte)</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del style="color: red; font-weight: bold; text-decoration: none;">! Data High (1 byte)</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del style="color: red; font-weight: bold; text-decoration: none;">! Data Low (1 byte)</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del style="color: red; font-weight: bold; text-decoration: none;">! EoF (1 byte)</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del style="color: red; font-weight: bold; text-decoration: none;">|-</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del style="color: red; font-weight: bold; text-decoration: none;">| 0xAA</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del style="color: red; font-weight: bold; text-decoration: none;">| 0b10000101</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del style="color: red; font-weight: bold; text-decoration: none;">| 0x18</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del style="color: red; font-weight: bold; text-decoration: none;">| 0x09</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del style="color: red; font-weight: bold; text-decoration: none;">| 0x3D</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del style="color: red; font-weight: bold; text-decoration: none;">|}</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del style="color: red; font-weight: bold; text-decoration: none;"></del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>== Registers ==</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>== Registers ==</div></td></tr>
</table>Axel.amand