How to access the busy flag over I2C?

Comments

2 comments

  • Alee_S

    Hi Mike,

    Unfortunately when using I2C interface, the busy flag cannot be read or accessed, as the controller can only operate in write-mode only. Taken from the pg. 14 of the ST7036 controller specs:

    I2C interface
    It just only could write Data or Instruction to ST7036 by the IIC Interface.
    It could not read Data or Instruction from ST7036 (except Acknowledge signal).


    https://support.newhavendisplay.com/hc/en-us/articles/4414860535575-ST7036

    Best!

    0
  • Darin144

    Hello,

    I am trying to get a NHD‐C0220BiZ‐FSW‐FBW‐3V3M display to work with an ARM Cortex controller. Instead of bit-banging as described in the sample code I use the Cortex's internal I2C hardware. It seems to work quite well now, but only at clock speeds far below 100kHz, otherwise I get occasional NAKs.
    I now would like to interrogate the busy flag BF from my code. Unfortunately I have not succeded quite yet in doing this. According to the datasheet, I have to set RS=0 and R/W=1. But how do I transmit the RS bit to the LCD? When I set R/W=1 in the address byte, an I2C read transaction immediately follows. There is no way to send the command word required to properly set the RS flag. Does anybody know how to do in this case? Neither in the documentation of the display nor in the datasheet of the ST7036i I can find an example.

    Best regards

    Mike

     

    Most of us pull the R/W pin permanently low and don't both reading for busy.

    You simply send a command, wait for a short delay to allow the LCD to process it, then send the next command.

    Read the code at: https://github.com/adafruit/Adafruit_Py ... CharLCD.py
    and you'll see where they have a delay to allow the LCD to complete processing.

    0

Please sign in to leave a comment.