Box and Circle not working with 128x64 GLCD


+ Reply to Thread
Results 1 to 9 of 9
  1. #1
    Junior Member
    Join Date
    May 2004
    Posts
    38
    Thumbs Up
    Received: 0
    Given: 2
    Total Downloaded
    2.30 GB

    0 Not allowed!

    Default Box and Circle not working with 128x64 GLCD

    Hi,
    I am starting to work on a project that will require a GLCD. I have been trying to get Box and Circle to work using Proteus (18GLCD) and have come up with some strange results.

    See attachment .

    Text works ok .
    Get the same results on my development board using a 128x64 GLCD .
    Code is below.
    Any ideas ?

    Compiler Version 3.5.7.3

    Device = 18F452
    Declare Xtal = 4

    ' Graphic LCD Pin Assignments

    Declare LCD_Type Samsung

    Declare LCD_DTPort PORTD

    Declare LCD_RSPin PORTC.1

    Declare LCD_RWPin PORTC.0

    Declare LCD_ENPin PORTE.0

    Declare LCD_CS1Pin PORTE.1

    Declare LCD_CS2Pin PORTE.2

    Declare Internal_Font On

    Declare Font_Addr = 0


    Dim Xpos As Byte
    Dim Ypos As Byte
    Dim Size As Byte
    Dim SetClr As Byte

    Main:
    Cls
    Print At 0,1,"Hello World"
    DelayMS 5000
    Cls
    Xpos = 63
    Ypos = 32
    Size = 20
    SetClr = 1
    Box SetClr,Xpos,Ypos,Size
    delayms 100
    Stop

    Include "Font.Inc"
    Attached Thumbnails Attached Thumbnails Capture.JPG‎  

  2. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  3. #2
    Prolific Poster hadv215's Avatar
    Join Date
    Sep 2009
    Posts
    1,136
    Thumbs Up
    Received: 66
    Given: 26
    Total Downloaded
    3.61 GB

    0 Not allowed!

    Default Re: Box and Circle not working with 128x64 GLCD

    Hi, I just tested it with an actual GLCD and both box and circle work fine.

  4. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  5. #3
    Junior Member
    Join Date
    May 2004
    Posts
    38
    Thumbs Up
    Received: 0
    Given: 2
    Total Downloaded
    2.30 GB

    0 Not allowed!

    Default Re: Box and Circle not working with 128x64 GLCD

    Hi
    Thanks for that. I have put together a 18F452 and GLCD and it works fine ....not sure why it doesn't in proteus.....

  6. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  7. #4
    Broderic
    Guest

    0 Not allowed!

    Default Re: Box and Circle not working with 128x64 GLCD

    Hello.

    I'm using GLCD GDM12864H with this code:

    Code:
    Device = 18F45K22
    Declare Xtal = 8
    
    
    ' Graphic LCD Pin Assignments 
    
    
    Declare LCD_Type Samsung
    
    
    Declare LCD_DTPort PORTD
    
    
    Declare LCD_RSPin PORTB.2 
    
    
    Declare LCD_RWPin PORTB.3
    
    
    Declare LCD_ENPin PORTB.4 
    
    
    Declare LCD_CS1Pin PORTB.0 
    
    
    Declare LCD_CS2Pin PORTB.1 
    
    
    Declare Internal_Font On
    
    
    Declare Font_Addr = 0
    
    
    
    
    Dim Xpos As Byte
    Dim Ypos As Byte
    Dim Radius As Byte
    Dim SetClr As Byte
    
    
    Main:
    
    
    Cls 
    Print At 0,0,"Hello World I'm here"
    DelayMS 2000 
    Cls 
    Xpos = 63 
    Ypos = 32 
    Radius = 10 
    SetClr = 1
    Circle SetClr,Xpos,Ypos,Radius
    DelayMS 100 
    Stop
    
    
    Include "Font.Inc"
    I have the wanted text and image but with a black backgroung (unwanted) (see enclosed).

    I'm using Proton with EasyPic7.

    Any help would be appreciate.

    Thanks

    B
    Attached Thumbnails Attached Thumbnails Unproper Image on GLD.JPG‎  

  8. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  9. #5
    Broderic
    Guest

    0 Not allowed!

    Default Re: Box and Circle not working with 128x64 GLCD

    Hello.
    I made steps forward:
    - swapping CS1 and CS2 (to PORTB.1 and PORTB.0) and adding
    Declare GLCD_CS_Invert On, I have images with the right contrast.

    But now I still have same wrong image as Chris in first post (vertical lines are dotted and not continuous (1 dot each 8 pixels), when I draw rectangles with the Proton sample.

    Has someone any idea how to solve?

    Thanks a lot

    B

  10. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  11. #6
    Broderic
    Guest

    0 Not allowed!

    Default Re: Box and Circle not working with 128x64 GLCD

    I sorted out by changing the PIC to 18F452.

    But what are the main differences in configuration or port setting between 18f452 and 18f45k22 that could cause such a behaviour?

    Thanks a lot

    B

  12. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  13. #7
    Prolific Poster normnet's Avatar
    Join Date
    Jul 2004
    Posts
    2,392
    Thumbs Up
    Received: 79
    Given: 46
    Total Downloaded
    1.40 GB

    0 Not allowed!

    Default Re: Box and Circle not working with 128x64 GLCD

    Quote Originally Posted by Broderic View Post
    I sorted out by changing the PIC to 18F452.

    But what are the main differences in configuration or port setting between 18f452 and 18f45k22 that could cause such a behaviour?

    Thanks a lot

    B
    The usual suspects are default analog pins or a sink only pin which requires a pull up resistor.
    Study the data sheet.

  14. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  15. #8
    Broderic
    Guest

    0 Not allowed!

    Default Re: Box and Circle not working with 128x64 GLCD

    You're right, Norm.
    One has PORTD analog at reset and the other digital.
    I put ANSELD=0 and solved.

    Also LATD in DTPort declaration instead of PORTD gives problem.

    Code:
    Device = 18F45K22
    Declare Xtal = 8
    'Declare Optimiser_Level = 2
    ' Graphic LCD Pin Assignments 
    Declare LCD_Type Samsung
    Declare LCD_DTPort PORTD
    Declare LCD_RSPin PORTB.2 
    Declare LCD_RWPin PORTB.3
    Declare LCD_ENPin PORTB.4 
    Declare LCD_CS1Pin PORTB.0 
    Declare LCD_CS2Pin PORTB.1
    Declare LCD_RSTPin PORTB.5
    Declare Internal_Font On
    'Declare GLCD_CS_Invert On 
    
    
    Dim Xpos As Byte
    Dim Ypos As Byte
    Dim Size As Byte
    Dim SetClr As Byte
    
    
    ANSELD=0
    ANSELB=0
     
    Main:
    Cls 
    DelayMS 10
    Print At 0,3, "Hello World"
    DelayMS 1000 
    Xpos = 63 
    Ypos = 32 
    Size = 20 
    SetClr = 1
    Box SetClr,Xpos,Ypos,Size
    DelayMS 100 
    Stop
    
    
    Include "Font.Inc"
    Thanks a lot

    B

  16. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  17. #9
    Prolific Poster normnet's Avatar
    Join Date
    Jul 2004
    Posts
    2,392
    Thumbs Up
    Received: 79
    Given: 46
    Total Downloaded
    1.40 GB

    0 Not allowed!

    Default Re: Box and Circle not working with 128x64 GLCD

    How about a thumbs up?
    Just one please.
    Click the green thumb once and it should turn red.

  18. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Similar Threads

  1. [SOLVED !] GLCD 128x64 Compile Error
    By jukuo in forum Proton Plus Compiler v3
    Replies: 0
    Last Post: 7th June 2013, 08:30
  2. GLCD Not Working
    By alanrob in forum Proton Development Board
    Replies: 18
    Last Post: 15th May 2010, 15:07
  3. [SOLVED !] Bitmap convertor for 128x64 GLCD ?
    By Fregerd in forum Proton Plus Compiler v3
    Replies: 4
    Last Post: 2nd October 2009, 06:47
  4. Working with windows in GLCD
    By SELCUK in forum Proton Plus Compiler v3
    Replies: 20
    Last Post: 20th August 2009, 13:07
  5. GLCD allmost working
    By sn00zerman in forum Proton Plus Compiler v3
    Replies: 1
    Last Post: 9th January 2008, 14:02

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts