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,714


    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

  2. #2
    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.

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


    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

  4. #4
    Join Date
    Oct 2013
    Posts
    41


    Did you find this post helpful? Yes | No

    Default Re: A tft addin for pbp3

    Yes,wrong include I use,now it is work.

    I create a counter,and when I touch the button counter increase e his value for 1.Each press increase counter for 1.

    COUNTER=COUNTER+1
    Is it possible to make that when i press a button and hold pressed the counter increase his value throughout the whole period when it pressed

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


    Did you find this post helpful? Yes | No

    Default Re: A tft addin for pbp3

    Is it possible to make that when i press a button and hold pressed the counter increase his value throughout the whole period when it pressed
    yes good idea , I have added an auto repeat property to buttons

    Code:
      button_rpt.0[3]=1             ;button3 auto rpt
    Attached Files Attached Files

  6. #6
    Join Date
    Jan 2011
    Location
    Sydney, Australia
    Posts
    173


    Did you find this post helpful? Yes | No

    Default Re: A tft addin for pbp3

    Hi Richard,

    I am having some issues compiling your TFT_Demo program and hope you can steer me in the right direction.
    I am using Microcode Studio 5.0.0 5 and PBPX 3.0.7.4

    When I first compile I get a "Syntax Error (195)". The line of code is "fillcircle 60 , 60 , 20"
    I have looked through the include files and cannot find a USERCOMMAND for "fillcircle". What am I missing?

    Attempting to move on, I commented out the offending fillcircle line of code and tried to compile again.
    Now I get four ASM ERROR message "Address label duplication or different in second pass".
    (Z001D9) (Z001DA) (Z001DB) (Z001DC)

    I am very keen to get my new TFT Touchscreen operational so any advice on how to correct the above issues would be greatly appreciated.

    I have attached all relevant files (main program, includes etc.) for your reference.

    Cheers
    Barry
    VK2XBP
    Attached Files Attached Files

  7. #7
    Join Date
    May 2013
    Location
    australia
    Posts
    2,714


    Did you find this post helpful? Yes | No

    Default Re: A tft addin for pbp3

    hi barry


    the address dup messages come from having coff file generation turned on when using dt_ints , don't know why ,wish it wouldn't
    see the attached screen shot to remedy that

    the syntax error i think comes from not using the latest tft-spi.pbpmod file

    I have uploaded the latest just incase I stuffed up
    Attached Images Attached Images  
    Attached Files Attached Files

Similar Threads

  1. Replies: 0
    Last Post: - 25th September 2013, 19: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, 09:50
  3. I really need some help with PBP3
    By Ramius in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 26th February 2012, 17:05
  4. What's with PBP3?
    By BrianT in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 10th August 2011, 18:09
  5. Experience of driving TFT screens?
    By isaac in forum General
    Replies: 1
    Last Post: - 26th September 2008, 01:15

Members who have read this thread : 1

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