How many fps can I expect if I use a 128x64 display and a blue pill?

Post here first, or if you can't find a relevant section!
Tobo
Posts: 11
Joined: Sat Oct 22, 2016 6:32 am

How many fps can I expect if I use a 128x64 display and a blue pill?

Post by Tobo » Thu Feb 01, 2018 10:13 pm

Hello everyone!

I'm working on a dashboard for a motorbike, I'm planning to use a blue pill to read the data I need from CAN-BUS and a 128x64 graphic display. Other than this basic setup I might use some LEDs and maybe a couple of buttons, nothing else.

In your opinion how many frames per second can I expect on my display with this setup?

Thanks in advance for your help!

p.s. I thought to use a LCD 128x64 LCD "dots" display because I need it to be clearly visible even in sunlight, but do you think that other (maybe bigger) displays could be better?

User avatar
mrburnette
Posts: 2190
Joined: Mon Apr 27, 2015 12:50 pm
Location: Greater Atlanta
Contact:

Re: How many fps can I expect if I use a 128x64 display and a blue pill?

Post by mrburnette » Thu Feb 01, 2018 10:35 pm

Which one?
https://www.google.com/search?q=LCD+128x64

Performance will be determined by the graphics library and how (if) the display is buffered, the protocol used, and what else the uC must do, such as retrieving and parsing the CAN bus.

Frames needs to be put into context... if you buffer the display pixels, send only changes, use DMA if supported.... my iCrystalBall is in Apple's repair center for a new LiON battery...



Ray

Tobo
Posts: 11
Joined: Sat Oct 22, 2016 6:32 am

Re: How many fps can I expect if I use a 128x64 display and a blue pill?

Post by Tobo » Fri Feb 02, 2018 9:26 pm

This one!

Image

Thank you for your answer, you are right, there are many variables to consider, It's a pity that your iCrystalBall had battery issues :lol: :lol:

Well, instead of asking dumb questions I'll ask something useful for the project ;)

Could you tell me the name of some good library to manage the display, and something more about DMA? I never used a micro with DMA, I know what it is and that STM32F103 has it, but I don't know how it could help me. I think at my firmware this way:

I need to manage 3 things: CAN, Display and GPIO.

I'll show RPM, speed, oil and water temperature and maybe lap times (I can get all this informations from CAN-BUS).

The most important thing is the Display, in particoular RPM and speed need to have a high refresh rate, temperatures and timings can be updated slower, like once every 2 seconds for temperatures and 3 or 4 times per lap for the timings, this will not damage to the user experience.
The packets coming from CAN-BUS are way faster than the reading speed of the end user so I can focus on obtaining high fps and I'll need little or no buffer on CAN.
I could develop the main loop with the aim of refreshing the screen sections displaying RPM and speed as fast as possible, and triggering the GPIO if needed (i.e. turning on an LED if a certain RPM threshold is reached).

In this scenario where could I use the DMA?

Thanks again!

stevestrong
Posts: 2048
Joined: Mon Oct 19, 2015 12:06 am
Location: Munich, Germany
Contact:

Re: How many fps can I expect if I use a 128x64 display and a blue pill?

Post by stevestrong » Fri Feb 02, 2018 9:30 pm

You did not tell us the most important information: how is your LCD driven: over SPI? I2C? Parallel 8 bit? USART?

david.prentice
Posts: 116
Joined: Wed Nov 16, 2016 8:52 am

Re: How many fps can I expect if I use a 128x64 display and a blue pill?

Post by david.prentice » Fri Feb 02, 2018 10:25 pm

With all the wires in the photo, it must be 8-bit parallel. Only 1024 bytes to blit per frame. SPI or parallel does not matter too much.

So you should be able to produce a fast frame rate. Just look at the minimum write cycle time for the controller.

The real question is: what does the LCD look like?
LCDs do not have a very fast response.

OLEDs have a faster response. There are examples of animations on a 128x64 OLED.

