4Dsystem display library

This forum is about you. Feel free to discuss anything is related to embedded and electronics, your awesome projects, your ideas, your announcements, not necessarily related to ChibiOS but to embedded in general. This forum is NOT for support.
User avatar
alex31
Posts: 374
Joined: Fri May 25, 2012 10:23 am
Location: toulouse, france
Has thanked: 38 times
Been thanked: 61 times
Contact:

4Dsystem display library

Postby alex31 » Wed Jan 26, 2022 9:15 am

Hello,

We use 4DSystem serial display, mainly for educational purpose.
There is a vast family of these, with 3 types of processor (goldelox, picaso, diablo16), oled or lcd, in many dimension, touch enabled or not.

Each family has his own command set, so we made a library to abstract the processor type, and made portage between family easier.

First job was to list all functions for all families, which is resumed in the csv file https://github.com/alex31/chibios_enac_various_common/blob/master/TOOLS/fonctions%204dsystem%20SPE.csv

Then, a script https://github.com/alex31/chibios_enac_various_common/blob/master/TOOLS/gen4DSysLib.pl generates the low level library : files display4DS_ll.c/h.

A higher level library, which use the low level one, is also provided : display4DS.c/h.

Theses library can use serial or uart driver, choice has to be done at compile time. When graphic primitives or bitmap are sent, using uart (dma) driver save mcu cycles.

All can be find in this repository https://github.com/alex31/chibios_enac_various_common/ (which is a big mess ...) in the display4DS* files.

If you plan to use 4D system screen, this project can be a help for you at different level : You can use the csv file if you plan to write your own code generator, you can use the csv file and modify the code generator for your own use, you can only use the low level stuff, or use the code as is.

I can send example of use if needed.

Alexandre

User avatar
Giovanni
Site Admin
Posts: 14444
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1074 times
Been thanked: 921 times
Contact:

Re: 4Dsystem display library

Postby Giovanni » Wed Jan 26, 2022 7:26 pm

Hi Alex,

If you want you can post full examples or snippets, thanks for sharing.

Giovanni

User avatar
alex31
Posts: 374
Joined: Fri May 25, 2012 10:23 am
Location: toulouse, france
Has thanked: 38 times
Been thanked: 61 times
Contact:

Re: 4Dsystem display library

Postby alex31 » Thu Jan 27, 2022 11:39 am

Hi, Giovanni,

You are right : let's start with a simple example, 95% of the time we just output text on these screen, but we also have students who made complete gui with button, menu, tabs, etc.

A project will begin soon with students to design a CO2 room detector, fusionning data from NDIR and MoX sensor, and displaying on a large screen current Co2, level, histogram, alarms, etc.

That is a minimal example which show how it works using the small oled display fitted on our pedagogical devboard.

Code: Select all

 FdsConfig fds;
 // initialize the screen
 fdsStart(&fds, &SD6, 115200, LINE_C13_RESET_OLED, GOLDELOX);
 
 fdsPrintFmt(&fds,
         "\en  embedded\en"
         "  world\en"
         "  would be\en"
         "  boring\en"
         "  without\en");
  txt_fgColour(&fds, fds_colorDecTo16b(100, 0, 0), NULL);
  fdsPrintFmt(&fds,
         "  ChibiOS"
         );
  gfx_rectangle(&fds, 0, 0, 95, 63, fds_colorDecTo16b(0, 0, 100));
 



link to result :
https://photos.app.goo.gl/nt6t9MJUndV11r7E8

the fdsxxx functions are in the high level API, the txt_xxx, gfx_xxx etc API are in the low level API and the names are 1:1 the one found in the 4DSystem reference manual.

Alexandre

fOrisca
Posts: 1
Joined: Thu Feb 17, 2022 11:05 am
Location: NYC USA

Re: 4Dsystem display library

Postby fOrisca » Thu Feb 17, 2022 11:10 am

It's a great result.


Return to “User Projects”

Who is online

Users browsing this forum: No registered users and 1 guest