LM35DZ + Temp


Results 1 to 14 of 14

Thread: LM35DZ + Temp

Threaded View

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


    Did you find this post helpful? Yes | No

    Default

    what happened in your first example?

    If you used DEC3, what was the results...apart that the decimal point was missing?

    Now, i have set ADCON1 register to produce Right Justified results (ADCON1.7=1) and used this
    Code:
    ADCloop:
        For Sample=1 to 10          ' Take 10 samples
            ADCIN 0, Vin                ' Read ADC ch-2 and save in Vin
                                        ' (range 0-1023)
            Samples=Samples + Vin
            Next sample
        
        Vin=Samples/10              ' Mean of 10 Vin values
        Vin=(Vin*/500)>>2
    
        Lcdout $fe, 1               ' Clear LCD
        LCDOUT $FE,2              
        Lcdout "Temp=",DEC Vin DIG 2, DEC Vin DIG 1,".", DEC1 VIN,"C" 
    
        Samples=0
        PAUSE 100
        goto ADCLoop
    it worked.

    EDIT: ARGH!
    Last edited by mister_e; - 4th March 2007 at 19:43.
    Steve

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

Similar Threads

  1. Graphic LCD with PICbasic pro
    By amindzo in forum mel PIC BASIC Pro
    Replies: 41
    Last Post: - 25th November 2012, 11:45
  2. Stuck with 85C temp on ds18b20
    By revelator in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 3rd April 2009, 19:50
  3. Random Numbers
    By BobEdge in forum mel PIC BASIC Pro
    Replies: 12
    Last Post: - 18th December 2008, 08:47
  4. help with write command
    By cphillips82 in forum General
    Replies: 9
    Last Post: - 20th April 2008, 23:49
  5. LM35DZ and 18F2455 settings
    By Mark J in forum mel PIC BASIC Pro
    Replies: 18
    Last Post: - 25th January 2008, 08:31

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