Lcd


Closed Thread
Results 1 to 8 of 8

Thread: Lcd

  1. #1
    Join Date
    Jun 2006
    Location
    Greece
    Posts
    302

    Default Lcd

    I have found this code , but i don't understand that.
    If some know how to work , please to explain;

    Code:
       value       var Word
        fullbars	VAR	BYTE			' Number of full bars at left of graph
        barval		VAR	BYTE			' Value passed to bargraph routine
        partbar		VAR	BYTE			' ASCII code for partial bar character
        pad			VAR	BYTE			' Number of spaces to pad to the right of graph
    
        LCDOut $FE,64,REP $0\8			' Load blank character (ascii $0)
    
        
        LCDOut $FE, 1					' Clear the display	
        
    
        barval = (value/9)+1	            ' Scale 0-500 to 60 segment bargraph (1-56)
        
      	fullbars = (barval MIN 60)/3		' Calculate number of full bars (|||). 
      	
    	' partbar holds the ascii code for the partial bar character: $0=" ", $1="|", or $2="||"
    
      	partbar = (barval MIN 60)//3		' Calculate ascii code for partial bar character		 
      	
      	pad = 19 - fullbars					' Number of spaces to fill display width.
      	  	
    	LCDOut $FE,$D0,"VU: ", REP $3\fullbars, partbar, REP " "\pad
    Last edited by savnik; - 27th November 2006 at 16:03.

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


    Did you find this post helpful? Yes | No

    Default

    I saw the very original program on the parallax site ... explanations foundable there !!!

    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
    Jun 2006
    Location
    Greece
    Posts
    302


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Acetronics
    I saw the very original program on the parallax site ... explanations foundable there !!!

    Alain
    I use this code with picbasic pro (a part of the code)

  4. #4
    Join Date
    Mar 2005
    Location
    Iowa, USA
    Posts
    216


    Did you find this post helpful? Yes | No

    Default

    At first glance, it looks like a routine to do bar graphs on your LCD. If that's what you're after, take a look at Darrel's bar graph include http://www.picbasic.co.uk/forum/showthread.php?t=2359
    Wisdom is knowing what path to take next... Integrity is taking it.
    Ryan Miller

  5. #5
    Join Date
    Jun 2006
    Location
    Greece
    Posts
    302


    Did you find this post helpful? Yes | No

    Default

    anyone to help me;

  6. #6
    Join Date
    Mar 2005
    Location
    Iowa, USA
    Posts
    216


    Did you find this post helpful? Yes | No

    Question

    Help with what? Documenting (documented) code? Did you take Alain's advice? What exactly do you need. It looks like the code is commented pretty well. You use this code, but don't know how it works?
    Wisdom is knowing what path to take next... Integrity is taking it.
    Ryan Miller

  7. #7
    Join Date
    Jun 2006
    Location
    Greece
    Posts
    302


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by rhino
    Help with what? Documenting (documented) code? Did you take Alain's advice? What exactly do you need. It looks like the code is commented pretty well. You use this code, but don't know how it works?
    I don't find Alain's advice.
    I use Darrel's bar graph , but need more memory.
    Yes i use this code, but i don't know how it works.

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


    Did you find this post helpful? Yes | No

    Default Memory

    Quote Originally Posted by savnik
    I don't find Alain's advice.
    I use Darrel's bar graph , but need more memory.
    Yes i use this code, but i don't know how it works.
    Hi Savnik,
    I had to move up from a 16F628A to a 16F648A to have enough "memory"
    to tryout Darrel's bargraph demo, you will need to compile with MPASM too.
    JS

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. LCD Problem
    By karenhornby in forum General
    Replies: 3
    Last Post: - 19th June 2008, 11:43
  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 : 0

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