adamkdean / microbit-wire-comms

Experimental wire-based comms

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

microbit-wire-comms

Experimental wire-based comms.

To-do

  • serial clock
  • master -> slave comms
  • slave -> master comms

Protocol

Protocol v1:

  • start of text (0x02)
  • content
  • end of text (0x03)

+------+---------+------+ | 0x02 | content | 0x03 | +------+---------+------+

Hardware

The BBC Micro:bit v2 has a Nordic nRF52833 Core variant Arm Cortex-M4 32 bit processor with FPU at 64 MHz.

Microbit v2

Results

Speed results. Max throughput on BBC Microbit seems to be limited to 4 ms loop interval, and processing time, leading to a max throughput using Static TypeScript of 130.55 bps.

<style type="text/css">.column-headers-background,.row-headers-background{background:#eee;}.ritz .waffle a { color: inherit; }.ritz .waffle .s3{background-color:#ffffff;text-align:right;color:#000000;font-family:'Arial';font-size:10pt;vertical-align:bottom;white-space:nowrap;direction:ltr;padding:2px 3px 2px 3px;}.ritz .waffle .s0{background-color:#ffffff;text-align:left;color:#000000;font-family:'Arial';font-size:9pt;vertical-align:bottom;white-space:nowrap;direction:ltr;padding:2px 3px 2px 3px;}.ritz .waffle .s2{background-color:#ffffff;text-align:left;font-weight:bold;color:#000000;font-family:'Arial';font-size:9pt;vertical-align:bottom;white-space:nowrap;direction:ltr;padding:2px 3px 2px 3px;}.ritz .waffle .s1{background-color:#ffffff;text-align:center;font-weight:bold;color:#000000;font-family:'Arial';font-size:9pt;vertical-align:bottom;white-space:nowrap;direction:ltr;padding:2px 3px 2px 3px;}.ritz .waffle .s4{background-color:#ffffff;text-align:left;color:#000000;font-family:'Arial';font-size:10pt;vertical-align:bottom;white-space:nowrap;direction:ltr;padding:2px 3px 2px 3px;}</style>
ABCDEFGHIJ
1
TranmissionContent
2
Clock (Hz)
Clock (ms)
Tx Time (s)
Tx Speed (bps)
Length (bits)
Length (bytes)
Length (bits)
Length (bytes)
EfficiencyNotes
3
812517.138.41144181281688.89%Sounds on
4
16638.8416.30144181281688.89%Sounds on
5
32314.4232.58144181281688.89%Sounds on
6
64162.2165.25144181281688.89%Sounds on
7
12881.10130.55144181281688.89%Sounds on
8
25641.10130.67144181281688.89%Sounds make no difference to speed

Useful resources

enums.d.ts

Disclaimer

If you electrocute yourself, that's your own fault.

About

Experimental wire-based comms


Languages

Language:TypeScript 100.0%