A tft addin for pbp3


Closed Thread
Results 1 to 40 of 142

Hybrid View

  1. #1
    Join Date
    Oct 2013
    Posts
    41


    Did you find this post helpful? Yes | No

    Default Re: A tft addin for pbp3

    Is it possible that I destroy my TFT-display because my power supply for PIC18f4520 is 5volt?Communication between PIC and ILI9341 is on 5 volt.

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


    Did you find this post helpful? Yes | No

    Default Re: A tft addin for pbp3

    these displays are 3.3v devices . the only pin that is different is the vcc pin that leads to a 3.3v ldo regulator . my displays function ok with vcc =3.3v . one has a jumper to bypass the regulator if desired but this has not been necessary .
    see schematic
    ps the schematic shows the mclr pullup resistor connected to gnd , this is wrong it should be vcc
    Attached Images Attached Images
    Last edited by richard; - 31st August 2015 at 00:25.

  3. #3
    Join Date
    Oct 2013
    Posts
    41


    Did you find this post helpful? Yes | No

    Default Re: A tft addin for pbp3

    OK,it works now.I replace a voltage regulator on EASYPIC 5 board from 5V to 3.3V and it works.
    What I need to do to send JPG picture to TFT display?

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


    Did you find this post helpful? Yes | No

    Default Re: A tft addin for pbp3

    What I need to do to send JPG picture to TFT display?
    start about post#41 I have provided some python code to convert arduino c code files generated by the "UTFT ImageConverter565.exe PGM " TO a pbp compatible format.
    be aware that a 200x200 pixel image takes 80,000 bytes of flash memory. an external flash chip is more practical for this sort of thing , I have provided code to do that also

  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

    some more ways to define and animate buttons
    Attached Files Attached Files

  6. #6
    Join Date
    Oct 2013
    Posts
    41


    Did you find this post helpful? Yes | No

    Default Re: A tft addin for pbp3

    I create a six buttons on LCD and one button must work like a push button.

    When I push the button, the LED which is connected to PORTD.0 must light all the time as the button is pressed.
    When I release the button LED must go off.

    Is it possible to create something like that?

  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

    when a repeat enabled button is "held" it returns a BUTTON_STATE of 5
    this can be the led "on" cue

    when the button is "released" it returns a BUTTON_STATE of < 5 (1 or 2 )
    this can be the led "off" cue


    Code:
    LOP:
        GOSUB  CK_BUTTON
        IF      BUTTON_STATE[0]   THEN
           IF      BUTTON_STATE[0] >4 then
               PORTD.0=1
           else
               PORTD.0=0 
               BUTTON_STATE[0]=0
           endif   
        endif
    goto lop

  8. #8
    Join Date
    Oct 2013
    Posts
    41


    Did you find this post helpful? Yes | No

    Default Re: A tft addin for pbp3

    when I press a button and hold it the led diode is on.That is OK.when I release a button led is off.
    Is it possible to make that when the button is pressed and hold, led is on, and when I connect 5V to pin PORTD.7 then led is off.
    I dont now how to explain a problem.
    When I press a button window is opening and when it is full open then he must stop .Stop signal is connect to PORTD.7



    '-----------------------OPEN WINDOW ------------------------------------------------------
    IF BUTTON_STATE[2] THEN
    IF BUTTON_STATE[2] >4 then
    PORTD.0=1
    else
    PORTD.0=0
    BUTTON_STATE[2]=0
    endif
    endif

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


    Did you find this post helpful? Yes | No

    Default Re: A tft addin for pbp3

    you could do this but ..............
    a big if

    is the portd.7 signal is a limit switch or an emergency stop switch ?... if it is then its best done in hardware a hung loop here could cause fire/smoke/damage or hurt


    '-----------------------OPEN WINDOW ------------------------------------------------------
    IF BUTTON_STATE[2] THEN
    IF BUTTON_STATE[2] >4 then
    if PORTD.7 ==0 then
    PORTD.0=1
    else
    PORTD.0=0
    endif
    else
    PORTD.0=0
    BUTTON_STATE[2]=0
    endif
    endif

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