• Pic® Basic




  • Using the ConnectEve TFT Display

    Author: Bob Garrett (Forum: RGV250)

    DRAFT entry - still requires font information as of 19/8/2014

    First off, all the credit really needs to go to Bob Recny (FTDI) because if he had not written the app note AN275 this display would probably still be residing in my “to be looked at later” box, I’m sure we all have one of those.
    Secondly he also then modified the code to demonstrate how to handle bitmaps and custom fonts using the same format.
    All the examples on their site were for Arduino and Visual Studio and I found them all over complicated for what they were trying to do, I then came across AN275 and it all clicked into place (not quite as simple as that, many hours with a logic analyser were required, not to mention the time at the bar drinking beer).

    Anyway, now I have an understanding of how to drive it I really like the display and what it can achieve with a low end device, it might even be possible to use an 8 pin 12F series as it only requires 5 I/O for a minimum set up.

    There is a lot more potential than I have demonstrated, there is audio and a touch screen, I may look at audio but probably not the touch as the project I have in mind does not require it, saying that, if you do need it I might find the time to have a look and see what I can do.

    In the zip file there are 3 files, the 2 BAS files are identical in operation, one is hardware SPI and the other is soft SPI. The third file is all the FT800 definitions.
    In the example there is a flashing dot (the original object of the app note), positive and negative numbers, text strings, how to change object colours, clock and gauge widgets and bitmaps.
    (Custom fonts to follow).



    I think there is enough information to allow you to use the other objects as they all follow a similar theme but please feel free to ask if you cannot get others working.
    Both files have been tested with the MikroElectronica ConnectEVE and Amicus18 (compiler 3.5.6.7) but should work with the displays from FTDI, after all they wrote the initial app note. If you require the smaller 3.5” display from FTDI this is catered for (but not tested), all you should need to do is change this declare.

    'Set LCD display resolution here (Only select one!!)
    '#define LCD_QVGA 'QVGA = 320 x 240 (VM800B/C 3.5")
    #define LCD_WQVGA ' WQVGA = 480 x 272 (VM800B/C 4.3" and 5.0")

    I do not think it requires a connection diagram as this is also commented in the code.

    ' ConnectEVE Amicus18
    ' Pin1 CS --- PORTC.2
    ' Pin2 SCK --- PORTC.3
    ' Pin3 MISO --- PORTC.4
    ' Pin4 MOSI --- PORTC.5
    ' Pin5 INT --- PORTB.0
    ' Pin6 PD --- PORTC.1
    ' Pin7 Audio +
    ' Pin8 Audio -
    ' Pin9 3.3v
    ' Pin10 Gnd



    Not a good photo as the shadows make it look like there are more wires than there actually are (8).

    For the bitmaps and custom fonts FTDI supply a conversion utility on their web site which takes some getting used to the syntax as it is all command line. The output of this is not directly usable by PDS but is very simple to modify.

    Original output from converter RAWH file (not complete).
    /*('file properties: ', 'resolution ', 72, 'x', 28, 'format ', 'L4', 'stride ', 36, ' total size ', 1008)*/
    255,255,255,255,255,255,255,255,255,255,255,255,25 5,255,255,255,
    255,255,255,255,255,255,255,255,255,255,255,255,25 5,255,255,255,
    //
    //
    255,255,255,255,255,255,255,255,255,255,255,255,25 5,255,255,254,
    255,253,185,171,239,255,255,255,255,255,255,255,25 5,255,255,255,
    255,255,255,255,255,255,255,255,255,255,255,255,25 4,202,152,119,

    The comment has to be commented out as / is for comments in Arduino.
    LOGO: added for pointer.
    LDATA added.
    _ line continuation added to the end of each line.
    Comma removed from after the last character.
    LOGO:
    '/*('file properties: ', 'resolution ', 72, 'x', 28, 'format ', 'L4', 'stride ', 36, ' total size ', 1008)*/
    LData 255,255,255,255,255,255,255,255,255,255,255,255,25 5,255,255,255,_
    255,255,255,255,255,255,255,255,255,255,255,255,25 5,255,255,255,_
    //
    //
    255,255,255,255,255,255,255,255,255,255,255,255,25 5,255,255,254,_
    255,253,185,171,239,255,255,255,255,255,255,255,25 5,255,255,255,_
    255,255,255,255,255,255,255,255,255,255,255,255,25 4,202,152,119

    ConnectEVE_HardSPI_V2.zip