Seriously, a dashboard display does not need to be fast. It should be clear and easy to read for a human pilot.

David.

stevestrong
Posts: 2048
Joined: Mon Oct 19, 2015 12:06 am
Location: Munich, Germany
Contact:

Re: How many fps can I expect if I use a 128x64 display and a blue pill?

Post by stevestrong » Fri Feb 02, 2018 10:45 pm

If it is really 8 bit parallel, then look at the example code here: https://www.pjrc.com/tech/8051/board5/lcd_128x64.html

Tobo
Posts: 11
Joined: Sat Oct 22, 2016 6:32 am

Re: How many fps can I expect if I use a 128x64 display and a blue pill?

Post by Tobo » Fri Feb 02, 2018 11:02 pm

indeed it is! 8 bit parallel! sorry, I forgot to mention it.


david.prentice wrote:
Fri Feb 02, 2018 10:25 pm
With all the wires in the photo, it must be 8-bit parallel. Only 1024 bytes to blit per frame. SPI or parallel does not matter too much.

So you should be able to produce a fast frame rate. Just look at the minimum write cycle time for the controller.

The real question is: what does the LCD look like?
LCDs do not have a very fast response.

OLEDs have a faster response. There are examples of animations on a 128x64 OLED.

Seriously, a dashboard display does not need to be fast. It should be clear and easy to read for a human pilot.

David.
Of course OLEDs are better, but they are smaller and more expensive :D I need it to be big, because bigger is better....when you are racing at 200Km/h :D
yeah, I also forgot to mention I don't need it for road use, I need it to be seen clearly when racing, so RPM will be taking a lot of room on the screen, then timings, then Km/h then temperatures with a bright LED alongside for safety.

These are screens taken from a commercial dashboard which uses a 128x64 display:

Image

Image

raw, easy but very functional indeed!

Tobo
Posts: 11
Joined: Sat Oct 22, 2016 6:32 am

Re: How many fps can I expect if I use a 128x64 display and a blue pill?

Post by Tobo » Sat Feb 03, 2018 12:01 pm

Ok this is my Idea, the yellow lines indicate the end of a page for each half of the screen.

DashStruct.png
DashStruct.png (32.28 KiB) Viewed 117 times
Dash.png
Dash.png (32.28 KiB) Viewed 117 times

The 2 pages containing the writings rpm °C and kmh are never refreshed, and 4 pages (the ones with timings) are updated twice per lap (once blanked, once written)
So I need to quickly refresh 8 pages for the rpms and 2 pages for the speed.

Do you think it's a good idea?

david.prentice
Posts: 116
Joined: Wed Nov 16, 2016 8:52 am

Re: How many fps can I expect if I use a 128x64 display and a blue pill?

Post by david.prentice » Sat Feb 03, 2018 1:54 pm

I am guessing that the RPM units might change over a one second period e.g. 11xxx.
So you would update several times in a second. I doubt if the thousands change so often.
From a human's point of view you want to see clear digits. You don't want a blur of changing units.

The 60C and 234kph do not change so often.

In other words, you only change a few pixels at a time.
On a colour screen you only alter changed pixels.

On a monochrome screen like yours you can afford to redraw the whole screen.
You can limit the redraw to the changed area if you want.

Forget about the motorcycle for a minute. Just write a for() loop in software that changes the RPM value and observe the display.
How fast is comfortable? How fast is necessary.
A BluePill will be fine. A 16MHz AVR would be fine too.

I would guess that humans respond better to the sound of the engine speed and an analog needle is easier to judge than decimal numbers.

David.

User avatar
Manny
Posts: 72
Joined: Wed Dec 09, 2015 3:15 pm

Re: How many fps can I expect if I use a 128x64 display and a blue pill?

Post by Manny » Sat Feb 03, 2018 5:08 pm

Here's a 2.8" tft on my 1983 Maico 490, you cant really see it in direct sunlight...but hay when do we get that in the UK? :lol:

https://www.facebook.com/manny.bernarde ... 356896906/

Post Reply