LCD BARgraphs


Closed Thread
Results 1 to 40 of 233

Thread: LCD BARgraphs

Hybrid View

  1. #1
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,612


    Did you find this post helpful? Yes | No

    Default Re: LCD BARgraphs

    I just downloaded the code (LCDbar_AD_Demo) from the second post and it compiled just fine.

    The code tries to set the CONFIG bits so for now, try commenting out or deleting the very first line:
    Code:
     ' @ __CONFIG _CONFIG1H, _OSCS_OFF_1H & _HS_OSC_1H   ' <-- Comment this line. Set oscillator to (HS)
    I don't think this is the problem but I hope so because if it's not I have no idea :-(

  2. #2
    Join Date
    Jan 2011
    Location
    Skopje,Macedonia
    Posts
    71


    Did you find this post helpful? Yes | No

    Default Re: LCD BARgraphs

    I'am so angry cause I can't compile the code.Can somebody compile it and put the hex file on the forum,then I can download it and program the PIC with it.I use 2*16 LCD display.

  3. #3
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,612


    Did you find this post helpful? Yes | No

    Default Re: LCD BARgraphs

    Hi,
    In order to compile it for you we must at least know which PIC you're using and what you're oscillator speed is.

    Which version of PBP are you trying to compile this with and for which PIC?

  4. #4
    Join Date
    Oct 2005
    Posts
    34


    Did you find this post helpful? Yes | No

    Default Re: LCD BARgraphs

    Quote Originally Posted by SKOLS1 View Post
    I'am so angry cause I can't compile the code.Can somebody compile it and put the hex file on the forum,then I can download it and program the PIC with it.I use 2*16 LCD display.
    Did you try the bar graph code that I have posted at the beginning of this thread? it is standalone and no include files to worry about, no need to download just copy the code and paste it.
    You can't teach an old dog new tricks, but I'm always willing to try.

  5. #5
    Join Date
    Jan 2011
    Location
    Skopje,Macedonia
    Posts
    71


    Did you find this post helpful? Yes | No

    Default Re: LCD BARgraphs

    I fix the problem with the extension of the file LCDbar_INC.bas, but now I have this problem I compile the code but can I use 2*16 LCD display?I use PIC16F887 @ 20MHz
    Last edited by SKOLS1; - 29th May 2011 at 12:45.

  6. #6
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default Re: LCD BARgraphs

    Sure you can.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  7. #7
    Join Date
    Jan 2011
    Location
    Skopje,Macedonia
    Posts
    71


    Did you find this post helpful? Yes | No

    Default Re: LCD BARgraphs

    But now it's working,baragraph isn't showing on the LCD display,just Value: 1,2 etc.
    I use 2*16 LCD display.Should I change the code in LCDbar_INC.bas

  8. #8
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default Re: LCD BARgraphs

    Must be intranet interference, my crystal ball refuse to give me your code, could you post your code here and PIC model, so we could see what's wrong with?
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  9. #9
    Join Date
    Aug 2013
    Posts
    1


    Did you find this post helpful? Yes | No

    Default Re: LCD BARgraphs

    In this code what does "Rep" do? I'm using it with the Proton IDE Basic Compiler.
    It works OK, but I am curious as I can't find any reference to "Rep" in the documentation.
    Is it a repeat function?

    Thanks, Mark

    Print $FE, CGRAM, Rep $0\8,$0, Rep $10\6,$0,$0, Rep $14\6,$0,$0, Rep $15\6,$0,$0

    Warnings = OFF
    Byte_Math = On
    BARS = (TOP_BAR Min MAXBAR) / 3 ; One full bar for each 3 graph units
    BALANCE = (TOP_BAR Min MAXBAR) //3 ; Balance is the remainder after a division by 3
    BALF = BALANCE Min 1
    Print At 1,1, Dec3 POWERMAX, "W "
    Print At 1,6, Rep FULLBAR\BARS,Rep (BALANCE + BASEBAR)\BALF,Rep " "\B_WDTH - (BARS + BALF)
    BARS = (LOW_BAR Min MAXBAR) / 3 ; One full bar for each 3 graph units
    BALANCE = (LOW_BAR Min MAXBAR) //3 ; Balance is the remainder after a division by 3
    BALF = BALANCE Min 1

  10. #10
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,132


    Did you find this post helpful? Yes | No

    Default Re: LCD BARgraphs

    You are on the wrong forum. Here is MELABS PicBasic Forum.

    But anyway, REP is just repeating the next character \times

    Ioannis

Similar Threads

  1. Is this code not initialising the LCD properly?
    By Platypus in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 30th January 2010, 19:14
  2. 16f688 LCD what have I done wrong
    By spitfiredriver in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 8th August 2009, 19:54
  3. Play with LCD on PICDEM
    By The IceMan in forum mel PIC BASIC
    Replies: 5
    Last Post: - 22nd August 2008, 16:56
  4. Need help with LCD number display.
    By Steve Matson in forum mel PIC BASIC
    Replies: 8
    Last Post: - 26th June 2007, 23:07
  5. LCD will not start
    By btaylor in forum mel PIC BASIC Pro
    Replies: 49
    Last Post: - 24th May 2007, 02:30

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