Note

Following a national ballot, the union, UCU, that represents staff in the higher education sector has called a strike on three days in late November, and also "action short of a strike" during a period that starts on Wednesday, 23 November. During this period, colleagues are invited to take various actions, including abstaining from voluntary activities. I view the maintenance of Spivey's Corner as an activity I undertake voluntarily and not part of any contract of employment, and I cannot guarantee that it will remain accessible during the period of the dispute. In addition, some materials on the site may pertain to lectures that are cancelled by myself or others as part of the strike, and we are asked not to make them available online. Further details of the reasons for the strike and how it affects teaching in Oxford are on a brief FAQ page.

Programming the micro:bit

From Digital Systems
Jump to navigation Jump to search

We will program the micro:bit on the 'bare metal', allowing us to see (and requiring us to understand) everything about how the hardware works. If we only want to implement an application, then there's no need to tangle with these low-level details.

  • MBED and C++.
    • MBED brings together a lot of things: every MBED device can be programmed by copying files to a simulated disk drive, and there is an online C++ compiler that can generate an object file suitable for each device.
    • From a programming point of view, MBED provides a hardware abstraction layer that hides the details of the I/O system on each microcontroller behind a uniform interface. There's a layer written in C that manipulates the device registers, and around that are wrappers in C++ that follow the idiom that declaring an instance of a class also initialises the attached hardware.
  • Lancaster runtime: provides threads and an event system.
  • Languages on top: Micropython, Blocks, Javascript.
  • Arduino IDE (also effectively C++) with Adafruit libraries.

micro:bian gives us the possibility of building applications as families of interacting lightweight processes.