A tft addin for pbp3


Closed Thread
Results 1 to 40 of 142

Hybrid View

  1. #1
    Join Date
    May 2013
    Location
    australia
    Posts
    2,631


    Did you find this post helpful? Yes | No

    Default Re: A tft addin for pbp3

    now have the image rotation corrected , made all the x,y vars word sized (heading towards a portrait/landscape command)
    the font now has lowercase , chars 32-127. and few other subtle changes
    the image file can be located anywhere , have tested with a 127k pic18f87j11 and loading file past the 64k boundary is no problem
    Attached Files Attached Files

  2. #2


    Did you find this post helpful? Yes | No

    Default Re: A tft addin for pbp3

    Greetings Guys,

    First of all, congrats to Richard and all the other that participated in this addin.
    Very good work !

    I ordered one of these displays to test but i wanted to know if ( maybe a stupid question but... ) there is any "minimum requirement" when selecting a pic to work with this addin like min size memory, min osc speed, etc?

    I only have a 18F2520 at the moment and i'm wondering if this one will work fine.

    Thanks for the feedback

    Regards
    Rui

  3. #3
    Join Date
    May 2013
    Location
    australia
    Posts
    2,631


    Did you find this post helpful? Yes | No

    Default Re: A tft addin for pbp3

    "minimum requirement" when selecting a pic to work with this addin like min size memory, min osc speed, etc?
    the code takes < 6k with no images stored , so the chip needs at least that much code space + what your code requires , ram requirements are modest (but uncounted)
    at this point the chip must have at least 1 mssp (spi) module
    regarding osc :--- faster = better performance


    your 18F2520 should be fine

  4. #4


    Did you find this post helpful? Yes | No

    Default Re: A tft addin for pbp3

    Thank you for the feedback Richard,

    One last question...

    Is there any quick way to display an individual pixel @ a given x,y coordinate?

    I'm asking that for displaying graphs, for example.

    Also,
    Your addin has many commands. Do you have a list of all the commands available?

    Regards
    Rui

  5. #5
    Join Date
    May 2013
    Location
    australia
    Posts
    2,631


    Did you find this post helpful? Yes | No

    Default Re: A tft addin for pbp3

    Is there any quick way to display an individual pixel @ a given x,y coordinate?
    this will set a pixel to the fg colour at x0,y0
    Code:
                x0=  y coordinate
                y0=  x coordinate
                GOSUB drawpixel
    Your addin has many commands. Do you have a list of all the commands available?
    no. documenting code is my nemesis , but there are some comments in the code and I have tried to make most functions fairly consistent in their approach to the tasks at hand.

  6. #6
    Join Date
    May 2013
    Location
    australia
    Posts
    2,631


    Did you find this post helpful? Yes | No

    Default Re: A tft addin for pbp3

    try again got my x's and y's the wrong way round obviously


    Code:
                x0=   x  coordinate 
                y0=   y  coordinate
                GOSUB drawpixel

  7. #7


    Did you find this post helpful? Yes | No

    Default Re: A tft addin for pbp3

    Thanks again Richard,

    Awesome work you got here!

    Cant wait to get the display and test it out

    Regards
    Rui

  8. #8
    Join Date
    Oct 2013
    Posts
    41


    Did you find this post helpful? Yes | No

    Default Re: A tft addin for pbp3

    I have several questions about the code pic18f2520_tft_demo.pbp.

    how I can change color of screen wallpaper from black to yellow

    how I can changes color of buttons from red to green and how to change color of outline on buttons

  9. #9
    Join Date
    May 2013
    Location
    australia
    Posts
    2,631


    Did you find this post helpful? Yes | No

    Default Re: A tft addin for pbp3

    On which the port and pin I connects serial communication between PC and PIC
    I have used rx2/tx2 (the code could be altered to use tx1/rx1)

    What is the maximum number of buttons possible to make the TFT screen.
    this is the limiting factor
    button_flg VAR BYTE ;1 BIT PER BUTTON make it a word to have up to 16 buttons




    I tried to make a four keys and the fourth button is not working. The first three are working.
    button state is not defined when buttons are created easiest solution is to insert a clear command



    Code:
            INCLUDE "TFT_SPI.pbpmod"        ;glcdc
            include "tft-ILI9431.bas" 
            'INCLUDE "flash_spi.pbpmod"
    
            include "TOUCH_TFT.PBPMOD"      ;uncomment  to use TOUCH_TFT
            INCLUDE "font7x8.bas"
        latb=255   ;  make sure tft etc are not selected ie all cs high
        TRISA=111111
        TRISB=000011    
        TRISC=010011
        TRISD=000000
        PORTD=0000000
    
        OSCCON = 110000         'Internal 8 Mhz Osc 
        OSCTUNE=000000        'PLL ON
    
       clear
    
        cont=500               ;half brightness
        DEFINE OSC 32
        buff var byte[32]
        t2con=5
        PR2 = 255; 
        CCPR1L = cont>>2;             ;set pwm
        ccp1con=12|((cont&3)<<4);
        SSPCON1=$20  ;$20-21-22 works 20 IS FASTEST
    how I can change color of screen wallpaper from black to yellow
    the screen colour has two properties fg (foreground) bg (background)
    set them as you like

    use fg=bg and fillrect to clear an area

    how I can changes color of buttons from red to green and how to change color of outline on buttons
    button_scheme var word[4] ; [background,text,border,animated (background or border) ]

    defaults
    button_scheme[0]= $1f
    button_scheme[1]= $0
    button_scheme[2]= $7ff
    button_scheme[3]= $ffff

    buttons can have different animations too
    button_action.0[1]=1 ;flash text for this button1
    button_action.0[2]=0 ;flash outline for this button2 ; default action

  10. #10
    Join Date
    Oct 2013
    Posts
    41


    Did you find this post helpful? Yes | No

    Default Re: A tft addin for pbp3

    Why I can not write lovercase letters only capital letters work?When I write lovercase letter I got only a bad piksel on screen.
    Buttons now work excellent.

  11. #11
    Join Date
    May 2013
    Location
    australia
    Posts
    2,631


    Did you find this post helpful? Yes | No

    Default Re: A tft addin for pbp3

    are you using the font that has lowercase chars in it ?

    the first font has chr 32 to 90 post#54
    the second has chr 32 to 127 post#67

Similar Threads

  1. Replies: 0
    Last Post: - 25th September 2013, 18:33
  2. code examples / libraries for ILI9320 2.8" TFT LCD Module
    By longpole001 in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 6th June 2013, 08:50
  3. I really need some help with PBP3
    By Ramius in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 26th February 2012, 16:05
  4. What's with PBP3?
    By BrianT in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 10th August 2011, 17:09
  5. Experience of driving TFT screens?
    By isaac in forum General
    Replies: 1
    Last Post: - 26th September 2008, 00:15

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts