olikraus / u8g2

U8glib library for monochrome displays, version 2
Other
5.04k stars 1.04k forks source link

support for ssd1326 #398

Closed MPereira-lp closed 6 years ago

MPereira-lp commented 6 years ago

Hi!

I've tried wiring the screen like this:

sem titulo

I wasn't able to use the C3 on pin 22. Is that bad?

I've tried to change the width and height on several other screens, and I've "activated" the 16bit on the "u8g2.h" file. The screen still dead...

Any tips?

Thanks

olikraus commented 6 years ago

Graphics Test should work as usual. I have not changed this.

olikraus commented 6 years ago

Did you enable 16 Bit Mode again?

olikraus commented 6 years ago

Yes, i think we are getting closer. I have created version 2.20.5: https://github.com/olikraus/U8g2_Arduino

Note that 16 bit mode is again disabled. But you can keep it disabled as long as you use u8x8 examples.

MPereira-lp commented 6 years ago

I've enabled 16bit before trying. But it is not needed if I use the u8x8 instead of FullBuffer?

MPereira-lp commented 6 years ago

The version available to download is 2.20.4

MPereira-lp commented 6 years ago

Much better. Still, the small text is not readable. Any thoughts?

https://youtu.be/6nslNUYw0WY

olikraus commented 6 years ago

ok, pls try again, version is 2.20.6

MPereira-lp commented 6 years ago

It is looking PERFECT!

Check it here! What do you think?

olikraus commented 6 years ago

Looks good. Although I think that there are some artefacts. Can you test also the u8x8/FlipMode example? Another test would be the u8g2 graphics test (with activated 16 bit mode).

One more question: I saw, that the SSD1326 has a black/white mode. Currently the gray-scale mode is activated and the graphics content is upscaled inside u8x8. The drawback is, that currently 4 times more data needs to be transfered. The question is, shell we also work on a more faster version for this device? This faster version will not support u8x8, only u8g2 will be possible. The current version supports both u8g2 and u8g8. I will keep the current (working) version, but shell we implement also a high speed u8g2 version? I mean finally the question is, are you willing to do some more testing?

And: Excellent work on the hardware/wiring side. It is not at all easy to bring life to such OLEDs if you only have a flex cable connection. Great work!

MPereira-lp commented 6 years ago

Yes, I am willing and interested in further testing. I will test the FlipMode and post the video. I have both screens, the blue and the white versions. Do you want me to test the white ones?

You'r doing a great work and I look forward to compensate you. AT LEAST I will send you a couple of screens, boards, flat cables... wtv you need to have samples of this OLED screens. If you see fit another type of compensation that won't be a problem!

There are a couple o Issues I see at the moment. The screen sometimes goes OFF after a while (should that be a voltage issue? Maybe just the arduino malfunctioning?

The other Issue is the "brightness". I'm quite sure these screens have a lot more brightness, I'm quite sure where to change it, but not sure how. Can you help with that? Sometimes after a while the screen looses brightness, like saving mode(?).

Will I be able to connect 2 screens per arduino?

MPereira-lp commented 6 years ago

Ok, so here is the video for the White version, and with the _Full_buffer/Graphictest (16 bit mode)

olikraus commented 6 years ago

Yes, I am willing and interested in further testing. I will test the FlipMode and post the video. I have both screens, the blue and the white versions. Do you want me to test the white ones?

I do not think that the color matters ;-)

The screen sometimes goes OFF after a while

Hmm... could this be a power supply issue? How does your power supply look like at the moment?

The other Issue is the "brightness".

Same topic: Power supply. But maybe we need to look at the commands to check whether there is any other option for this.

Will I be able to connect 2 screens per arduino?

Yes of course.

olikraus commented 6 years ago

Ok, so here is the video for the White version, and with the Full_buffer/Graphic_test (16 bit mode)

hmm the link shows the u8x8/GraphicsTest.

MPereira-lp commented 6 years ago

hmm the link shows the u8x8/GraphicsTest.

I'm quite sure it is the Full_buffer. I've also tried the page_buffer and they all look the same to me 😕 how can you tell the difference?

Anyway, here is the page_buffer/FlipMode

MPereira-lp commented 6 years ago

The turning off is not happening, so I think it is bad wiring. About the contrast, I know it is regulatable. The original controller board has a couple buttons to control that. (I suppose they are doing software changes... I mean "command" changes, not pwm or anything, but I might be wrong. The psu I'm using with the arduino is the same I'm using with the original controller board, which could be regulating the voltage anyway...)

If I double the pixel height/tile height, by instance, it gets a LOT more brightness, (not sure if it is relevant at all)

olikraus commented 6 years ago

Anyway, here is the page_buffer/FlipMode

Well, it is the u8x8/FlipMode example. But anyway, it is working, fine, so this is the information i wanted to know. :-)

