Announcement

Collapse
No announcement yet.

Issue with Leonardo and uLCD-35DCT-CLB connectivity

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

  • James_4DSystems
    replied
    1K, although it shouldn't really matter too much

    https://www.4dsystems.com.au/downloa...017_R_1_01.pdf
    Page 23 and 34

    Regards

    Leave a comment:


  • MR RIZK
    replied
    James, thanks for that. Pretty much at the same time I found your post from 2015 at https://forum.4dsystems.com.au/node/49565

    Anyway, tested my demo code and subsequently my real code and work as expected.

    So just to clarify do I use a 1k or 10k resistor?

    Leave a comment:


  • James_4DSystems
    replied
    Greetings

    From my perspective, it looks like you are not using the correct code for the serial port on a Leonardo.

    https://www.arduino.cc/reference/en/...cation/serial/

    The Arduino Leonardo board uses Serial1 to communicate via TTL (5V) serial on pins 0 (RX) and 1 (TX). Serial is reserved for USB CDC communication. For more information, refer to the Leonardo getting started page and hardware page.
    Have you tried using Serial1 instead of Serial in both your begin statements?

    Code:
    Serial1.begin(115200);
    genie.Begin(Serial1);

    Leave a comment:


  • MR RIZK
    replied
    Hey Michael, will get some photos tonight but to confirm what you have provided.

    Display 5v ---------------------------> Leonardo 5v - YES
    Display Tx --------------------------> Leonardo Rx - YES (ie TX > RX)
    Display Rx --------------------------> Leonardo Tx - YES (ie RX > TX)
    Display Gnd ------------------------> Loenardo Gnd - YES
    Display Reset --10K resistor--> Leonardo D4 - YES however with 1k not 10k resistor as per app note 4D-AN-00017_R_1_01

    Can you confirm if i need a 1k or 10k

    Leo with 4D shield wired +ve, gnd, tx, rx, reset to D4 - Doesn't Work
    Yes you are correct about the form factor however I used fly cables to connect the shield to the LEO. I was wiring the shield with fly leads to see if the shield was doing something funky to get the display to work instead of direct from LEO to 4D
    Last edited by MR RIZK; 1st February 2019, 03:58 PM.

    Leave a comment:


  • michael_4D
    replied
    Hello,

    Just to be Clear, this should be your wiring connections when hardwiring your MCU to your Display.

    Display 5v ---------------------------> Leonardo 5v
    Display Tx --------------------------> Leonardo Rx
    Display Rx --------------------------> Leonardo Tx
    Display Gnd ------------------------> Loenardo Gnd
    Display Reset --10K resistor--> Leonardo D4

    Also, you've mentioned that you were able to use a 4D shield with your MCU.

    Leo with 4D shield wired +ve, gnd, tx, rx, reset to D4 - Doesn't Work
    Looking at the link you sent, it appears that it has a different form factor to the Arduino UNO, this means that the 4D-Arduino-Adaptor Shield is incompatible with this.

    Would you be able to provide a photo of this hard-wired setup?

    Best Regards,

    Leave a comment:


  • MR RIZK
    started a topic Issue with Leonardo and uLCD-35DCT-CLB connectivity

    Issue with Leonardo and uLCD-35DCT-CLB connectivity

    Having an issue with hard wiring a custom Leonardo board that has integrated can bus. All my testing has been with a UNO stacked with a can bus shield and the 4D shield. With this stacked setup all works well. When I switch over to the Leo and hard wire to LCD I just cannot get it to talk to the display. Without writing an essay I will try and articulate what has been tested with just some basic test code.
    • UNO with stacked Can Bus and 4D shield - Works
    • UNO with stacked Can Bus and wired 4D shield ie: loose 5 wires - Works
    • Leo with 4D shield wired +ve, gnd, tx, rx, reset to D4 - Doesn't Work
    • Leo direct to LCD wired +ve, gnd, tx, rx, reset to D4 (1k 0.5w resister in path and digitalWrite(RESETLINE, X) flipped - Doesn't work
    • Flip TX, RX just in case - Doesn't Work
    • No serial print statements
    • Using the gen4-IB board
    • Tested different baud rates 9600, 115,200 (set both in code and 4D)
    • When checking serial monitor with no serial prints I get the random ascii txt as expected
    • If I run my Can Bus code without 4D and send data to Serial instead - Works
    Link to Leo board being used: http://www.hobbytronics.co.uk/leonardo-canbus

    I'm at a total loss and hoping I just over looking something simple. Thanks in advance.


    Sample Code:

    Code:
    #include <Arduino.h>                        // Arduino Library
    #include <genieArduino.h>                   // 4D Systems Screen Library
    
    void myGenieEventHandler(void);
    
    Genie genie;
    #define RESETLINE 4                         // Sets the 4D Reset PIN
    
    void setup() {
        Serial.begin(115200);
        genie.Begin(Serial);  
        genie.AttachEventHandler(myGenieEventHandler);  // Attach the user function Event Handler for processing events
        pinMode(RESETLINE, OUTPUT);                     // Set D4 on Arduino to Output (4D Arduino Adaptor V2 - Display Reset)
        digitalWrite(RESETLINE, 1);                     // Reset the Display via D4
        delay(1000);
        digitalWrite(RESETLINE, 0);                     // unReset the Display via D4
        delay (5000);                                   // Let the display start up after the reset (This is important as it syncs the screen)
        genie.WriteContrast(12);                        // For uLCD-35DT, use 0-15 for Brightness Control, where 0 = Display OFF, though to 15 = Max Brightness ON.  
        genie.WriteObject(GENIE_OBJ_FORM, 0, 0);        // Set form to form 0 ie: first form
    }
    
    void loop() {
        genie.DoEvents();                               // This calls the 4D library each loop to process the queued responses from the display
        for (int i = 0; i < 1000; i++) {
              genie.WriteObject(GENIE_OBJ_LED_DIGITS, 0, i);
              delay(500);
              // Serial.print("What is i ");
              // Serial.println(i);  
        }
    
    }
    Last edited by MR RIZK; 1st February 2019, 07:46 AM.
Working...
X