LM135 voltage ref


Results 1 to 3 of 3

Threaded View

  1. #1

    Default LM135 voltage ref

    Hi everyone,
    I'm trying to study a pic based thermometer using LM135 and PIC16F876A, but the display value is jumping from high to low, I think it has something to do with the voltage reference but I'm not really sure how it must be done. Please check my schematic and codes that I'm using.


    *************************************
    CLEAR

    DEFINE ADC_BITS 8
    DEFINE ADC_CLOCK 3
    DEFINE ADC_SAMPLEUS 50

    TRISA = %11111111
    ADCON1 = %00000011 ' Set PORTA.0,1,2,5 = A/D, PortA.3 = +Vref
    samples VAR WORD ' Multiple A/D sample accumulator
    sample VAR byte ' Holds number of samples to take
    temp VAR byte ' Temperature storage
    samples = 0 ' Clear samples accumulator on power-up
    LOOP:
    FOR sample = 1 TO 20 ' Take 20 samples
    ADCIN 0, temp ' Read channel 0 into temp variable
    samples = samples + temp ' Accumulate 20 samples
    PAUSE 250
    NEXT sample
    temp = samples/20
    Serout PortC.1, 6, [$FE, 1, #temp]
    samples = 0
    GOTO loop
    END

    *************************************


    Thanks in advance,
    joe
    Attached Images Attached Images  

Similar Threads

  1. high voltage high frequency H-Bridge
    By George in forum Off Topic
    Replies: 6
    Last Post: - 27th April 2009, 11:50
  2. Expanded Scale Voltmeter
    By Pic_User in forum Schematics
    Replies: 6
    Last Post: - 8th February 2008, 20:32
  3. make a low voltage output from a PIC pin
    By emptyset in forum General
    Replies: 1
    Last Post: - 8th February 2008, 19:20
  4. Help with final project
    By OvERKiLL in forum General
    Replies: 4
    Last Post: - 15th December 2006, 20:35
  5. Project-Read voltage in / different voltage out
    By andydoc in forum mel PIC BASIC
    Replies: 6
    Last Post: - 8th August 2005, 15:20

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