No announcement yet.

Connect 4.3" TFT-LCD (Picaso) to Rapberry PI-2

  • Filter
  • Time
  • Show
Clear All
new posts

  • Connect 4.3" TFT-LCD (Picaso) to Rapberry PI-2

    Try to connect LCD to RPi-2 without success. I use the 4D Serial-PI adapter to make the connection.
    Have also ad (but is not strict necessary) a reset line between Pin 11(GPIO) and reset pin 16(LCD Header J1)
    Do I need changes on the RPi to get it running

    Have include my test file.

    Startscreen is all the time in front.
    I running SPE2 rev 1.3
    PmmC rev 4.4
    Comms 9600

    Test the same with an Arduino Due, results are perfect.

    Please need some help or advise.

    //Small test program

    #include <stdio.h>
    #include <stdlib.h>
    #include <string.h>
    #include <unistd.h>
    #include <errno.h>
    #include <fenv.h>
    #include <ctype.h>
    #include <termios.h>
    #include <fcntl.h>
    #include <sys/stat.h>
    #include <wiringPi.h>

    #include <picasoSerial.h>
    #include <Picaso_Types4D.h>
    #include <Picaso_const4D.h>

    #define SERIALPORT "/dev/ttyAMA0"
    #define ulCDRESET 0 //ulCD RESET Pin - wiringPi pin 0 is BCM_GPIO 17 header pin 11

    static int comspeed;

    int main()
    int rc;
    //TimeLimit4D = 2000;
    printf("Open Comm port");
    comspeed = 9600;
    rc = OpenComm(SERIALPORT, 9600);
    if (rc != 0)
    printf("Error %d Opening: %s - %s\n", errno,
    SERIALPORT, strerror(errno));
    printf("\nstatus = %d\n",rc);
    printf("wait 3 seconds\n");
    pinMode(ulCDRESET, OUTPUT);
    digitalWrite(ulCDRESET, HIGH);
    delay(50); //50 mS
    digitalWrite(ulCDRESET, LOW);
    delay(10); //10mS
    digitalWrite(ulCDRESET, HIGH); //leave high for the rest of the time
    printf("Command gfx_Cls\n");

    printf("command gfx_Circle\n");
    printf("wait 3 seconds\n");

  • #2
    Hi Powersoft,

    I have just tried your code and it sure is working perfectly. Only thing I can think of is related to some serial port related settings. If you have no issues with compilation of the project code that you have posted then proceed to 'Serial related setup' section.

    Picaso Serial Linux Library installation and setup:

    $ git clone
    $ make all
    $ ldconfig

    For the wiringPi installation please follow this URL:

    Serial related setup:

    We should try is to make sure we can freely use the serial port. To do this please run 'sudo raspi-config' on your terminal (RPi2 console).

    Navigate to Advanced Options >> Serial >> select NO.

    Reboot your RPi-2.

    Recompile project and run with 'sudo'


    • #3
      Thanks for this help. Great that you always have a so a fast response. It is working now!