u8g2 icon indicating copy to clipboard operation
u8g2 copied to clipboard

80ms to render one page?

Open gary00k opened this issue 3 years ago • 5 comments

Hello, I use ST7567 128x64px (constructor U8G2_ST7567_JLX12864_F_4W_HW_SPI). Is it normal that rendering one page takes ~80ms on Atmega644 @ 18,432MHz?

Is there any way to speed it up?

gary00k avatar Aug 21 '22 07:08 gary00k

Depends an your code...

olikraus avatar Aug 21 '22 08:08 olikraus

Looks ok. You could change some settings in u8g2.h but I think there is nothing much to improve.

olikraus avatar Aug 21 '22 08:08 olikraus

Well, I deleted my post bacause I attached not a full code, my bad. Btw, is there any possibility to "rerender" only a part of frame? For example, only one character.

gary00k avatar Aug 21 '22 08:08 gary00k

@gary00k I have been writing/updating only parts of the screen required to change using the buffer method

eg, wiping out previous text with a rectangle then writing the nex text, then sending the buffer.

u8g2.setDrawColor(0);// black u8g2.drawBox(85, 14, 40, 10); u8g2.setDrawColor(1);// change to white to write text u8g2.setCursor(85, 24); u8g2.setFont(u8g2_font_timB08_tr); u8g2.printf("%3d", ival); u8g2.sendBuffer();

strud avatar Aug 21 '22 09:08 strud

There is also the UpdateArea function, see the manual and examples for partial update.

olikraus avatar Aug 21 '22 09:08 olikraus