No announcement yet.

uLCD-320-PMD2 Serial comunication with Arduino

  • Filter
  • Time
  • Show
Clear All
new posts

  • uLCD-320-PMD2 Serial comunication with Arduino

    Hi good afternoon.
    Somebody tries to connect 320-PMD2 with microcontroler Arduino? I'm trying it for two weeks and I'm not able to connect it between serial port.
    I'm working with a library of OLED160 but all the functions are equals.
    Thanks you in advance.


  • #2

    You probably use the uLCD-320-PMD2, right? This display uses serial commands so you just have to connect RX/TX pin to TX/RX pins of Arduino board to get it working. Just remember that Arduinow works at 5V and you MUST insert a 1k resistor on the TX line.
    Also since your display is larger that uOLED160, serial commands it's a bit diferent on the "y" parameter. So please check the correct serials commands for your display here.

    Let me know about that.
    Oscar G.
    Oscar G.
    4D Systems Software Engineering


    • #3


      There is a nice Arduino tutorial here:

      and plenty of 4D related tutorials in Spanish here:


      • #4

        Hi both, and thanks first of all.
        Really I'm very worried because during this last week I couldn't advance nothing!! I implement a similar example than, more simply.

        I include the library
        initialize the serial port (Serial.begin(9600)
        with Oscar's library reset the screen (OLED_Init()
        and try to clean the screen (OLED_Clear()

        After thousand of tries, I discover that the screen can't be connected when I send the program to Arduino (first problem solved), then somebody tell me that I only can connect one serial device, pc screen or OLED screen, well I power my arduino with an external battery (second mistake solved), but now the really problem is the function OLED_GetResponse() of the library. First call of OLED_Init() is OLED_ResetDisplay() PERFECT!!! it turn off and turn on the screen (EUREKA then OLED_Init() wait for 5 seconds and send 0x55 to detect the baudrate (sure that I have to use printByte??? maybe printhex???) then the problem is that it calls OLED_GetResponse(); and I think that there the program stops waiting respons from the screen.... and I can't continue

        char OLED_GetResponse()
        byte incomingByte = OLED_ACK;

        // Wait for data avaliable
        while (!Serial.available()) { delay(1); }

        // Read incoming byte
        incomingByte =;

        return incomingByte;
        Excuse me if my explanation is too long, but I'm really stopped now, I connect correctly the screen (TX ->RX, RX-->1K-->TX, delete pin -->8...)

        Any idea? thanks in advance another time.

        I have just open interesting but it's necessary??? how i connect it with Arduino's compiler?? if I do a program to Arduino and another to Picasso how I connect both.... uf uf uf ... step by step...

        Tks & Rgds


        • #5

          Hi Gorka,
          You're right, you can only connect one device at same time to the Arduino board (USB or Display). This is due to the shared UART port. I actually use a external programmer conected to ICSP to have both connect but now it's no matters.

          Take care with my library (yes, itt's mine and it's fully dirty!), it's implemented for the uOLED-160-GMD/G1 display models and some functions will fail due to Y parameter that must be diferent in your display. Actually you can do some simple modifications to adapt the library by passing Y parameter un two steps.

          You told us that you actually init the display but can't get any response from. Try to replace OLED_GetResponse call for delay(1) to watch if you can succefully send commands. Of course, i assume you have TX/RX pins connected correctly and RESET pin as well.

          Looking forward for your progress on that.

          Best regards,
          Oscar G.
          Oscar G.
          4D Systems Software Engineering