A tft addin for pbp3


Closed Thread
Results 1 to 40 of 142

Hybrid View

  1. #1
    Join Date
    Jan 2013
    Location
    Texas USA
    Posts
    229


    Did you find this post helpful? Yes | No

    Default Re: A tft addin for pbp3

    Richard,

    Great amount of work on this library.
    I have to hand it to you, a lot of coding you worked out there.

    For my own edification, I have a question for you.

    In "TFT_SPI.PBPMOD" you have your setxy 8-element byte array for y0, y1, x0 & x1 declared.
    This I understand.
    You do this to support Word variables for x0 & x1 and space for y0 and y1 to be used as Word variables in the future,
    but used as byte variables today. This I assume as the TFT display's y axis in less than 255.

    One thing I notice though is that you have the following ASM address mapping for the individual x&y elements.
    Code:
    ASM       
    y0 = _setxy +1   
    y1 = _setxy +3
    x0 = _setxy +4
    x1 = _setxy +6
    ENDASM
    Then you have the following PBP variable declarations.
    Code:
    x0 var WORD EXT 
    x1 var WORD EXT
    y0 var byte EXT 
    y1 var byte EXT
    Understood at this point.
    x vars are Words and y vars are Bytes.

    But here is my question, I thought I noticed you use a lot of manual (CHK?RP/movlw/movwf) manipulation within the USERCOMMANDS for
    the y0 & y1 variables instead of using PBP standard macros for MOVE?xx.

    Could you not change the ASM address mapping for the y0 & y1 elements to use Little Endian style, instead of Big Endian, and then use the
    standard PBP macros (MOVE?BB, MOVE?CB, MOVE?WB)?
    Wouldn't that simplify the ASM in the USERCOMMAND macros?
    Doesn't the PBP standard MOVE?xx macros take care of the BankSel testing/switching and movement of the High and Low bytes for you?

    Code:
    ASM       
    y0 = _setxy +0   
    y1 = _setxy +2
    x0 = _setxy +4
    x1 = _setxy +6
    ENDASM
    I may be off base, but was just curious.
    I didn't read through the entire "TFT_SPI.PBPMOD", to see if there was another reason you have y0 & y1 defined in ASM as Big Endian.
    Regards,
    TABSoft

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


    Did you find this post helpful? Yes | No

    Default Re: A tft addin for pbp3

    good catch tabsoft , I missed that when I changed the setxy method and never finished "cleaning up" . the two hardware includes have been fixed also (same error)
    y0,y1 are now words and usercommand macros are more consistent
    version 1.1 for these files (already)
    Attached Files Attached Files

  3. #3
    Join Date
    Oct 2013
    Posts
    41


    Did you find this post helpful? Yes | No

    Default Re: A tft addin for pbp3

    I download python 2.7.10 version for windows and when I run it I get some errors.
    When I open script FLASH.py and pres F5 button run module I got this message:




    Python 2.7.10 (default, May 23 2015, 09:40:32) [MSC v.1500 32 bit (Intel)] on win32
    Type "copyright", "credits" or "license()" for more information.
    >>> ================================ RESTART ================================
    >>>

    Traceback (most recent call last):
    File "C:\Python27\flash.py.TXT", line 6, in <module>
    import serial
    ImportError: No module named serial
    >>>

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


    Did you find this post helpful? Yes | No

    Default Re: A tft addin for pbp3

    ImportError: No module named serial

    as I said you need to install some python extensions too


    the serial module is pyserial
    http://www.lfd.uci.edu/~gohlke/pythonlibs/

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