Graphical Displays with PBP3


Closed 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

    Quote Originally Posted by richard View Post
    most likely, the displays have two screen memory regions one for graphics the other for the normal lcd character display
    at power up display is in lcd mode, the init routine sets it to graphics, lcds are slow to powerup they cannot be hurried.
    if the display is written to before graphics mode is established then its possible some lcd chrs will be displayed accidently.
    lcd chrs can only be cleared if the display is in lcd mode , graphic pixels can only be set in graphics mode
    both memories are visible on screen no matter what mode is set.
    Yeah, what you've said does make sense. I've played around with all sorts of timings - like up to 10s pause after calling the st7920_init and 2s prior, but I don't think it's my writing to the display that's causing the issue as the signs are already there when I call st7920_init.

    So, are you aware of any commands I can call to initialise the "character" memory before calling st7920_init?

    Thanks,

    Troy

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


    Did you find this post helpful? Yes | No

    Default Re: Graphical Displays with PBP3

    as in my demo
    Code:
        Pause  1500      ' LCD initialize time
        lcdout $FE,1
        gosub st7920_init    'graphic mode
    Warning I'm not a teacher

  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

    [mega facepalm] DUH!!!

    Thanks Richard.

    Troy

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


    Did you find this post helpful? Yes | No

    Default Re: Graphical Displays with PBP3

    Well, the zeros are still appearing even with up to 5 consecutive commands to clear the character memory. However, probably not as often. Definitely is text in the character display memory that's causing it - no doubt about it, but I'm also sure I'm doing something wrong with either the wiring or initialisation. Probably tolerable for now.

    Troy

  5. #5
    Join Date
    May 2013
    Location
    australia
    Posts
    2,717


    Did you find this post helpful? Yes | No

    Default Re: Graphical Displays with PBP3

    at one stage i did init like this

    st7920_init:
    lcdout $FE,$24 'In same instruction cannot alter DL, RE and G at once. Make sure that change DL or G first and then RE.
    Pause 5
    lcdout $FE,$26
    Pause 5
    bgcolour = 0
    colour = 1
    return


    also look at defines' these may need a fiddle if you display is slower than mine
    DEFINE LCD_COMMANDUS 1000 'defines the delay after LCDOUT statement DEFINE LCD_DATAUS 40 'delay in micro seconds


    ps i changed to serial mode, perhaps thats why , i forget
    Warning I'm not a teacher

  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

    Quote Originally Posted by richard View Post
    at one stage i did init like this

    st7920_init:
    lcdout $FE,$24 'In same instruction cannot alter DL, RE and G at once. Make sure that change DL or G first and then RE.
    Pause 5
    lcdout $FE,$26
    Pause 5
    bgcolour = 0
    colour = 1
    return


    also look at defines' these may need a fiddle if you display is slower than mine
    DEFINE LCD_COMMANDUS 1000 'defines the delay after LCDOUT statement DEFINE LCD_DATAUS 40 'delay in micro seconds


    ps i changed to serial mode, perhaps thats why , i forget

    No luck. Maybe 1 in 10 starts I still get the zeros. Tried increasing the DEFINE LCD_COMMANDUS 1000 to 1500 and DEFINE LCD_DATAUS to 100 and inserted the code you suggested. I didn't mention I need to call the graphic mode initialisation routine a few times to get a reasonably reliable initialisation which might trigger alarm bells? So, my hunch is the display might be slightly different or my wiring is missing something: I've wired up RS, E, RW and the 4 high bits of the data bus and 5V rails. I can't think of anything else?

    Troy

  7. #7
    Join Date
    May 2013
    Location
    australia
    Posts
    2,717


    Did you find this post helpful? Yes | No

    Default Re: Graphical Displays with PBP3

    does it make a difference if you power it down verses a reset >\?

    also if you look at the data sheet you can see what commands are needed to make a routine to revert to lcd mode, do a clear screen then return to graphics mode
    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 : 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