Giter Club home page Giter Club logo

Comments (2)

mcauser avatar mcauser commented on July 29, 2024

You are correct in that sending 0x20 will put the display in horizontal addressing mode and 0x22 in vertical mode. 0x20 is the function set register and 0x02 is the bit that switches to vertical mode.

When switching mode, it does not affect what is currently on the display. It only affects where the next byte will be drawn.

The pcd8544_buffer in the library is storing the image in horizontal mode and display() loops over the 6 pages (each 8 rows tall) and writes up to 84 bytes (one per column) before moving to the next page. Each byte represents 8 vertical pixels. Partial updates is why they don't just set the x,y address to 0,0 and spi write the entire buffer.

I don't believe there are any cheap clones of the display. I've seen the same LCD wrapped in the same metal case on various coloured PCBs from various vendors. They have subtle differences in their backlight LEDs but are otherwise seemingly identical.

If you want to see the horizontal / vertical addressing in action, try setting the x,y position to 0,0 then spi writing a single byte 0xff, pause and repeat. In both modes, each write will draw 8 vertical pixels. It's not possible to draw a row of 8 horizontal pixels from a single byte. They are always drawn vertical.

from adafruit-pcd8544-nokia-5110-lcd-library.

ladyada avatar ladyada commented on July 29, 2024

closing cause it seems to work?

from adafruit-pcd8544-nokia-5110-lcd-library.

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.