Difference between revisions of "Bare Metal micro:bit"

From Bare Metal micro:bit
Jump to: navigation, search
(Twenty experiments in low-level programming)
Line 9: Line 9:
 
[[Image:cover.png|400px|thumb|right|Front cover]]
 
[[Image:cover.png|400px|thumb|right|Front cover]]
  
==Front matter==
+
==Part 1: Machine code programming==
 +
The first third of the book is about programming at the machine level: instructions, how they are implemented by a computer, and how they can be combined to carry put familiar programming tasks.
  
==Part 1: Machine code programming==
 
 
* [[Introducing the microbit|Introducing the {{microbit}}]].
 
* [[Introducing the microbit|Introducing the {{microbit}}]].
 
* {{Exp|X1000|Building a program|Check you can build and upload a simple program (written in pure C) that echoes lines typed on the terminal}}
 
* {{Exp|X1000|Building a program|Check you can build and upload a simple program (written in pure C) that echoes lines typed on the terminal}}
Line 17: Line 17:
  
 
==Part 2: Input/output devices==
 
==Part 2: Input/output devices==
 +
This part of the book is about programming I/O devices: how input and output happens by reading and writing device registers, and how we can use interrupts to make the computer respond to events.
 +
 
* {{Exp|X2400|Neopixels|Use assembly language to make a bit-banged implementation of the protocol for WS2812 'NeoPixel' LEDs}}
 
* {{Exp|X2400|Neopixels|Use assembly language to make a bit-banged implementation of the protocol for WS2812 'NeoPixel' LEDs}}
  
 
==Part 3: Embedded operating system==
 
==Part 3: Embedded operating system==
 +
The last third of the book introduces {{microbian}}, a tiny embedded operating system based on message passing, and uses it to organise programs that contain multiple processes interleaved with each other.
  
 
==Appendices==
 
==Appendices==

Revision as of 15:36, 6 November 2020

Twenty experiments in low-level programming

This book describes a series of experiments in programming the BBC micro:bit at a low level.

Chapters will appear one-by-one in coming weeks, starting with some experiments with programming the micro:bit in machine code. If you want to follow along as the book grows, you should get a micro:bit and either a Raspberry Pi or a Linux laptop, and begin with the appendices about hardware and software setup. The hardware setup instructions include some modifications to the micro:bit that will come in handy later, but you don't have to do them before beginning with the first experiment.

Feedback is very welcome, and you can send me e-mail to spivoxity@gmail.com, or raise issues on the github page if you prefer: https://github.com/Spivoxity/baremetal.

Front cover

Part 1: Machine code programming

The first third of the book is about programming at the machine level: instructions, how they are implemented by a computer, and how they can be combined to carry put familiar programming tasks.

Part 2: Input/output devices

This part of the book is about programming I/O devices: how input and output happens by reading and writing device registers, and how we can use interrupts to make the computer respond to events.

  • X2400 – Neopixels. Use assembly language to make a bit-banged implementation of the protocol for WS2812 'NeoPixel' LEDs.

Part 3: Embedded operating system

The last third of the book introduces micro:bian, a tiny embedded operating system based on message passing, and uses it to organise programs that contain multiple processes interleaved with each other.

Appendices

Web only



Copyright © 2019–21 J. M. Spivey. All rights reserved.