LCD BARgraphs


Closed Thread
Results 1 to 40 of 233

Thread: LCD BARgraphs

Hybrid View

  1. #1
    Join Date
    Aug 2007
    Posts
    26


    Did you find this post helpful? Yes | No

    Question

    Hello!

    I've try to get some bar from this and I've got problem as usual ;-)


    So this is little code from me:
    INCLUDE "LCDbar_INC.bas" ' Include the BARgraph routines


    DEFINE LCD_DREG PORTB
    DEFINE LCD_DBIT 4
    DEFINE LCD_RSREG PORTB
    DEFINE LCD_RSBIT 1
    DEFINE LCD_EREG PORTB
    DEFINE LCD_EBIT 0
    DEFINE LCD_BITS 4
    DEFINE LCD_LINES 2
    DEFINE LCD_COMMANDUS 2000
    DEFINE LCD_DATAUS 50



    INPUT PORTA.0

    i var word


    LCDOUT $FE, 1 'clean screen

    while PORTA.0 = 0
    i = i+1
    LCDOUT $FE,2,"Value = ",DEC i," "
    ' syntax- BARgraph Value, Row, Col, Width, Range, Style
    @ BARgraph _Value, 2, 0, 16, 255, lines
    Pause 100
    wend


    As You can see in picture I've got problem when compiling with LCDbar_INC.bas...and get'+s lot lines of syntax error in INCLUDE file......off course I didn't make anything to this file...just copy -> paste....


    Do You know what couses this problem?
    Attached Images Attached Images  

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


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Marin View Post
    ' syntax- BARgraph Value, Row, Col, Width, Range, Style
    @ BARgraph _Value, 2, 0, 16, 255, lines
    _Value should be _i in this case.

    The comments a little confusing at first, but once you figure it out, it just seems natural.
    <br>
    DT

  3. #3
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default

    Hi Marin,
    To use Darrel's tidy little include files, you must place a copy of his file in the same directory as your code's file is in, and you must use MPASM as the assembler, not PM.
    JS
    Oh, and do they ever work sweet too!
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

  4. #4
    Join Date
    Aug 2007
    Posts
    26


    Did you find this post helpful? Yes | No

    Default

    OK!

    Joe, is they any way to this be compiled in PM with some changes in .INCLUDE file?

  5. #5
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,133


    Did you find this post helpful? Yes | No

    Default

    If Darrel would make major changes it might!

    But then again why would he? MPASM is much better assembler!

    You still have your beloved compiler to write your code. Let Microchip do the job that knows better than anyone third.

    Ioannis

  6. #6
    Join Date
    Aug 2007
    Posts
    26


    Did you find this post helpful? Yes | No

    Default

    GOnna go to MPLAB now.....

    Can somebody explain me using MPSAM with mine MicroCode Stuio PicBasic Pro?

    With that I still gona write code in code studio or?
    Last edited by Marin; - 8th August 2007 at 16:57.

  7. #7
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,133


    Did you find this post helpful? Yes | No

    Default

    No additional code.

    Just set up the Microcode Studio to use MPASM from View/Compile and Program Options/Assembler and check the Use MPASM checkbox.

    On your programmer set the fuses accordingly to your program/xtal

    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