Black Screen on initialization of LCD NHD-C160100DiZ-FSW-FBW

Comments

12 comments

  • Official comment
    Engineering Support
    Community moderator

    Hi Sagar, 

    here is a troubleshooting matrix with relevant code sections

    Issue/Observation Possible Cause Things to Check Suggested Action Relevant Code Snippet
    Black screen on startup (~1 second) Initialization timing or power supply issue - Verify power supply voltage and stability\n- Check initialization sequence and delays - Increase delays after reset and power control commands\n- Ensure correct contrast/bias settings
    task_wait(500); // Adjust delay\n0x81, 0x1C; // Contrast
    I2C communication instability Incorrect pull-up resistor value or noisy lines - Check I2C pull-up resistor value (currently 10K Ohms)\n- Verify physical length of I2C lines - Try using 4.7K pull-up resistors\n- Shorten I2C lines or shield them to reduce interference
    i2c_set_baudrate(i2c, I2C_BAUDRATE_100K); // Set clock speed
    Power supply fluctuations Power supply not stable during initialization - Measure voltage at the display during startup\n- Check for voltage dips during initialization - Ensure power supply remains stable within 2.4V to 3.6V\n- Add capacitors to stabilize power -
    No change after modifying contrast settings Incorrect contrast or bias value - Review contrast (0x81) and bias (0x56) values in the initialization sequence - Experiment with different contrast values\n- Ensure these commands are not being overwritten
    0x81, 0x1C // Adjust contrast value
    Issue occurs only during wake-up from sleep Improper wake-up sequence or power instability - Check if display is being powered up correctly after waking from sleep mode\n- Low-power wake-up - Adjust delay after wake-up\n- Ensure stable power after wake-up
    pwr_LowPowerWakeup(); // Ensure proper wake-up sequence
    Black screen persists despite changes Grayscale settings may be affecting display - Check if grayscale settings are being disabled\n- Verify if MONO mode is properly configured - Ensure grayscale is explicitly disabled in initialization\n- Double-check theme settings
    0x20; // Disable grayscale if MONO
    Other peripherals causing I2C interference Multiple devices on the I2C bus causing noise - Check if other peripherals are connected to the same I2C bus\n- Test without other devices - Isolate the display on the I2C bus during troubleshooting\n- Add retries for I2C communication -
    Delays seem too short for proper initialization Short timing delays in initialization sequence - Verify the timing after each command in the initialization sequence\n- Review datasheet delays - Increase delay times, especially after power control and reset\n- Ensure proper sequence of commands
    task_wait(200); // Increase delays for booster stabilization
    No debug information available Lack of logging or debugging steps - Ensure that debugging information is being logged throughout the initialization sequence - Add logging statements to track the progress of each initialization step
    log_debug("Step complete"); // Add logs to track initialization

     

    To provide the exact code, we would need detailed information about your setup, including the specific MCU, its schematic, the power supply, code environment, and debugging setup. Without these details, it's difficult to give an exact code solution. If you could share this information, we would be happy to offer more targeted guidance.

     

  • Sagar Patel

    Engineering Support Can you please help me out on this.

    0
  • Engineering Support
    Community moderator

    1. Check Timing Delays

    • Ensure your initialization delays match those recommended in the datasheet.
    • Increase the delay after powering on the display and after each command sequence. Refer to the NHD-C160100DiZ-FSW-FBW datasheet for details.

    2. Verify Initialization Sequence

    • Cross-check your command sequence with the example provided on page 10 of the NHD-C160100DiZ-FSW-FBW datasheet.
    • Any discrepancy might cause unexpected behavior.

    3. I2C Pull-Up Resistors

    • Ensure that the 10k pull-up resistors on the I2C lines are appropriate for your setup.
    • Different resistor values may be needed for stable communication.

    4. Adjust Contrast and Bias

    • Experiment with the contrast (0x81) and bias settings (0x56) as recommended in the datasheet.
    • Incorrect values can cause display issues on startup.

    5. Power Supply Stability

    • Verify that your power supply voltage is stable and within the 2.4V to 3.6V range specified in the datasheet.

    6. Gray Scale Settings

    • If using a monochrome theme, ensure grayscale settings are correctly disabled.
    • Refer to the ST7528 controller datasheet for the relevant commands.

    Additional Considerations:

    The problem might also be related to how the display is being initialized or how the power wake-up function (pwr_LowPowerWakeup()) is interacting with the display.

    7. Display Initialization

    • Ensure that the display initialization sequence is correct after waking up the MCU.
    • Displays often require a specific sequence to turn on correctly after being in low-power mode.

    8. Check Power Supply During Wake-Up

    • Verify that the power supply to the display is stable and within the required range, especially when waking up from sleep mode.

    9. Timing Delays After Wake-Up

    • Adjust the delay time after pwr_LowPowerWakeup().
    • It might be necessary to add a longer delay before attempting to turn on the display to ensure the internal power circuits have stabilized.

    10. Debug the Display Command

    • Ensure the command to turn on the display is being sent correctly after the BLE packet is received and processed.
    • Add debug statements to confirm that the display is receiving the command.

    11. Check Sleep Mode Flag

    • Confirm that the prvlock.sleep_mode_flag is being managed correctly.
    • If the flag is not set or reset properly, the wake-up sequence for the display might be skipped.
    0
  • Sagar Patel

    These is very generic answer, i have take care all the points.
    i have taken the reference for initialization sequence from (https://newhavendisplay.com/content/specs/NHD-C160100DiZ-FSW-FBW.pdf ) data sheet line number 11.

    As i already mention above for pull up register details. Also power supply is properly applied to LCD.

    Can you please check the sequence that mention above and help us to debug.

    0
  • Sagar Patel

    Sorry we cannot provide the schematic and setup environment Due to company policy.

    But yes we have verify the system from hardware point of view and its looking absolutely fine with respect to power supply, Pull up register.

    As mention the steps on ticket comments we have also applied the delay after the reset steps, If anything missing in the startup sequence then please let us know.

    0
  • Engineering Support
    Community moderator

    Hi Sagar, 

    can you please try to scan the i2c bus to find the display address, does it read correctly?

    should return a 7-bit I²C address of 0x3F or 00111111. 

    the write and read commands are 8-bit since we include the write bit. \

    void i2c_scan() {
    int address;
    int result;
    int nDevices = 0;

    print("Starting I2C scan...\n");

    // Loop through all possible 7-bit I2C addresses (1-127)

    for (address = 1; address < 127; address++) {
    result = i2c_start(address); // Start I2C communication with the device at 'address'

    if
    (result == 0) {
    //If result is 0, the device acknowledged the transmission (found a device)
    print("I2C device found at address: 0x");
    print_hex(address);
    print("\n");
    nDevices++;
    } else if (result == -1) {
    // If result is -1, there was a communication error
    print("Error at address 0x");
          print_hex(address);
    print("\n");
    }

    i2c_stop(); // Stop I2C communication for this address
    }
    if (nDevices == 0) {
    print("No I2C devices found\n");
    } else {
    print("I2C scan complete\n");
    }
    }
    0
  • Sagar Patel

    Yes we have also tried to capture the I2C lines and check the startup sequence, slave address, baudrate, timing characteristics of waveform all are completely fine.

    We have capture the waveform of SDA, SCL, RESET, slave select pin and power supply with the help of salae tool. (https://drive.google.com/file/d/1nq7z8f2rcnN8YtNhyIHR_wRmyYko828R/view?usp=sharing)

      Kindly install the tool Logic-2.4.14-windows-x64 and insert the LCD_Init_Seq.sal file from above drive for checking the waveforms.

    And also as i mention earlier that display is working perfectly fine, but the problem is on bootup we are able to see the black screen for 1 sec then its disappears. 

    0
  • Sagar Patel

    Engineering Support Has any one check the waveforms ? Is there any thing that you have find wrong in the wave form ?

    0
  • Engineering Support
    Community moderator

    I will review the wave-forms and get back to you shortly. We have to insatll the software to read the files. 

    0
  • Engineering Support
    Community moderator

    I have reveiewd the timing waveforms and have found the following

    1. SCL (Clock Line):

      • The shared diagram shows that the SCL clock signal should alternate between high and low during communication.
      • In your current capture, SCL is stuck high, indicating no clock pulses. To match the expected behavior, you need to ensure that your microcontroller or driving circuit generates clock pulses for communication. The SCL clock frequency should be within 400kHz, with proper timing for the high and low periods (TLOW ≥ 1.3 µs and THIGH ≥ 0.6 µs).
    2. SDA (Data Line):

      • The shared timing diagram shows that SDA should alternate between high and low, synchronized with SCL, for transmitting data.
      • In your current capture, SDA remains high throughout, indicating no data is being transmitted. SDA should start with a low-to-high transition (start condition) and then shift data bits according to the clock pulses on SCL. It’s important to check that the data setup time (TSU;DAT ≥ 100 ns) and hold time (THD;DAT ≥ 0 µs) are met.
    3. RESET:

      • The reset signal looks fine, as it goes low for a period and returns high. In your capture, it properly resets the display.
      • After the reset, you need to ensure the I²C communication begins immediately by clocking the SCL and SDA signals to initialize the display.

    What Needs to Be Done:

    1. Ensure SCL is Generating a Clock Signal:

      • Check your microcontroller or I²C master to ensure it's configured to generate clock pulses. Without this, no data transfer can occur.
    2. Drive the SDA Line:

      • The SDA line should change state based on the data being transmitted. If it's not, make sure your initialization sequence includes proper start and stop conditions. The start condition occurs when SDA transitions from high to low while SCL is high. Similarly, the stop condition happens when SDA transitions from low to high while SCL is high.
    3. Timing Adjustments:

      • Ensure that the timing parameters such as the setup and hold times for data (TSU;DAT ≥ 100 ns, THD;DAT ≥ 0 µs), and clock periods (THIGH ≥ 0.6 µs, TLOW ≥ 1.3 µs) are adhered to in your communication sequence.


    After checking the timing for your SCL and SDA lines making sure that they are not both latched in either direction let me know what the timing wave forms look like. 

    0
  • Sagar Patel

    Hold on you have not Zoom the waveform please check the axis, it is in second by default. you have to zoom till it comes in millisecond then you will see the data.

    When you will zoom the waveform then you will see the SCL and SDA waveform properly like below:

    Request you to please verify the waveform properly, as i have inform earlier also like the thing is working fine means we are able to see the data on display. The only problem is that black screen in startup sequence.

    So your previous suggestion will be no use. s it already working fine.

     

    0
  • Engineering Support
    Community moderator

    Hi Sagar, I have had no issue reading your timing chart, but you must make sure that the TBUF is not pulsed as many times in such a short period. Please see the spec below for how long you must keep the SDA up for and make sure that you are sending SCL on the falling edge of SDA. 

    0

Please sign in to leave a comment.