No announcement yet.

No Serial Comm

  • Filter
  • Time
  • Show
Clear All
new posts

  • No Serial Comm

    I'm having a problem with no serial communications to the uLCD-43DCT-CLB. I've tried using Serial and Visi-Genie environment without success. When the display is connected to WS4 it seems to work fine. Using the GTX tool I'm able to control the display without problems.

    The hosts I've tried using are Arduino Due, Uno, and Adafruit FeatherM0. (SAMD21). Connecting via the gen4-IB or the 4d-UPA. Voltage read at the IB or UPA is 4.9vdc.
    Power supply for display is not taken from the Arduino pins.

    I've tried many Com port/ PA#/GPIO# combinations and baud rates according to examples shown in other forum posts.(see attached pic). For now just trying 9600 baud.
    I have the reset attached to an output pin to give a 100ms 1-0-1 followed by a long delay(). (3000ms-8000ms).

    On my scope I see a TX frame but no ACK reply. (yes I tried reversing tx/rx). I'm not using Software Serial. The Due and Feather have several hardware serial ports.

    Question: When connecting via the IB do the WS4 options/serial setting for com /PA# still apply or does it default to com 0. Is the default Com 0 PA2 and PA3 ?

    At this point I don't know what else to try and would appreciate any suggestions.

    Attached Files

  • #2
    Further Testing:
    In order to try and test the basic operation of the Diablo I loaded the example I2C Master/Slave example shown in document 4D-CD-00031.
    This a simple send/receive example using I2C transport. This worked just fine.

    Next, in order to try to further test the Diablo's serial com ports I wrote a small send receive code in Genie environment.

    /*  Send characters A to Z to Arduino on Com port 1
        Receive echo'd data from Arduino on Com port 1
    #platform "Gen4-uLCD-43DCT-CLB"
    #inherit "4DGL_16bitColours.fnc"
    var buffer[100];
    var mychar := 'A';
    var myecho := 0;
    func main()
        gfx_ScreenMode(LANDSCAPE) ; // change manually if orientation change
        com_Mode(8, 'N', 1, COM1);
        com_SetBaud(COM1, 960);
        com1_Init(buffer, 11, 0);
        txt_MoveCursor( 2 , 10 );
        if(mychar > 'Z')
            mychar := 'A';
        myecho := serin1();
        if (myecho >= 0 ) // if a valid character is received
            txt_MoveCursor( 4 , 10 );
            putnum(DEC, myecho); // print the number as hex
            txt_MoveCursor( 4 , 10 );
    And on the Arduino side:

    Using Arduino Due
    Read incoming byte on Serial1 from Diablo
    Send received byte to Serial
    Send received byte to Diablo on Serial1 for echo
    int incomingByte = 0; // for incoming serial data
    void setup()
    void loop()
        if (Serial1.available() > 0) {
            // read the incoming byte:
            incomingByte =;
            // say what you got:
            Serial.print("I received: ");
            Serial.println(incomingByte, DEC);
            //Serial1.print(incomingByte, DEC);
    This code worked for sending and receiving between Diablo and Arduino. Even though the data byte isn't formatted for conversion from char to decimal, the send/receive did work.
    I feel that these 2 test examples confirm that the Diablo Serial UART is not defective. The FFC cable and connectors are ok. The 4d-UPA is ok. And my connections from 4D-UPA to Arduino are correct.

    Going back to testing Visi-Genie environment, I've loaded the example genieArduiono-WS4-Demo into the display and the accompanying Arduino code. In WS4 options the genie serial was set to com 1 using Rx PA8 (GPIO6) and Tx PA9 (GPIO5). Same setup as in my Genie DGL code.

    On my scope I see data from Arduino. I do not see any data coming from Diablo.
    Question: Am I correct in assuming I should see a short ACK byte coming from Diable after each write from the Arduino????

    The only time I see any data coming from Diablo is when I adjust the slider widget on the touch screen. But that received data is not acknowledged by the EventHandler function.

    So at this point I feel I have eliminated most if not all hardware or miswiring defects, but I'm still not able to communicate to the display in Visi-Genie environment.


    • #3
      using gemieArduino-WS4-demo

      9600 baud does NOT work. 200000 baud does work.
      In WS4/options/genie baud 200000 and in WS4/options/serial baud 200000, milliseconds delay between,,, 0