Related to the the forum.
Posts: 1388
Joined: Thu Dec 19, 2019 5:30 am
Answers: 18


Post by ag123 »

I've released (yet another) implementation of Adafruit ILI9341 SPI lcd library. I've attempted a 'multi-core' (STM official, steve's libmaple (F4) (also in roger's core F4), and roger's (F1) libmaple) implementation

full story in this thread
User avatar
Posts: 1433
Joined: Wed Dec 11, 2019 7:11 pm
Answers: 73
Location: Le Mans


Post by fpiSTM »

Thanks for sharing @ag123. Nice work. :!:
Posts: 37
Joined: Fri Jun 11, 2021 3:40 am


Post by jacobli »

You need a LCD what can show graphics in real time, I think it may be possible to use either LCD, the process should be implemented by the MCU, LCD is to provide a display function.
If you have a better choice please let me know, I'm also going to buy an LCD for a display project.
Posts: 1388
Joined: Thu Dec 19, 2019 5:30 am
Answers: 18


Post by ag123 »

if you'd like for lcds there are 'many' (at least many different sku's that are known to work)
a search on adafruit alone turns up many of them

then on ebay/ aliexpress and the likes are like st7735 128×160 ... ext=st7735
that old fav 'nokia 5110 lcd' 84x48 pixels ... a+5110+lcd
then the i2c oled ones are popular (128x32, 128x64) ... t=i2c+oled
my only grudge about i2c ones is many of then has a fixed i2c address (if you try to place 2 on the same bus you hit a bummer) and that they tend to be slower limited by the 400khz speeds.
however, they are nice / small and requires just 4 pins vcc / gnd / clk / data to work.
for the i2c address issue, one hack i'd guess is to try to multiplex either the data or clock lines using a multiplexer chip such as 74hc4051 ... CT4051.pdf
that makes it possible to patch like 8 displays on a single i2c and at the same address. you would need 3 more lines to work the multiplexer.

my 'old' favourite is ili9341 *spi* (interface) 240 x 320 ... li9341+spi
if you search youtube you would see many featured for stm32f103 comparing that to uno and the various projects
i think spi is still the 'goto' interface as it gives a good balance of speeds (decently fast for qvga) and lower pin counts.
and earlier on ili9341 seem to be the ones offering slightly larger screen sizes e.g. 2.4, 2.8 inch.
and i think i wanted it for that slightly more *pixels*, they are tad pricy though
i used to see a lot of st7735 offered in 1.4 inch sizes, a little too compact to read a distance away i'd guess
these days there seem to be more st7735 around with bigger sizes as well

there are more libraries if you search in this section of the forum

and one thing to note, displays don't necessarily 'work out of the box', with libraries you pounced on on the web.
the more 'common' ones are like those from adafruit, ideally if you buy from them you would possibly post in their forums to seek help in case.
2 comments above there is a 'ported' one, it is basically a fork of adafruit ili9341 library. < the original one works as well)
just that i made mine work on stm32duino(s) and only for spi interface

there are more libtaries if you search in this section of this section of this forum
Posts: 2
Joined: Mon Sep 13, 2021 7:21 pm


Post by eltonwisk »

If you pair that with a Raspberry Pi over usb, i'd guess you can even plot that data on a big computer monitor.
If you need more accurate timings, that can be achieved with a hardware timer. u'd need to read up on that e.g. in the wiki and examples.
I have done something that way by hooking a h/w timer interrupt to fire at regular intervals. so that i've about 300 samples per sec, Arduino api as above is adequate at those speeds.
Posts: 26
Joined: Tue Jan 07, 2020 9:50 pm
Answers: 1


Post by TFTLCDCyg »

Recalling the initial post, creating an EEG implies you draw several simultaneous lines 5, 6 or 7. The simplest graph is solved by drawing one screen at a time, starting on the left and ending on the right and erasing at the end what you have drawn overwriting again from left to right.

The displacement of the complete lines, as in the traditional EEG graphs, is a more complicated issue, the conventional libraries are very limited with the handling of the pixels, you would have to create a function that draws only those pixels that have changed.

They are designed to present one graphic representation at a time, for the next one to occur, you have to clear the entire previous screen. The ideal would be to only be able to delete those pixels that have changed, for this you need to have a great ability with the C language to design a complex function that does not consume too many resources from the MCU. This function must have two parts, the first that draws the current pixels and the second that must replace the previous pixels with the background color. It seems simple, but it involves using the full capacity of the MCU.

Some time ago he experimented with this type of graphics in a TFT ST7735 of 128x160 pixels with apparently good results:

ST7735 + Teensy 4

ILI9325C + Arduino due
Post Reply

Return to “Ideas & suggestions”