Page 1 of 2 12 LastLast
Results 1 to 10 of 16

Thread: MuIN LCD - delay after command in arduino ?

  1. #1

    MuIN LCD - delay after command in arduino ?

    Hi,

    When i send command to MuIN LCD i must put delay(200) else it don't work, is normal ?

    for example if i send command clear

    Serial.begin(19200);
    Serial.print(0xFE, BYTE);
    Serial.print(0x58, BYTE);
    Serial.print("Test");

    it don't work but this work
    Serial.print(0xFE, BYTE);
    Serial.print(0x58, BYTE);
    delay(200);
    Serial.print("Test");

    i have tested with HardwareSerial and NewSoftSerial and is a same.
    if i put delay(150) for example it don't work.

    put delay in code, slowing MuIn LCD for write .
    Last edited by andromeda; 24-11-10 at 05:39.

  2. #2
    The clear screen command takes about 40 ms to execute, running this command also deletes the data buffer, so it is normal to wait at least 40 ms before sending new character, or command, after running clear screen.

  3. #3
    its not for a clear command is for all command.
    but what are the delay for all command ?

    because the code below don't work if i put delay less than 200 in the function move, try this code for testing it in your MuIn lcd and change the delay.
    if i put delay(150) it don't work.

    I have arduino Mega 2560

    if i put delay less than 100ms for a clear command it don't work.

    May be is a bug for Mega.

    void setup()
    {
    Serial2.begin(19200);
    clear();
    printmsg("Hello");
    move(2,1);
    printmsg("This is");
    move(3,1);
    printmsg("a test");
    move(4,1);
    printmsg("MuIn LCD");


    }

    void loop()
    {

    }

    /*void changeBaud()
    {
    Serial2.print(0xFE, BYTE);
    Serial2.print(0x39, BYTE);
    Serial2.print(0x03, BYTE);
    }*/

    void clear()
    {
    Serial2.print(0xFE, BYTE);
    Serial2.print(0x58, BYTE);
    delay(100);
    }

    void printmsg(char *msg)
    {
    Serial2.print(msg);
    }

    void move(int row, int col)
    {
    Serial2.print(0xFE, BYTE);
    Serial2.print(0x47, BYTE);
    Serial2.print(row, BYTE);
    Serial2.print(col, BYTE);
    delay(200);
    }

  4. #4

  5. #5
    Hi Andromeda,

    we are working on this issue. We probably will come out with a patch for the MuIn LCD for Arduino users experimenting this issue. In the meanwhile you can try using serial.write instead of serial.print

  6. #6
    thank you for investigating this issue.
    I have tested with Serial.write but is a same, i need to put delay(200), after each command.

    Regards.

  7. #7

  8. #8
    The problem is caused by the introduction (from Arduino) a random lag between bytes send, this causes a time out error on MuIn LCD and does not interpret the commands correctly.
    I'm preparing a patch for this problem, it will be ready for first days of next week.

  9. #9

  10. #10
    Good news, the release of firmware with solved the problem with excessive delay on the commands given by Arduino is ready, we're testing, and barring unforeseen circumstances will be released within the day tomorrow.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •