ARM Embedded Tutorial - FPC and the Raspberry Pi Pico
English (en) │
The Raspberry Pi Foundation has released the Raspberry Pi Pico, a very cheap Microcontroller board with quite interesting specs.
More Details here:
To best use this tutorial you will need to buy (at least) two Raspberry Pi Pico, we will use one as a target and the second one as a debug probe. Do yourself a favour, invest $4 for a second device, being able to debug is worth so much more.
As the Pico is brand new and support for the board is a work in progress I'd recommend that you set up a dedicated installation of Lazarus and Free Pascal as you will need to use both trunk version of Lazarus and a specially patched version of FPC that includes the necessary adjustments so that FPC knows about the Pico. Also expect changes as we all learn along the way.
To install the required versions of Lazarus and Free Pascal please see here:
To prepare a PicoProbe and to setup Lazarus please follow this guide:
To access the examples together with all needed dependencies clone this repository:
when you find errors in the code or would like to request another demo please enter an issue on github:
Now we are ready for our first Program, as practice in the embedded programming world we start with blinking the on-board LED:
The next step in this tutorial is to set up Debugging from within Lazarus
The next peripheral to join the party is the UART:
Time to go Analog:
Scanning the I2C Bus for Devices:
Talking to a Display via I2C:
Talking to a Display via SPI:
This page is WIP, I received my Boards on 29.01.2021, upgrading it as I go....