6 years, 11 months ago.

Referencing the pins associated with LED matrix on BBC microbit

The microsoft blinky program works fine. But I don't understand even this basic program. Specifically, how the 0,0 LED is blinked,. What does p0_13 mean? Why does the microbit have COL 8 and 9 for a 5x5 matrix? Why are P0_4 held at ground? I realise that these are more microbit than mbed questions but somebody at mbed wrote this as an example program.

Thanks in advance for any help received.

Gerry

1 Answer

6 years, 11 months ago.

Best to download and review the schematics for this circuit board. In summary, to light up the LED, you must make that LED's cathode (negative leg) go to ground (ie. output a zero = "0") and make the anode (plus leg of the LED) go to a logic high ("1).

Cathode on this LED = P0_4 which means port 0.4 of the CPU is LOW.

Anode on this LED = P0_13 which means port 0.13 of the CPU is HIGH.

With this combination, the LED will be ON, else OFF.

As noted in the BBC documentation, the matrix is laid out like a 5x5 format but the LEDs are wired up differently:

http://tech.microbit.org/hardware/schematic/

http://www.iot-programmer.com/index.php/books/27-micro-bit-iot-in-c/chapters-micro-bit-iot-in-c/54-micro-bit-iot-in-c-the-led-display

https://developer.mbed.org/teams/BBC/code/microbit_blinky/file/025387782f3e/main.cpp

Thanks, Sanjiv for your answer and for the reference to the microbit schematic.

posted by Alan Beamish 13 May 2017