Announcement

Collapse
No announcement yet.

Gen4 post-reset delay

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Gen4 post-reset delay

    Hello,

    I'm using a gen4-uLCD-35DCT-CLB programmed with the Visi-Genie environment. The data sheet states that the operational delay, following power-up or external reset, is between 500 ms and 3000 ms.

    Is there a reliable method to tell when this period has completed and the display is ready for use? For example, could I poll the display with a command every 100 ms and when the display responds it will be guaranteed to work from then on?

    Thanks

  • #2
    Hi PipBoy,

    If you use the Beta genieArduino Library, it comes with a few more functions which are quite helpful.

    This is one example I have used in the past (sorry I can't test it right at the moment though). Feel free to play around and see if it works for you, but it does like you want and takes the guess work out of the power up time, as when your program gets larger your start up time can also increase, and different uSD cards behave differently too.

    Hope this helps.
    This particular code uses an Arduino with 2 serial ports, 1 of them is for debug output. If you don't need or cant use, just modify the code to remove the serial prints.

    Code:
    pinMode(RESETLINE, OUTPUT);
    digitalWrite(RESETLINE, 1);  // Reset the Display
    delay(100);
    digitalWrite(RESETLINE, 0);  // unReset the Display
    delay(100);
    
    while (!genie.Begin(Serial1)) // Set up Genie to use Serial1, but also returns if the Display has responded and is online
    {
      Serial.print(".");  // Print a . every 100ms for visual effect
      delay(100);
    } 
    if (genie.online()) // When the display has responded above, do the following once its online
    {
      Serial.println();   // New Line
      Serial.println("Display Online!");
      genie.AttachEventHandler(myGenieEventHandler); // Attach the user function Event Handler for processing events
    }
    James

    Comment


    • #3
      Hi James,

      I'm not using an Arduino, but your code snippet and the ViSi-Genie-Arduino-Library-BETA code is very clear.

      Thanks for your help.

      Comment

      Working...
      X