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

    Ha, that's funny. Didn't even see it.

    >> I wonder why it doesn't give you an error when compling? <<

    You can DEFINE almost anything you want

    <pre>DEFINE GreatGoogly Moogly</pre>But it only has an effect if it matches up with something the program is expecting to see.
    And, when using MPASM the case has to match too.

    Well, now that you've got things going, I hope the BarGraphs work out for you.
    <br>
    Last edited by Darrel Taylor; - 11th July 2006 at 03:46. Reason: oops, ya beat me Steve.
    DT

  2. #2
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    Yup, i guess the MPASM AND PM IFDEF can't be bypassed like Variable and Labels.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  3. #3


    Did you find this post helpful? Yes | No

    Default

    Hi guys,

    does this work with a pic 16F84A ??

    I get many strange errors !

    .

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


    Did you find this post helpful? Yes | No

    Default

    Does it say something like "... Least significant bits used" ?

    If not, What errors are you getting?
    <br>
    DT

  5. #5


    Did you find this post helpful? Yes | No

    Default

    i've imported the folowing code from this thread:

    DEFINE OSC 4
    INCLUDE "lcdbarIN.bas"
    ' Set LCD Data port
    DEFINE LCD_DREG PORTB
    ' Set starting Data bit (0 or 4) if 4-bit bus
    DEFINE LCD_DBIT 4
    ' Set LCD Register Select port
    DEFINE LCD_RSREG PORTB
    ' Set LCD Register Select bit
    DEFINE LCD_RSBIT 2
    ' Set LCD Enable port
    DEFINE LCD_EREG PORTB
    ' Set LCD Enable bit
    DEFINE LCD_EBIT 3
    ' Set LCD bus size (4 or 8 bits)
    DEFINE LCD_BITS 4
    ' Set number of lines on LCD
    DEFINE LCD_LINES 2
    ' Set command delay time in us
    DEFINE LCD_COMMANDUS 2000
    ' Set data delay time in us
    DEFINE LCD_DATAUS 100.

    DEFINE ADC_BITS 8 ' Number of bits in ADCIN result
    ADCON1.7 = 1 ' Right Justify AD result

    Value VAR WORD ' Must be a WORD even though AD is 8bit
    pause 1000
    LCDOUT $FE, 1, " "
    loop1:

    adcin 2,value

    LCDOUT $FE,2,"Value = ",DEC Value," "

    'syntax- BARgraph Value, Row, Col, Width, Range, Style
    @ BARgraph _Value, 2, 0, 16, 255, lines


    then i get :
    Error line 14: syntax error - this one i believe it's the ADCON1.7 = 1 command
    Warning Line 15: Bad token ";"
    bad expression
    Warning Line 16: Bad token ";"
    bad expression
    Warning Line 17: Bad token ";"
    bad expression
    Warning Line 18: Bad token ";"
    bad expression

    Note:
    The INCLUDE "lcdbarIN.bas" line where the name of the bas file is different because i also had to change to a smaller name due to "cannot include...etc" error

    .

  6. #6
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    mmm, as far as i know... grandpa 16F84 have no A/D converter ... so ADCIN will never ever works with... hence why you have some strange error... i missed that forum
    Last edited by mister_e; - 7th November 2007 at 22:19.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  7. #7


    Did you find this post helpful? Yes | No

    Default

    Hi mister_e,

    you are right...but...

    i tryed to comment the lines :

    'DEFINE ADC_BITS 8 ' Number of bits in ADCIN result
    'ADCON1.7 = 1 ' Right Justify AD result

    and

    'adcin 2,value

    and still the same errors

    .

  8. #8
    Join Date
    Oct 2005
    Posts
    34


    Did you find this post helpful? Yes | No

    Default Bar Graph

    This is my version of the bar graph.
    Code:
    '****************************************************************
    '*  Name    : Bargraph.BAS                                      *
    '*  Author  : Chris Bezuidenhout                                *
    '*  Notice  : Copyright (c) 2005 Micro Developments             *
    '*          : All Rights Reserved                               *
    '*  Date    : 2005/07/19                                        *
    '*  Version : 1.0                                               *
    '*  URL     : http://www.patenttrade.net                        *
    '*  E-mail  : [email protected]                             *
    '*  Mobile  : +27-72-795-0107                                   *
    '*  Notes   : This is a bargraph demo for a 2X20 LCD Display    *
    '*          : it is free to use and distribute by any one       *
    '*          : as long as this Copyright note is not altered or  *
    '*          : removed, can be used as an analog meter.          *
    '*  Device  : PIC16F877 can be altered to work on other devices *
    '****************************************************************
    	INCLUDE "Modedefs.Bas"
    
    DEFINE 	OSC 4		' Set Xtal Frequency 		
    DEFINE LCD_DREG PORTA     ' Set LCD Data port
    DEFINE LCD_DBIT 0         ' Set starting Data BIT (0 OR 4) IF 4-BIT bus
    DEFINE LCD_RSREG PORTA    ' Set LCD Register Select port               
    DEFINE LCD_RSBIT 4        ' Set LCD Register Select BIT                
    DEFINE LCD_EREG PORTE     ' Set LCD Enable port, for other devices, use PORT A or B                           
    DEFINE LCD_EBIT 0         ' Set LCD Enable BIT                         
    DEFINE LCD_BITS 4         ' Set LCD bus side (4 OR 8 bits)             
    DEFINE LCD_LINES 2        ' Set number of lines ON LCD
    
    ' md Declare the Variables md
    
    	counter		VAR		BYTE
    	Text		VAR		BYTE[20]
    	X			VAR		BYTE
    	Y			VAR		BYTE
    PAUSE 500
    Main:	
    '*********Modefy first 5 characters in LCD character generator to display bargraph**********
    		LCDOut $fe,%1000000           'SET CG RAM ADD.
    		FOR X =1 TO 8                 
    		LCDOUT %10000
    		next x
    		FOR X=1 TO 8
    		LCDOUT %11000
    		NEXT X
    		FOR X=1 TO 8
    		LCDOUT %11100
    		NEXT X
    		FOR X=1 TO 8
    		LCDOUT %11110
    		NEXT X
    		FOR X=1 TO 8
    		LCDOUT %11111
    		NEXT X
    		LCDOut $fe,%10000000             'SET DD RAM ADD.
    '		FOR X = 0 TO 255
    '		LCDOUT $FE,1,#X,X
    '		PAUSE 100
    '		NEXT X
    LOOP1:		LCDOUT $FE,1,"This is a test"
    		
    		LCDOUT $FE,$C0          'clear second line and display bar graph
    		LCDOUT 0                'print first character
    		for X= 0 TO 19	        'change 19 to 15 for 16 character display
    		PAUSE 100
    		LCDOUT $FE,$10,1        'move curser back and overprint previous character
    		PAUSE 100
    		LCDOUT $FE,$10,2        'move curser back and overprint previous character
    		PAUSE 100
    		LCDOUT $FE,$10,3        'move curser back and overprint previous character
    		PAUSE 100
    		LCDOUT $FE,$10,4        'move curser back and overprint previous character
    		PAUSE 100
    		LCDOUT $FE,$14          'print next character
    		LCDOUT $FE,0
    		NEXT X
    
     		
     		GOTO LOOP1
    		
     END
    Last edited by ChrisMicro; - 9th January 2008 at 17:26.
    You can't teach an old dog new tricks, but I'm always willing to try.

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


    Did you find this post helpful? Yes | No

    Default

    Chris,

    The Note says "can be used as an analog meter".

    How would you do that?
    <br>
    DT

  10. #10
    Join Date
    Sep 2007
    Location
    USA, CA
    Posts
    271


    Did you find this post helpful? Yes | No

    Default

    It's a slight variation of Les Johnson's bargraph routine, which is in his PBP book. You load the "graphics" of the bar graph into lcd memory, then print solid bars (or blocks) until the final one which is printed as the mod of 3. The above bar graphs use a resolution of five, which has the disadvantage of a space between each five. Les' uses three, because it makes the space between the characters an unnoticed and integral part of the graph. If you don't have Les' book, then look for one of the Proton samples, because they ship with it.

  11. #11
    Join Date
    Oct 2005
    Posts
    34


    Did you find this post helpful? Yes | No

    Default Analog meter

    Quote Originally Posted by Darrel Taylor View Post
    Chris,

    The Note says "can be used as an analog meter".

    How would you do that?
    <br>
    You have to use a chip with AD channels like the 16F818/819 then say for 1 volt you send your 5th character and for 1.4 volt you will send the 5th and the second character for 2.2 volt you will send the 5th character twice and then your first character so your 5th character is your integer and the first four is your decimals after the point, it give you a .2 resolution .2, .4, .6, .8
    Last edited by ChrisMicro; - 22nd January 2008 at 12:35.
    You can't teach an old dog new tricks, but I'm always willing to try.

  12. #12
    Join Date
    Oct 2005
    Posts
    34


    Did you find this post helpful? Yes | No

    Default Sprites

    You can even draw little 5X7 sprites, like a walking man or any 5X7 picture. I have a small basic compiler with some handy tools, where you can create the picture and get the data for your picture. there is also a seven segment tool, it is free to download from my site, but you can only use the compiler with the programmer from Mikro Elektronika, but the tools is handy. look in the right border for free downloads it is the first item
    Last edited by ChrisMicro; - 22nd January 2008 at 13:02. Reason: spel
    You can't teach an old dog new tricks, but I'm always willing to try.

  13. #13
    Join Date
    Jan 2007
    Location
    Houston, TX
    Posts
    96


    Did you find this post helpful? Yes | No

    Wink Nice Work

    DT,
    Really nice work! I will be using this on several of my A2D projects!!
    Padawan-78

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


    Did you find this post helpful? Yes | No

    Smile Thanks Tyson!

    Hope they work out for you.

    You might also want to check out this one ...

    Bargraph query thread
    http://www.pbpgroup.com/modules/newb..._id=37&forum=2
    <br>
    DT

  15. #15
    Join Date
    Mar 2008
    Posts
    13


    Did you find this post helpful? Yes | No

    Default

    Hello !
    First of all , thanks for the LCD codes.
    I applied the code below , it works fine ; but at the first row ; " Value= XXX " always flickering ; like something is writing over the " Value = XXXX " and it's always flickering.
    What is the problem ?
    Code:
    @ DEVICE pic16F877 
    @ DEVICE pic16F877, WDT_on 
    @ DEVICE pic16F877, PWRT_ON 
    @ DEVICE pic16F877, PROTECT_OFF 
    @ DEVICE pic16F877, HS_OSC 
    
    TRISA=%00000001
    TRISB=0 
    TRISE=0 
    INCLUDE "LCDbar_INC.bas" 
    
    ham var word 
    
    
    DEFINE LCD_DREG PORTB 
    DEFINE LCD_DBIT 0 
    DEFINE LCD_RSREG PORTE 
    DEFINE LCD_RSBIT 1 
    DEFINE LCD_EREG PORTE 
    DEFINE LCD_EBIT 0 
    DEFINE LCD_RWREG PORTE 
    DEFINE LCD_RWBIT 2 
    DEFINE LCD_BITS 8 
    DEFINE LCD_LINES 2 
    DEFINE LCD_COMMANDUS 1000 
    DEFINE LCD_DATAUS 225 
    DEFINE ADC_BITS 10 
    DEFINE ADC_CLOCK 2 
    DEFINE ADC_SAMPLEUS 100 
    
    ADCON1=%10001110 
    LOW PORTE.2 
    
    LCDOUT $FE,1 
    PAUSE 200 
    
    Loop1:
        ADCIN  0, ham
        ham=1023-ham
        LCDOUT $FE,2,"Value = ",DEC ham,"   "
        ; syntax- BARgraph   Value, Row, Col, Width, Range, Style
        @         BARgraph  _ham,   2,   0,    16,   1023,  lines
        PAUSE 50
    Goto Loop1
    
    END

  16. #16
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by karamastik View Post
    " Value= XXX " always flickering ; like something is writing over the " Value = XXXX " and it's always flickering.
    Code:
    Loop1:
        ADCIN  0, ham
        ham=1023-ham
        LCDOUT $FE,2,"Value = ",DEC ham,"   "
        ; syntax- BARgraph   Value, Row, Col, Width, Range, Style
        @         BARgraph  _ham,   2,   0,    16,   1023,  lines
        PAUSE 50
    Goto Loop1
    That's because something is always overwriting Value = XXXX. VALUE = XXXX is always overwriting VALUE = XXXX.
    Try ONLY overwriting just the value not the whole string.

  17. #17
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    Pause 50 is a bit low, try to increase it a little bit more.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  18. #18
    Join Date
    Mar 2008
    Posts
    79


    Did you find this post helpful? Yes | No

    Default

    Can I pick someone's brain please?
    I'm at the moment trying to make an auto switchover gadget to change from running on Diesel to Veg Oil once certain temperatures have been reached, and to try and work this out I'm using the easypic5 development board.
    So far: I have a 16f877A programmed so it will switch certain outputs when certain inputs go high all and well
    It even displays what it's doing on the LCD display

    What I'd like to incorporate if its possible is this? or a variation of it the Bargraph but use it as a fuel level sensor, i.e. changing position depending on the level of the fuel in the tank (variable resistor)

    Does anyone know any code that will do that or give me a starting place to play with?
    I know I've got 2 A/D converter inputs on the developement board I can play with that have a 10K pot connected and are configured so I can change the input on either of the RA0, RA1, RA2, RA3, RA4, or RA5 pins and measure the voltage on them ( unfortunatly I'm only just learning about Pic's at the moment and know nothing about A/D and how to use it, I am learning by trying and experimenting But I am a quick learner), so IF anyone has any code they could share with me to show me how to get started with this I'd be grateful Thanks

  19. #19
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    well, once you have the lcd working.. it's just a matter to have few IF-THEN conditions with your ADC value and few HIGH/LOW lines, and you should be in business... maybe i've misundertood something?
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  20. #20
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Does anyone know any code that will do that or give me a starting place to play with?
    I like this one. http://www.rentron.com/PICX2.htm

    It is a little more complicated than ADCIN, but it is still the method I use.
    Follow the code with the data sheet and it should become clear how the ADC works. Complete control.
    Dave
    Always wear safety glasses while programming.

  21. #21
    Join Date
    Mar 2008
    Posts
    79


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mister_e View Post
    well, once you have the lcd working.. it's just a matter to have few IF-THEN conditions with your ADC value and few HIGH/LOW lines, and you should be in business... maybe i've misundertood something?
    Your forgetting im a Pseudo Blonde
    I've no idea how to start off with ADC values or how to use them (at the moment) I've found the easiest way to learn something is by following examples that show you how to get started and then playing from there thats how I got the LCD working in the first place, and then the bargraph, then inputs and outputs... learning.. slowly!

  22. #22
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    No i didn't forget

    let's see first example in this thread
    Code:
    ; Initialize your hardware and LCD first.
    
    DEFINE ADC_BITS 8               ' Number of bits in ADCIN result
    ADCON1.7 = 1                    ' Right Justify AD result
    
    INCLUDE "LCDbar_INC.bas"        ' Include the BARgraph routines
    
    Value  VAR  WORD                ' Must be a WORD even though AD is 8bit
    
    LCDOUT $FE, 1  ' Clear Screen
    
    Loop1:
        ADCIN  0, Value
        LCDOUT $FE,2,"Value = ",DEC Value,"   "
        ; syntax- BARgraph   Value, Row, Col, Width, Range, Style
        @         BARgraph  _Value,   2,   0,    16,   255,  lines
    GOTO Loop1
    You just need to monitor Value variable with some IF-THEN statements after ADCIN line

    Code:
    IF Value>200 then 
            LCDOUT $FE,2,"VALUE>200       "
            endif
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  23. #23
    Join Date
    Mar 2008
    Posts
    79


    Did you find this post helpful? Yes | No

    Default

    Thanks
    I think I'm starting to get parts of it I'll try tomorrow properly when my head isn't so tired
    however i do have one question, how do you tell the pic what port the input is on?
    ie if the pot was connected to portA.0 how would you tell the pic to measure and display the value of that port?
    Hope I've said that clearly enough, sometimes I'm better about thinking about things than trying to explain what I mean

  24. #24
    Join Date
    Oct 2005
    Posts
    34


    Did you find this post helpful? Yes | No

    Default AD routine

    Quote Originally Posted by karenhornby View Post
    Can I pick someone's brain please?
    I'm at the moment trying to make an auto switchover gadget to change from running on Diesel to Veg Oil once certain temperatures have been reached, and to try and work this out I'm using the easypic5 development board.
    So far: I have a 16f877A programmed so it will switch certain outputs when certain inputs go high all and well
    It even displays what it's doing on the LCD display

    What I'd like to incorporate if its possible is this? or a variation of it the Bargraph but use it as a fuel level sensor, i.e. changing position depending on the level of the fuel in the tank (variable resistor)

    Does anyone know any code that will do that or give me a starting place to play with?
    I know I've got 2 A/D converter inputs on the developement board I can play with that have a 10K pot connected and are configured so I can change the input on either of the RA0, RA1, RA2, RA3, RA4, or RA5 pins and measure the voltage on them ( unfortunatly I'm only just learning about Pic's at the moment and know nothing about A/D and how to use it, I am learning by trying and experimenting But I am a quick learner), so IF anyone has any code they could share with me to show me how to get started with this I'd be grateful Thanks
    Here is my code for monitoring the sensors in a car. Note: this method is more accurate than ADCIN
    Code:
    '****************************************************************
    '*  Name    : CarMonitor.PBP                                     *
    '*  Author  : Chris Bezuidenhout                                *
    '*  Notice  : Copyright (c) 2007 Micro Developments             *
    '*          : All Rights Reserved                               *
    '*  Date    : 2007/10/23                                        *
    '*  Version : 1.1.1                                             *
    '*  URL      :http://www.patenttrade.net                             *
    '*          :                                                   *
    '****************************************************************
    INCLUDE "Modedefs.Bas"
    
           OSCCON = %01100000                  'set the intrc osc change bit 4 to logic  1 for 8 MHz
           OSCTUNE = %000000
           
    DEFINE 	OSC		4     ' Set IRC Frequency
    DEFINE ADC_BITS 10       ' Set number of bits in result
    DEFINE ADC_CLOCK 1    ' Set clock source (rc = 3)
    DEFINE ADC_SAMPLEUS 50 ' Set sampling time in microseconds
              
    IgnIn    var     word
    Altin    var     word
    Oilin    var     word
    TempIn   var     word
    ResIn    var     word               'Reserve input
    IgnOut   var     portb.0
    AltOut   var     portb.1
    OilOut   var     portb.2
    TempOut  var     portb.3
    Buzzer   var     portb.4
    ComO     var     portb.5
    SigOut   var     portb.6
    sp2      var     portb.7
    Spin1    var     porta.6
    Spin2    var     porta.7
    X        var     byte
    Y        var     byte
    
    
    TRISA = %11111111          'Porta 0-4 all analog 5 input only pull high
    TRISB = %00000000
    ADCON0 = %11000001
    Pause 2000 ' Wait .5 second 
    ADCON1 = %10000010 ' Set PORTA analog and RIGHT justify result
    
    
    
    OPTION_REG = $7f        ' Enable PORTB pullups
    
    pause 500
    portb = 0
    low Buzzer
         
           
           
    Main:       
           gosub CIgn
           gosub CAlt
           gosub COil
           gosub CTemp
           gosub Send
           
           
    Ignition:
           if ignin = 0 then 
           high Ignout
           gosub Send
           goto main
           endif
           if ignin > 300 then 
           low ignout
           goto Alternator
           endif
    '       if ignin > 0 and ignin < 300 then
           for y = 1 to 3
           gosub CIgn
           gosub Send
           if ignin > 300 then  Alternator
           
           for x = 1 to 2
           high Ignout
           high buzzer
           pause 200
           low buzzer
           pause 200
           next x
           pause 1000
           next y    
           
    '       endif
    Alternator:
               if ignin = 0 then goto main
           low ignout       
           if Altin > 1020 then 
           high altout  '?????????Kalibreer
           for y = 1 to 3
           gosub CAlt
           gosub Send
           if altin < 1020 then Oil
           for x = 1 to 4
           high buzzer
           pause 200
           low buzzer 
           pause 200
           next x
           pause 1000
           next y
           endif
            
    Oil:   
           if ignin = 0 then goto main
           low altout           
           if Oilin > 10 then    'This variable have to be calibrated to sensor unit
           high Oilout           'for a plain on/of it must be set to 0, the pot at minimum 
           for y = 1 to 3        'if there is some contact resistance it can be calibrated acordingly
           gosub COil            'For a analog (resistive) sensor it have to be calibrated to 
           gosub Send            'the sensor
           if oilin < 10 then Temperature    'So is this one
           for x = 1 to 6
           high buzzer
           pause 200
           low buzzer
           pause 200      
           next x
           pause 1000
           next y
           endif
           
    Temperature:
                if ignin = 0 then goto main
           low Oilout
           if tempin < 85 then 
           high tempout
           for y = 1 to 3
           gosub CTemp
           gosub Send
           if tempin > 85 then main
           for x = 1 to 8
           high buzzer
           pause 200
           low buzzer
           pause 200 
           next x
           pause 1000  
           next y
           endif
           low tempout
       goto main         
    CIgn:
           ADCON0 = %11000101             'start ADC  A0
           gosub notdone
           IgnIn.highbyte = ADRESH
           IgnIn.Lowbyte = ADRESL
           write 0,ignin.highbyte
           write 1,ignin.lowbyte
           return
    CAlt:       
           ADCON0 = %11001101             'start ADC A1
           gosub notdone
           altin.highbyte = ADRESH
           altin.Lowbyte = ADRESL
           write 2,Altin.highbyte
           write 3,Altin.lowbyte
           return
    COil:       
           ADCON0 = %11010101             'start ADC A2
           gosub notdone
           oilin.highbyte = ADRESH
           oilin.Lowbyte = ADRESL
           write 4,oilin.highbyte
           write 5,oilin.lowbyte
           return
    CTemp:       
           ADCON0 = %11011101             'start ADC A3
           gosub notdone
           TempIn.highbyte = ADRESH
           TempIn.Lowbyte = ADRESL
           write 6,tempin.highbyte
           write 7,tempin.lowbyte
           return
    CRes:       
           ADCON0 = %11100101             'start ADC A4
           gosub notdone
           resin.highbyte = ADRESH
           resin.Lowbyte = ADRESL
           Return        
    Send:
           serout SigOut, N2400,["A",IgnIn.highbyte,IgnIn.lowbyte,altin.highbyte,altin.lowbyte,Oilin.highbyte,Oilin.lowbyte,Tempin.highbyte,Tempin.lowbyte,resin.highbyte,resin.lowbyte]
           return
    notdone: Pause 5 
           If ADCON0.2 = 1 Then notdone' Wait for low on bit-2 of ADCON0, conversion finished 
           return
    end
    Last edited by ChrisMicro; - 4th July 2008 at 05:16.
    You can't teach an old dog new tricks, but I'm always willing to try.

  25. #25
    Join Date
    Jul 2008
    Location
    TURKIYE-KONYA
    Posts
    51


    Did you find this post helpful? Yes | No

    Default Pbpl Bargraph

    hi darrel...

    i m using pbp 2.50b compiler and using pbpl.

    how can i use your include file with pbpl?

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


    Did you find this post helpful? Yes | No

    Default Pbpl

    For each DIV32, change it to a normal divide ...

    Was: Limit1 = DIV32 10

    &nbsp; To:&nbsp; Limit1 = Limit1 / 10

    or you can combine them with the previous statements

    Limit1 = (BAR_range * 3) / 10

    for all the occurances.

    And change the WORD vars to LONG.
    <br>
    DT

  27. #27


    Did you find this post helpful? Yes | No

    Default LCD bargraph

    hi friends
    I am a new member I can little speak english maybe my errors I am sorry
    My problem is LCD bargraph How I can on pictures project. on pictures LCD 2x16 char , LCD has 32 bars per char has two bars project has two buttons minus and plus I need this projects pic basic code Can you help me. Already tahnks
    Attached Images Attached Images    
    Last edited by tekniker_erhan; - 7th September 2008 at 16:22.

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