Manipulating ADC values....


Closed Thread
Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2008
    Posts
    52

    Default Manipulating ADC values....

    I don't know if that is the proper title but this is what I need to do...

    I have two ADC values and they basically are never equal. What I want to be able to do is when the values are within a certain range say +/- 5 I want to set them equal... Is there a way to do this in PICBSIC?

    Thanks, Don

  2. #2
    Join Date
    May 2013
    Location
    australia
    Posts
    2,383


    Did you find this post helpful? Yes | No

    Default Re: Manipulating ADC values....

    if abs (read1 - read2)< 5 then
    equal=1
    else
    equal=0
    endif

  3. #3
    Join Date
    Oct 2008
    Posts
    52


    Did you find this post helpful? Yes | No

    Default Re: Manipulating ADC values....

    Thanks Richard, Got it working......

Similar Threads

  1. ADC values above 4095 for 12 bit ADC
    By longpole001 in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 1st February 2015, 23:24
  2. Manipulating Digits
    By ruijc in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 27th February 2011, 16:18
  3. Manipulating keypad presses
    By dbachman in forum General
    Replies: 9
    Last Post: - 4th January 2011, 07:26
  4. Scaling ADC values
    By purkolator in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 29th November 2007, 06:14
  5. Adc giving widely flactuating values
    By tamersoss in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 17th December 2006, 09:59

Members who have read this thread : 3

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