Announcement

Collapse
No announcement yet.

uLCD-70DT-AR and Arduino Mega refresh very slow

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

  • uLCD-70DT-AR and Arduino Mega refresh very slow

    Hi,
    in our project - a voltage-/current-measuring system - we use a uLCD-70DT-AR with an Arduino Mega. The goal ist to visualize electrical parameters measured and processed by the arduino on the smart display module, which it does, but the refresh rate is pretty slow, about 1 sec per value. This is the code we use and it works fine, apart from the speed-issue:

    Code:
    void setup()
    {
    Serial.begin(19200);
    genie.Begin(Serial);
    pinMode(4, OUTPUT);
    pinMode(13, OUTPUT);
    digitalWrite(4, HIGH);
    delay(100);
    digitalWrite(4, LOW);
    //delay(1500);
    
    genie.WriteContrast(10);
    genie.WriteStr(0, GENIE_VERSION);
    genie.WriteObject (GENIE_OBJ_FORM, 0, 0);
    }
    
    void loop()
    {
    potiWert = analogRead(potiPin);
    genie.DoEvents();
    genie.WriteObject (GENIE_OBJ_LED_DIGITS, 0x00, potiWert);
    genie.WriteObject (GENIE_OBJ_LED_DIGITS, 0x01, potiWert);
    genie.WriteObject (GENIE_OBJ_LED_DIGITS, 0x02, potiWert);
    }

    We are using the Visi-Genie-Library and 4D Workshop 4. What are we doing wrong?

    cheers!
    Last edited by Riallo; 28 April 2021, 06:27 PM.

  • #2
    Hi,

    When updating the widgets using the WriteObject() function, the host must receive an ACK from the display to tell the host a successful transmission of data, then the DoEvents function fetches all data coming from the display including the ACKs.

    To improve the display's response with the WriteObject commands, keep the DoEvents() function running in a loop only send the Write Object command at a certain interval or whenever you need it.

    You can check sample programs for your reference: Visi-Genie Arduino Library: Examples

    I hope this helps.

    Best regards.

    Comment

    Working...
    X