Programming-Project
Ultibo / Lazarus / Free Pascal
of Ronald Daleske

Example 03 - using GPIO with low level units and ultibo core


In these very simple example we are switching 3 leds on and off.


Scheme of connecting the 3 leds to the connector of the RaspberryPI.


Test PCB with RaspberryPI A+ and 3 leds.


Example switching LEDs for RaspberryPI (A, B, A+, B+): RPI_switching_leds.zip

Example switching LEDs for RaspberryPI 2: RPI2_switching_leds.zip


Description of the unit "PReg.pas" (peripheral register)

The unit "PReg.pas" ist a low level basic unit to read and write the peripheral register of the RaspberryPI. The two procedures based on the ultibo core unit "Platform.pas".

URL:https://github.com/ultibohub/Core

The list of constants are based of the "R_PI.INC" on the folowing Project:

RaspberryPi ===========
Raspberry Pi & Raspberry Pi 2 Bare Metal Code by krom (Peter Lemon).

All code compiles out of box with the FASMARM assembler by revolution:
http://arm.flatassembler.net
I have included binaries of all the demos.

URL:https://github.com/PeterLemon/RaspberryPi


Description of the unit "RGPIO.pas" (GPIO read and write)

The unit "RGPIO.pas" is the next level and build up the unit "PReg.pas". With this unit can be: