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.
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>A | B | C | D | E | F | G | H | I | J | |
---|---|---|---|---|---|---|---|---|---|---|
1 | Tranmission | Content | ||||||||
2 | Clock (Hz) | Clock (ms) | Tx Time (s) | Tx Speed (bps) | Length (bits) | Length (bytes) | Length (bits) | Length (bytes) | Efficiency | Notes |
3 | 8 | 125 | 17.13 | 8.41 | 144 | 18 | 128 | 16 | 88.89% | Sounds on |
4 | 16 | 63 | 8.84 | 16.30 | 144 | 18 | 128 | 16 | 88.89% | Sounds on |
5 | 32 | 31 | 4.42 | 32.58 | 144 | 18 | 128 | 16 | 88.89% | Sounds on |
6 | 64 | 16 | 2.21 | 65.25 | 144 | 18 | 128 | 16 | 88.89% | Sounds on |
7 | 128 | 8 | 1.10 | 130.55 | 144 | 18 | 128 | 16 | 88.89% | Sounds on |
8 | 256 | 4 | 1.10 | 130.67 | 144 | 18 | 128 | 16 | 88.89% | Sounds make no difference to speed |
Useful resources
Disclaimer
If you electrocute yourself, that's your own fault.