About the contrast, I know it is regulatable.

actually the brightness is controlled by the setContrast command. You could try to increase this value up to 255

MPereira-lp commented 6 years ago

Well, it is the u8x8/FlipMode example. But anyway, it is working, fine, so this is the information i wanted to know. :-)

Haha, I'm pretty sure it is the page_buffer/FlipMode. How can you tell the difference? is it the title? cause they all say u8x8.

I will try to change the contrast and give you a feedback!

MPereira-lp commented 6 years ago

sem titulo2

Should I change it on the u8x8_cad.c? Isn't that going to chage for all the "screens"?

olikraus commented 6 years ago

Haha, I'm pretty sure it is the page_buffer/FlipMode. How can you tell the difference? is it the title? cause they all say u8x8.

It looks like this. Finally it is defined by the constructor.

Should I change it on the u8x8_cad.c? Isn't that going to chage for all the "screens"?

no, just add the command u8g2.setContrast(255); or u8x8.setContrast(255);

MPereira-lp commented 6 years ago

It looks like this. Finally it is defined by the constructor.

I don't understand what you mean... ?

nono, just add the command u8g2.setContrast(255); or u8x8.setContrast(255);

on the arduino code then?

MPereira-lp commented 6 years ago

sem titulo3

As you can see I'm using the full_buffer, shouldn't that be u8g2? I'm confused haha

Also: Have you really checked the FlipMode video? when it flips it is full of artfacts isn't it?

The contrast "issue" is solved, it work just fine!

olikraus commented 6 years ago

u8g2.setContrast(255); or u8x8.setContrast(255);

on the arduino code then?

yes

As you can see I'm using the full_buffer, shouldn't that be u8g2? I'm confused haha

Indeed, looks very wrong. What kind of IDE do you use?

this is the u8x8 flipmode example: https://github.com/olikraus/u8g2/blob/master/sys/arduino/u8x8/FlipMode/FlipMode.ino

and this is the u8g2 flipmode exmaple: https://github.com/olikraus/u8g2/blob/master/sys/arduino/u8g2_page_buffer/FlipMode/FlipMode.ino

MPereira-lp commented 6 years ago

I'm using Arduino Create (online).

olikraus commented 6 years ago

I never tested this... but it seems to be wrong.

MPereira-lp commented 6 years ago

Ok, so after I tried the using the Desktop version of arduino, it seems to work right. (the software, not the screen).

Check here

It is _fullbuffer/GraphicTest

olikraus commented 6 years ago

Did you modify something? It only shows the first 8 pixel rows.

MPereira-lp commented 6 years ago

No, I haven't... How do I change the u8g2 resolution?

olikraus commented 6 years ago

very strange. Can you test the following .ino file: https://github.com/olikraus/u8g2/blob/master/sys/arduino/u8g2_full_buffer/GraphicsTest/GraphicsTest.ino

You could just copy the content of this github file.

MPereira-lp commented 6 years ago

Looks exactly the same. Do you want a video?

olikraus commented 6 years ago

hmmm, this is impossible. I mean, it is like this: The u8x8 graphics demo fills the complete screen, but the u8g2 graphics demo does not. This is strange. Can you instead test the page buffer demo? https://github.com/olikraus/u8g2/blob/master/sys/arduino/u8g2_page_buffer/GraphicsTest/GraphicsTest.ino

MPereira-lp commented 6 years ago

So, I've been testing the page_buffer/FlipMode, and it looks like this. What do you think?

I've also tested the page_buffer/GraphicTest, and it looks like this.

olikraus commented 6 years ago

Yes, thanks. Well, the GraphicsTest works good, but Graphics test also does not activate the flip mode. I guess I need to check this... :-(

MPereira-lp commented 6 years ago

Any news?

olikraus commented 6 years ago

Not yet. Unfortunately I am very busy with some other topics. I hope to continue soon here.

MPereira-lp commented 6 years ago

No problem. Could you just give some clue on how to connect two screens on the same arduino, and on the best way to change the text size using the u8x8?

olikraus commented 6 years ago

two screens on the same arduino

HW: You need to use two different CS lines SW: You need two different constructors (which will differ in the assigned pin numbers and the object name, so you will have u8g2_a and u8g2_b instead of u8g2 only)

change the text size using the u8x8

There is a 2x2 option but nothing beyond this. I recommend to use the u8g2 API instead of the restricted U8x8 interface. In fact the restriction in U8x8: 8x8 font only (thats why the name is U8x8 and no graphics)

olikraus commented 6 years ago

Excause me for the long delay. I have create 2.20.7 now. Download is available here: https://github.com/olikraus/U8g2_Arduino

Can you repeat the page_buffer/FlipMode test?

Thanks a lot!

olikraus commented 6 years ago

can we close this issue?

olikraus commented 6 years ago

... feel free to reopen ...