LCD_AnyPin.pbp


+ Reply to Thread
Results 1 to 40 of 109

Thread: LCD_AnyPin.pbp

Hybrid View

  1. #1
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    Yes, we've done that.

    If you don't need to scatter the data bus pins, you can do it with this ...
    http://www.picbasic.co.uk/forum/show...=2388#post2388

    Or if the data bus need to be scattered, there's this thread ...

    In particular post #35, but read the whole thread.
    http://www.picbasic.co.uk/forum/showthread.php?t=7596
    DT

  2. #2
    Join Date
    Jul 2011
    Posts
    14


    Did you find this post helpful? Yes | No

    Default Re: LCD_AnyPin.pbp

    Hi,

    I have try with succes the library but I have a strange error. I have compiled this simple part of code:

    Code:
    LCD_DB4         var PORTB.1
    LCD_DB5         vAR PORTB.2
    LCD_DB6         VAR PORTB.3
    LCD_DB7         VAR PORTB.4
    LCD_RS          VAR PORTB.5
    LCD_E           VAR PORTC.5
    LCD_LINES       CON 1
    LCD_DATAUS      CON 50
    LCD_COMMANDUS   CON 1500
    OSC             con 20
    
    TRISA.0 = 1
    TRISB = 0
    TRISC = 0
    
    INCLUDE "LCD_AnyPin.pbp"
    
    pause 500
    lcdout $FE,1
    pause 250
    
    Main:
        lcdout $FE, $80, "Abcdef"
    Ever:
        high PORTA.1
        PAUSE 500
        LOW PORTA.1
        PAUSE 500
    GOTO Ever
    When I run this I see odd things like "AAdfg" or " dAfg" etc etc. I think that is a timing error, you have suggestion for this kind of error?

    Thank you (and sorry for my bad english).

  3. #3
    Join Date
    Jan 2006
    Location
    Istanbul
    Posts
    1,185


    Did you find this post helpful? Yes | No

    Default Re: LCD_AnyPin.pbp

    What is this "OSC con 20" doing in there?
    "If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte

  4. #4
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,827


    Did you find this post helpful? Yes | No

    Default Re: LCD_AnyPin.pbp

    Also use these:

    Code:
    DEFINE LCD_COMMANDUS 2000
    DEFINE LCD_DATAUS 100
    NOT these:
    Code:
    LCD_DATAUS      CON 50
    LCD_COMMANDUS   CON 1500
    Ioannis

  5. #5
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default Re: LCD_AnyPin.pbp

    It should be the constants, not the defines.

    But Sayzer is right. OSC con 20 will not compile if you have used DEFINE OSC 20.
    Which means PBP thinks your PIC is running at 4Mhz.
    DT

  6. #6
    Join Date
    Jul 2011
    Posts
    14


    Did you find this post helpful? Yes | No

    Default Re: LCD_AnyPin.pbp

    Quote Originally Posted by Darrel Taylor View Post
    It should be the constants, not the defines.

    But Sayzer is right. OSC con 20 will not compile if you have used DEFINE OSC 20.
    Which means PBP thinks your PIC is running at 4Mhz.
    Sorry you guys, I wrote:

    OSC WITH 20

    but I had to write:

    DEFINE OSC 20

    I could not understand the error because it compiled correctly. Thanks to all.

  7. #7
    Join Date
    Mar 2009
    Location
    Colorado
    Posts
    378


    Did you find this post helpful? Yes | No

    Default Re: LCD_AnyPin.pbp

    Was LCD_AnyPin included in PBP version 2.6 as was suggested a couple of times in this thread? If not, why not?

Members who have read this thread : 2

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