The Linux driver ledpanel.c

All the rgb led panel are generate in bit banging mode using normal GPIO lines. To go as fast as possible a Linux driver written in C code is required.

The driver I wrote can update the whole panel contents 679 times per second leaving enough time to Linux to do other jobs in the meanwhile.

The main routine of this driver is a callback function called by a hrtimer 10800 times per second at interval of 92uS.

In just 22uS this routine check the brightness of each color and send a simulated pwm signal to any led (32 x 3 color = 96) on a single row then exit. It will be called again by the Kernel after 66uS.

The fully source code of this driver is available under GPL licence on GitHub: ledpanel source on GitHub

How the driver works

Compile and install ledpanel.c

To compile ledpanel.c it is requested a Linux Ubuntu PC on where install the cross compiler toolchain and Linux Kernel sources:

During the make menuconfg be sure to enable the High Resolution Timer Support:

General setup  --->
    Timers subsystem  --->
        [*] High Resolution Timer Support  

Clone the GitHub repository on your Linux PC:

$ git clone git://github.com/tanzilli/ledpanel.git
$ cd ledpanel
~/ledpanel$

Compile the module by typing:

~/ledpanel$ make -C ~/arietta/linux-4.1.10 ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- M=`pwd` modules

and copy in inside Arietta G25

~/ledpanel$ sshpass -p acmesystems scp ledpanel.ko root@192.168.10.10:/root

Open a command session on Arietta and load the Kernel module:

root@arietta:~# insmod ledpanel.ko

Now you can try some example to show something on the display.