Graphical Displays with PBP3


+ Reply to Thread
Results 1 to 40 of 115

Hybrid View

  1. #1
    Join Date
    Dec 2010
    Location
    Melbourne Australia
    Posts
    172


    Did you find this post helpful? Yes | No

    Default Re: Graphical Displays with PBP3

    Worked! I can now run things on the smaller package.

    Legend!

    Troy

  2. #2
    Join Date
    Dec 2010
    Location
    Melbourne Australia
    Posts
    172


    Did you find this post helpful? Yes | No

    Default Re: Graphical Displays with PBP3

    Richard,
    Curious Question:
    I was feeding a 10bit rotary encoder into the PIC (RB0-RB5 & RA0-RA3) with the display connected and I was stumped to figure out why I wasn't getting any input signal into the PortA pins and also 1 of the PortB pins. After a while I realised they were acting as outputs not inputs even though I declared them as inputs before the display initialisation. After some head scratching, I tried setting their TRIS status *after* the display initialisation and that appeared to fix that. So, I think I can maybe see where the PortB pin may have been set (behind the scenes), but can't see where the PortA pins where set as outputs? Does that have anything to do with the LCDOUT command call in the initialisation instructions?

    Troy
    Last edited by rocket_troy; - 14th October 2022 at 02:35.

  3. #3
    Join Date
    Dec 2010
    Location
    Melbourne Australia
    Posts
    172


    Did you find this post helpful? Yes | No

    Default Re: Graphical Displays with PBP3

    Another Question:
    In your graphics file for the FillRect code you have:

    frect:
    s_ystart=y0
    s_yend=y0
    while y1
    s_xstart=x0
    s_xend=x0+s_xend-1
    gosub dLine
    s_ystart=s_ystart+1
    s_yend=s_ystart
    y1=y1-1
    wend
    return

    Shouldn't that line be s_xend=x1+s_xend-1 ?

    Troy

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


    Did you find this post helpful? Yes | No

    Default Re: Graphical Displays with PBP3

    Does that have anything to do with the LCDOUT command call in the initialisation instructions?
    if you mean the highlighted text below , then yes that an error and should be removed for serial i/f usage
    and may impact portb

    Code:
        ANSELB=0
        ANSELC=0
        ANSELA=0 
        Pause  500      ' LCD initialize time
        lcdout $FE,1
        gosub st7920_init    'graphic mode
        gosub grf_clr
        n=0
        setfont FONT5x7
        ARRAYWRITE BUFF,["- scroll test -"]
        DMDSTR 18,0, Buff,1
        ARRAYWRITE BUFF,["- some  text to    test -"]
        DMDSTR 6,8, Buff,1
        SETFONT bignum
        bgcolour=0
        direction=0
         gosub show
     main:   
        n= n+1


    Shouldn't that line be s_xend=x1+s_xend-1 ?
    my ver is , you are using an old version , the ver of grx.pbpmod in post 10 has vertical line fixed but fillrect got mangled
    post 59 ver has both of those fixed , yet to discover what else may be broken

    Code:
    frect:
        s_ystart=y0
        s_yend=y0
        while y1
            s_xstart=x0
            s_xend=x0+x1-1
            gosub dLine
            s_ystart=s_ystart+1
            s_yend=s_ystart
            y1=y1-1
        wend
    return
    Last edited by richard; - 14th October 2022 at 03:48.
    Warning I'm not a teacher

  5. #5
    Join Date
    Dec 2010
    Location
    Melbourne Australia
    Posts
    172


    Did you find this post helpful? Yes | No

    Default Re: Graphical Displays with PBP3

    Cool, so assuming that fixes the FillRect (I'll find out this evening) everything should be dandy.

    Troy

  6. #6
    Join Date
    Dec 2010
    Location
    Melbourne Australia
    Posts
    172


    Did you find this post helpful? Yes | No

    Default Re: Graphical Displays with PBP3

    Hi Richard,
    Finished up giving up on the serial connection as it was just a bit flaky ie. characters and graphics didn't always display cleanly etc. That might've been a wiring issue - not sure. Anyhow, with your advice on the parallel interface (using the higher 4 bits & grounding the lower 4) I got that working and it appears to be much cleaner.
    Question on fonts: I was trying to make some 28pt fonts but there appeared to be some overrun. Scaled back to 24 and that appeared to work fine. So, there's a size limit on fonts around that 24pt size?

    Thanks,

    Troy

  7. #7


    Did you find this post helpful? Yes | No

    Default Re: Graphical Displays with PBP3

    Hey Richard, just out of curiosity, is this written in PIC Basic? I’m guessing probably not. Either way, good job!
    In the meantime, I’ve switched from Basic to C and to the RISC-V architecture.
    But from time to time, I like to look in here to see what’s new.
    This forum gave me a lot of useful information, for which I’m grateful, so I’m glad it’s still active and alive here.
    Louis

  8. #8
    Join Date
    May 2013
    Location
    australia
    Posts
    2,696


    Did you find this post helpful? Yes | No

    Default Re: Graphical Displays with PBP3

    Ioannis
    Seems there is an error in the word DEMO. Looks like DEMC
    one thing i cannot master is taking a video of led displays that shows the true colours especially if the display is multiplexed
    there is no error the camera does lie


    rsocor01
    Are you using the WS2812 LEDs?
    at 512 pixels per panel * 8 panels * 3 colours [24 bits] per pixel = 12288 bytes , no 8 bit pic to date has that much memory so no,
    google "p10 rgb led module"
    thats 3 bits per pixel or 1536 bytes but 1/4 scan multiplexing needed [the panels come in various flavors of multiplexing format]
    my code only supports AB zigzag format

    Louis
    Hey Richard, just out of curiosity, is this written in PIC Basic? I’m guessing probably not. Either way, good job!
    In the meantime, I’ve switched from Basic to C and to the RISC-V architecture.
    But from time to time, I like to look in here to see what’s new.
    This forum gave me a lot of useful information, for which I’m grateful, so I’m glad it’s still active and alive here.
    yes it is in pbp3, although crucial bits that need speed are done in asm code. its customized to run on pic18fxxk22 series
    it can support 1 to 8 panels

    i do have better C versions that support up to 10 panels in xc8 or xc16 running pic18f47q43 and PIC24FJ128GA204
    Warning I'm not a teacher

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


    Did you find this post helpful? Yes | No

    Default Re: Graphical Displays with PBP3

    one panel
    Warning I'm not a teacher

Similar Threads

  1. Replies: 3
    Last Post: - 1st January 2021, 22:28
  2. problem using Graphical LCD
    By Mostafa in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 18th July 2007, 19:15
  3. Graphical LCDs
    By T.Jackson in forum General
    Replies: 5
    Last Post: - 14th May 2007, 07:29
  4. Vb 6.0 Graphical plug in
    By rocky79 in forum Serial
    Replies: 0
    Last Post: - 8th March 2006, 19:42
  5. Graphical user interface
    By rocky79 in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 15th October 2005, 13:25

Members who have read this thread : 21

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