12f683 ADC help


Closed Thread
Results 1 to 4 of 4

Thread: 12f683 ADC help

Hybrid View

  1. #1


    Did you find this post helpful? Yes | No

    Default Thanks

    Quote Originally Posted by ultiblade View Post
    Hi,

    I sometimes have problems with adc_in. Try this piece of code where you want to adc_in:

    Code:
    ADCON0.1 = 1   'Start ADC conversion                                   
    while ADCON0.1 = 1 :wend   'Wait for ADC DONE
    
    RefADC.highbyte = ADRESH   'Move HIGH byte of result to adcVAL
    RefADC.lowbyte = ADRESL   'Move LOW byte of result to adcVAL
    CellA = CellA + RefADC		'Add latest ADC reading to running total
    Succes,
    UB
    That seems to be doing the trick! Cheers.

  2. #2
    Join Date
    Apr 2006
    Location
    GearSweaterMountain, The Netherlands
    Posts
    52


    Did you find this post helpful? Yes | No

    Smile

    Great !

    Regards,
    UltiBlade

Similar Threads

  1. Stable Adc Reading Routine
    By gebillpap in forum General
    Replies: 27
    Last Post: - 13th May 2015, 02:18
  2. 10 bit ADC display on LCD using 16f873
    By pr2don in forum mel PIC BASIC
    Replies: 3
    Last Post: - 6th March 2010, 18:29
  3. Can't get ADC to loop
    By TravisM in forum mel PIC BASIC
    Replies: 2
    Last Post: - 11th October 2009, 15:33
  4. ADC value with 2 decimals on an LCD
    By Squibcakes in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 2nd December 2005, 15:54
  5. 12F675 ADC 'Issues'
    By harrisondp in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 31st March 2005, 01:55

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