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

    hi barry ,these are what I used I'm sure the others would be ok too just make sure the I/f is spi
    http://www.ebay.com.au/itm/271683495...%3AMEBIDX%3AIT
    http://www.ebay.com.au/itm/191534577...%3AMEBIDX%3AIT

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


    Did you find this post helpful? Yes | No

    Default Re: A tft addin for pbp3

    Thanks Richard.

    I have now placed an order and hope to take delivery some time in July.

    Cheers
    Barry
    VK2XBP

  3. #3
    Join Date
    Dec 2007
    Location
    Finland
    Posts
    191


    Did you find this post helpful? Yes | No

    Default Re: A tft addin for pbp3

    Very nice work Richard!
    ILI9341 based TFT display with resistive touch screen could be the module that I was searching.
    With STMPE610 touch controller (SPI/I2C) it would be easy to make systems that do not need any additional input devices (buttons/joystick).

  4. #4
    Join Date
    Oct 2013
    Posts
    41


    Did you find this post helpful? Yes | No

    Default Re: A tft addin for pbp3

    Hi Richard

    I am little confused how to adjust code to work.
    I have a PIC18F45K22 and I plan to use it with your code but I never work with this PIC processor and I need some Help to configure it.


    From datasheet of PIC18F45K22 PORTD.0 is SPI clock and PORTD.4 i SPI data out.

    What I must change in your TFT_demo code to adjust PIC pin to work with TFT display.
    Whether the pins of TFT displays D/C and RESET connected together on the same pin of the PIC processors or not.

    Code:
    ;----GLOBAL----HW---------   
        SSP_IF VAR PIR3.7
        tft_dc_bit con  32     ;5
        tft_cs_bit con 16   ;4 
        tft_rst_bit con 128   ;7
        tft_port var lath 
      
      
      
    
        INCLUDE "glcd_chr.pbpmod"        ;glcdc
        include "tft-ILI9431.bas" 
    ;    include "tft-ST7735.bas"
        INCLUDE "DT_INTS-18.bas"
        INCLUDE "ReEnterPBP-18.bas"
        INCLUDE "Elapsed_INT-18.bas"
        INCLUDE "font7x8.bas"
        
    
    ASM
    INT_LIST  macro    ; IntSource,        Label,           Type,   ResetFlag?
            INT_Handler   TMR1_INT,   _ClockCount,   PBP,  yes
        endm
        INT_CREATE
    
     
    ENDASM  
    @ INT_ENABLE  TMR1_INT 
      
       
     
     
     
    
    
      
      define OSC 48
     
    '   osccon=$70   '64 mhz
       OSCTUNE.6=1 
       trisb.7=0
       trish=0        ' each pin on d has a led  for debug
       trisd.6=0     ;sck
       trisd.4=0      ;sdo
      
        BOXX VAR  BYTE
        BOXY VAR  BYTE
        BOXZ VAR  BYTE
        disp var byte
        tmp var word
        buff var byte[32]
       SSP2CON1=$20  ;$20 works too
       SSP2STAT=$40
       
       ;led var latd.7
      latb.7=1
     
      ;led=1
      gosub tft_init
    
     Serout2 PORTb.7,84,["ready ",#latd, 13,10]
     glcdc  font7x8       ;SET FONT


    is this OK?

    [CODE];----GLOBAL----HW---------
    SSP_IF VAR PIR3.7 'I don't understand what it mean

    symbol tft_dc_bit = PORTB.5
    symbol tft_cs_bit = PORTB.4
    symbol tft_rst_bit = PORTB.7

    tft_port var PORTB

    SDi from display I connect to PORD.4 and SCK from display I connect to PORTD.0 on PIC processor

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