Go Down

Topic: U8g2: Graphics Library for Monochrome OLEDs and LCDs (Read 16389 times) previous topic - next topic

PaulRB

#105
Mar 19, 2017, 03:10 pm Last Edit: Mar 19, 2017, 03:18 pm by PaulRB
don't you also require a special constructor?
Maybe you can add the constructor line for the u8g2 object also.
Yes, but I would not call it very "special"! Here it is:
Code: [Select]
U8G2_KS0108_128X64_F u8g2(U8G2_R0, U8X8_PIN_NONE, U8X8_PIN_NONE, U8X8_PIN_NONE, U8X8_PIN_NONE,
                          U8X8_PIN_NONE, U8X8_PIN_NONE, U8X8_PIN_NONE, U8X8_PIN_NONE,
                          /*enable=*/ U8X8_PIN_NONE, /*dc=*/ U8X8_PIN_NONE, /*cs0=*/ U8X8_PIN_NONE,
                          /*cs1=*/ U8X8_PIN_NONE, /*cs2=*/ U8X8_PIN_NONE, /* reset=*/  U8X8_PIN_NONE);   // Set R/W to low!

The DC, CS0, CS1 pins on the display are driven by the pcf8574 chip. The KS0108 does not have a CS2 pin. RESET on the display is connected to the Wemos RST pin so they reset together. I suppose I could/should have written my code to give the Enable pin in the above constructor, but in the end I hard coded it in the U8x8lib.cpp file.

olikraus

PaulRB, ah, yes, all is handled in the call back functions...
But still, I think this clarifys the usage of your approach.
Thanks,
Oliver

jptheripper

#107
Mar 20, 2017, 12:30 am Last Edit: Mar 20, 2017, 01:09 am by jptheripper
Well, sure, port to u8g2 should be there... I hope to get this done once. Thanks for the request.

Oliver
Oliver,
 Are you still porting m2tklib to u8g2? If not is there another solution?

Thank you.

WilliamB

Guys again thank you for all the hard work that went into this. I am running behind, had some medical issues. but today i got my backpack done! Loading the u8g2 lib tomorrow. well later today its 4am and im cross eyed from all the soldering.

My wiring is NOWHERE near the neatness of Paul's. lol






As you can see I have the i2c scanner sketch running and the chips are responding. so at least i know some of the wiring is right  :)

will post once i get display up and running

PaulRB

#109
Mar 25, 2017, 09:43 am Last Edit: Mar 25, 2017, 09:44 am by PaulRB
You are using a Mega? I don't get that. I'm using a Wemos, which has very few pins but does have WiFi. Mega has more than enough pins to run the ks0108 without using extra chips. What's your motivation?

WilliamB

The mega was for testing. I will be using a  esp8266 12F to run the display. the mega was just handy lol.


olikraus

Oliver,
 Are you still porting m2tklib to u8g2? If not is there another solution?

Thank you.
I have started some weeks back, but my spare time is very much limited :-(

It is in my mind, but i can not promise anything.

Oliver

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy