LCD BARgraphs


Results 1 to 40 of 233

Thread: LCD BARgraphs

Threaded View

  1. #20
    Join Date
    Jul 2005
    Posts
    65


    Did you find this post helpful? Yes | No

    Smile

    Hi Acetronics

    I had the same problem, when you use the macro, be careful about the letters upper and lower case thingy, I mean Blocks and blocks are different when you use MPASM. Darrel wrote blocks in LCDbar_INC file in the difintions, so you have to use blocks, not Blocks in the macro, the same applies for lines and boxed. This worked fine for me.

    For example:

    Code:
    ' In LCDbar_INC file you will find the following definitions that darrel wrote:
    ASM
    lines = 0x10000001                            ; Define the Styles
    boxed = 0x10000002
    blocks = 0x10000003
    ENDASM
    ' No need to change them nay way...
    
    In your code, you will use this macro:
    ;  BARgraph   Value, Row, Col, Width, Range, Style
    @ BARgraph  _VOL_L,   2,   0,    20,   255, Blocks    ' Doesn't work
    
    ;  BARgraph   Value, Row, Col, Width, Range, Style
    @ BARgraph  _VOL_L,   2,   0,    20,   255, blocks    ' Works fine
    In order to change to Blocks, Lines, and Boxed. Instead of block, lines, and boxed, you have to change the following in LCDBar_INC file:
    Code:
    ASM
    Lines = 0x10000001                            ; Define the Styles
    Boxed = 0x10000002
    Blocks = 0x10000003
    ENDASM
    And this too:
    Code:
        if ((Style >= Lines) & (Style <= Blocks)) ; Is Style a valid constant ?
            MOVE?CB    Style, _BAR_style
        else                                      ; NO, treat it like a variable
            MOVE?BB    Style, _BAR_style
        endif
    After that you can use Blocks, Lines, and Boxed in your code macro.
    Last edited by crematory; - 14th January 2006 at 18:38.

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, 20:14
  2. 16f688 LCD what have I done wrong
    By spitfiredriver in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 8th August 2009, 20:54
  3. Play with LCD on PICDEM
    By The IceMan in forum mel PIC BASIC
    Replies: 5
    Last Post: - 22nd August 2008, 17:56
  4. Need help with LCD number display.
    By Steve Matson in forum mel PIC BASIC
    Replies: 8
    Last Post: - 27th June 2007, 00:07
  5. LCD will not start
    By btaylor in forum mel PIC BASIC Pro
    Replies: 49
    Last Post: - 24th May 2007, 03: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