Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
7 years, 7 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
7 years, 7 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/
https://developer.mbed.org/teams/BBC/code/microbit_blinky/file/025387782f3e/main.cpp