C128128BZ-FSW-GBW and SPI 3-wire



  • Saurabh_B


    According to the controller datasheet:

    In 3-Line mode, default message from MCU is command, the 2 bytes command of Set Data Direction & Display Data
    Length must be set before display data send from MCU, after the display data is sent over, the next message is turned to
    be command

    I was wondering if you sent these 2 commands in the beginning?

    If at all possible would you be able to share your schematic for how the display is setup along with your initialization to ensure you enable the internal regulator to generate the voltage required for the contrast.

    You can see the controller datasheet here: https://newhavendisplay.com/content/app_notes/ST7528.pdf
    Pages 22 and 23 go into more detail about how the 3/4 wire SPI will work for this device.

  • LBMoelca

    Yes, we sent those two bytes when we worked in 3-wire mode.
    We decided to switch to 4-wire mode, so now we have PS0 and PS2 low, and PS1 high. The software handles A0, putting it high when it sends display data, and keeping it low for command data.
    For the initialization, with A0 low, we are currently sending the same bytes as shown here, and we also send the same grayscale initialization bytes.
    At the end, we send the bytes to select page 0 and column 0, then we activate the reverse mode (command 0xA7), expecting to see the display all dark, then after 1 second we return to normal mode (command 0xA6), and finally we set A0 high and send some display data (taken from the driver datasheet, to display a capital 's').

    We are still unsure if we can send more bytes at a time: the example I linked above sends them one at a time, we'd like to know if that is mandatory.

    EDIT: I forgot, the very first byte we send to the display is the reset command (0xE2), right before the init sequence.


Please sign in to leave a comment.