Contents: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
(One intermediate revision by the same user not shown) | |||
Line 2: | Line 2: | ||
* [[About the book]]. | * [[About the book]]. | ||
* [[Copyright notice]] and disclaimer. | |||
==Part 1: Machine code programming== | ==Part 1: Machine code programming== | ||
<ul> | |||
<li>[[Introducing the microbit|Introducing the {{microbit}}]] | |||
{{PartOne|ExptLink}} | {{PartOne|ExptLink}} | ||
</ul> | |||
==Part 2: Input/output devices== | ==Part 2: Input/output devices== | ||
<ul> | |||
{{PartTwo|ExptLink}} | {{PartTwo|ExptLink}} | ||
</ul> | |||
==Part 3: An embedded operating system== | ==Part 3: An embedded operating system== | ||
<ul> | |||
<li>[[Introducing microbian|Introducing {{microbian}}]] | |||
{{PartThree|ExptLink}} | {{PartThree|ExptLink}} | ||
</ul> | |||
==Bonus programs== | ==Bonus programs== | ||
<ul> | |||
{{PartFour|ExptLink}} | {{PartFour|ExptLink}} | ||
</ul> | |||
==Online resources== | ==Online resources== |
Latest revision as of 14:14, 27 January 2025
Listed here are all the experiments and the supporting material that are planned for the book. Each experiment is described in a separate chapter that is linked from this page: the blue links are ready to follow now, and the red links lead to experiments to be added in the future. At the end of this page are links to supporting pages that cover the hardware you will need, how to set up the software tools you will use to program it, and definitive documentation for the micro:bit board. After you have set up software and hardware, you are ready to begin Experiment 1, an easy task where you compile and upload a simple C program to check that everything is working properly.
- About the book.
- Copyright notice and disclaimer.
Part 1: Machine code programming
- Introducing the micro:bit
- Experiment 1 – Building a program. Check you can build and upload a simple program.
- Experiment 2 – Machine instructions. Investigate the effect of single machine instructions using an interactive program.
- Experiment 3 – Loops. Write programs for multiplication and division that contain loops.
- Experiment 4 – Numbers. Explore number representations and conditional branches.
- Experiment 5 – Subroutines. Learn how to define and call subroutines to give structure to a larger program.
- Experiment 6 – Memory and arrays. Exploit instructions that load and store data in RAM.
- Experiment 7 – A buffer overrun attack. Build a working (but harmless) model of a computer virus.
Part 2: Input/output devices
- Experiment 8 – Digital input/output. Use device registers to control I/O pins and light LEDs.
- Experiment 9 – Pure assembly language. Flash an LED with a minimal program written in assembly language.
- Experiment 10 – Serial communication. Use a serial device to transmit characters.
- Experiment 11 – Interrupts for I/O. Control the serial device with interrupts to free the processor.
- Experiment 12 – Interrupt mechanism. Plot gaps in a waveform to measure the time needed to handle interrupts.
- Experiment 13 – Neopixels. Use assembly language to make a bit-banged implementation of the protocol for WS2812 'NeoPixel' LEDs.
Part 3: An embedded operating system
- Introducing micro:bian
- Experiment 14 – Processes. Use micro:bian processes to perform multiple tasks concurrently.
- Experiment 15 – Messages. Use messages to communicate between processes.
- Experiment 16 – Synchronisation. Synchronise the actions of multiple processes by making them exchange messages.
- Experiment 17 – Device drivers. Manage I/O devices using driver processes that receive interrupts as messages.
- Experiment 18 – I2C-based spirit level. Access the micro:bit accelerometer over the I2C bus to make a 2D spirit level.
- Experiment 19 – Servo motors. Use a timer to generate the signals needed to control servo motors.
- Experiment 20 – Radio. Communicate between multiple micro:bits using the in-built radio.
- Experiment 21 – Remote-controlled car. Use servos and radio to make a remote-controlled car.
Bonus programs
- Experiment 31 – Analog to digital converter. A device driver for the analog to digital converter.
- Experiment 32 – Infrared remote control. A program that uses GPIO interrupts to decode signals from an infrared remote control.
- Experiment 33 – Neopixel clock. Software for a Neopixel-based clock.
Online resources
- Appendix A – Hardware setup.
- Appendix B – Software setup.
- Appendix C – A brief guide to C.
- Appendix D – Thumb code reference.
- Appendix E – Microbian reference.
- The micro:bit page.
Copyright © 2019–24 J. M. Spivey. All rights reserved.