Lcd


Results 1 to 8 of 8

Thread: Lcd

Threaded View

  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.

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