Git Product home page Git Product logo

Comments (4)

navado avatar navado commented on June 17, 2024 1

Thank you!
This helps.

from u8g2.

olikraus avatar olikraus commented on June 17, 2024

I'm getting 125x64 useful pixels shifted 4 pixels right

Please try some other constructors. All are listed here: https://github.com/olikraus/u8g2/wiki/u8g2setupcpp#st7565-ea_dogm128

Ignore the contrast, you can adjust the contrast with setContrast() with any of the constructors.

from u8g2.

navado avatar navado commented on June 17, 2024

I tried, no luck. However with another SW constructor U8G2_ST7565_ERC12864_ALT_F_4W_SW_SPI I got full screen working, i.e. issue number 3 solved

/* ------------------- THESE WORKING -----------------------*/
// U8G2_ST7565_EA_DOGM128_1_4W_SW_SPI lcd(U8G2_R2,
//                                        /* clock=*/SCL_PIN,
//                                        /* data=*/SDO_PIN,
//                                        /* cs=*/CS_PIN,
//                                        /* dc=*/RS_PIN,
//                                        /* reset=*/RST_PIN
//                                        );

// U8G2_ST7565_EA_DOGM128_F_4W_SW_SPI lcd(U8G2_R2,
//                                         /* clock=*/SCL_PIN,
//                                         /* data=*/SDO_PIN,
//                                         /* cs=*/CS_PIN,
//                                         /* dc=*/RS_PIN,
//                                         /* reset=*/RST_PIN
//                                         );

// Uses full screen
U8G2_ST7565_ERC12864_ALT_F_4W_SW_SPI lcd(U8G2_R0,
                                        /* clock=*/SCL_PIN,
                                        /* data=*/SDO_PIN,
                                        /* cs=*/CS_PIN,
                                        /* dc=*/RS_PIN,
                                        /* reset=*/RST_PIN
                                        );


/* ------------------- THESE NOT WORKING -----------------------*/

// U8G2_ST7565_ERC12864_ALT_F_4W_HW_SPI lcd(U8G2_R0,
//                                         /* cs=*/CS_PIN,
//                                         /* dc=*/RS_PIN,
//                                         /* reset=*/RST_PIN
//                                         );

// U8G2_ST7565_EA_DOGM128_1_4W_HW_SPI lcd(U8G2_R2,
//                                         /* cs=*/CS_PIN,
//                                         /* dc=*/U8X8_PIN_NONE
//                                         );

// U8G2_ST7565_EA_DOGM128_2_4W_HW_SPI lcd(U8G2_R2,
//                                         /* cs=*/CS_PIN,
//                                         /* dc=*/RS_PIN,
//                                         /* reset=*/RST_PIN
//                                         );
// U8G2_ST7565_EA_DOGM128_1_2ND_4W_HW_SPI lcd(U8G2_R2,
//                                         /* cs=*/CS_PIN,
//                                         /* dc=*/RS_PIN,
//                                         /* reset=*/RST_PIN
//                                         );
// U8G2_ST7565_EA_DOGM128_1_3W_HW_SPI lcd(U8G2_R2,
//                                         /* cs=*/CS_PIN,
//                                         /* reset=*/RST_PIN
//                                         );

from u8g2.

olikraus avatar olikraus commented on June 17, 2024

Point 1:
HW SPI depends on your board. U8g2 will just use the Arduino SPI object.
Pin numbers are given here: https://www.arduino.cc/reference/en/language/functions/communication/spi/
Of course for any none-Arduino boards you need to consult the documentation of your board regarding the HW pin numbers.

Point 2:
RS, DC, CD, A0... are names from the datasheet. They are not consistent. In u8g2 it is named "dc" (data/command, see also here: https://github.com/olikraus/u8g2/wiki/u8g2setupcpp#wiring)

from u8g2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.