LCD BARgraphs


Closed Thread
Results 1 to 40 of 233

Thread: LCD BARgraphs

Hybrid View

  1. #1
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    Like Alain said way up there.

    Due to the spaces between the characters landing on an Odd number, vertical bargraphs on LCD displays don't work very well.

    Bummer!
    <br>
    DT

  2. #2
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,653


    Did you find this post helpful? Yes | No

    Question ????????????????????????????

    Hi, Darrel

    Could you explain those lines to me :

    ASM
    lines = 0x10000001 ; Define the Styles
    boxed = 0x10000002
    blocks = 0x10000003
    ENDASM

    (From LCD_Bar.inc ) ...

    My MPLAB 7.30 seems not to understand it ( comes in red ) ... nor me !!!

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  3. #3
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    Hi Alain,

    Those just assign some unique ID's to the words lines, boxed and blocks.

    I used numbers outside the 16-bit range of PBP just to minimize confusion for myself. Then when PBP uses the number, all it sees is 1, 2 or 3.

    I haven't bothered downloading the latest MPLAB so I hadn't seen any problem yet. But it should be ok to just make them 1, 2 and 3
    Code:
    ASM
    lines  = 1                            ; Define the Styles
    boxed  = 2
    blocks = 3
    ENDASM
    <br>
    DT

  4. #4
    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 17:38.

  5. #5
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    Seems like a lot of work to rewrite a program to use a different Case, when you can just turn off case sensitivity for MPASM, and use any case.

    For MicroCode Studio Plus:
    From View | Picbasic Options... | Assembler Tab and Options tab
    uncheck the "Case sensitive" Checkbox
    Press OK
    The Microchip MPASM checkbox must be checked to see the Case option.

    For other editors, or dos:
    Add -c to the MPASM command line.
    <br>
    DT

  6. #6
    Join Date
    Jul 2005
    Posts
    65


    Did you find this post helpful? Yes | No

    Default

    Hi darrel

    I could have said that, as a matter of fact, being careful about letter cases while writing a code, prevented me of throwing that note about "uncheck the Case sensitive Checkbox", thats all darrel,

  7. #7
    Join Date
    Oct 2005
    Location
    New Jersey
    Posts
    425


    Did you find this post helpful? Yes | No

    Default

    I have never used an include file other than the ones provided with PBP. I am getting an error trying to load the include file from Darrel. The only thing I can think of is that I have it in the wrong place. Can someone tell me where I have to put it?

    Thanks,

    Chris

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