Analog In for 16F88 with IR Sensor.


Closed Thread
Results 1 to 5 of 5

Hybrid View

  1. #1
    Join Date
    Oct 2012
    Posts
    9


    Did you find this post helpful? Yes | No

    Default Re: Analog In for 16F88 with IR Sensor.

    (newbe here)

    Should that be High PORTB.4 and LOW PORTB.4?

    I also don't see an ADCON1 being setup

    Code:
    if x > %10000000 then
            PORTB.4 = 1
        endif
        
        if x < %00000111 then
            PORTB.4 = 0  
        endif
    Last edited by norohs; - 2nd November 2012 at 03:26.

  2. #2
    Join Date
    Dec 2005
    Posts
    1,073


    Did you find this post helpful? Yes | No

    Default Re: Analog In for 16F88 with IR Sensor.

    There are two versions of the QRE1113 - one digital, one analog . Are you sure you have the analog version?

  3. #3
    Join Date
    Nov 2012
    Posts
    3


    Did you find this post helpful? Yes | No

    Default Re: Analog In for 16F88 with IR Sensor.

    Quote Originally Posted by norohs View Post
    (newbe here)

    Should that be High PORTB.4 and LOW PORTB.4?

    I also don't see an ADCON1 being setup

    Code:
    if x > 000000 then
            PORTB.4 = 1
        endif
        
        if x < 000111 then
            PORTB.4 = 0  
        endif
    You're correct, for my purposes, the high / low settings should be reversed. I'm trying to read up more on how the ADConverter works, to get this circuit working. There are lots of examples of using it with a LCD on RA4, but I can't find anything more.. general.

    And yes - I'm sure I have the Analog version. Also, looks like you can't edit old posts, I meant to set my thresholds at 128 on both sides, but forgot to edit it before copying in. The low threshold should be set at 128, not 7.

Similar Threads

  1. 16F88 + 2 Analog inputs
    By ruijc in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 6th July 2010, 23:17
  2. 16F88 Analog In
    By Mugelpower in forum mel PIC BASIC Pro
    Replies: 11
    Last Post: - 25th March 2008, 08:30
  3. analog data acquisition with 16f88
    By dru_x in forum Code Examples
    Replies: 3
    Last Post: - 29th January 2008, 13:38
  4. 16f88 - pin RA4 as analog input
    By savnik in forum mel PIC BASIC Pro
    Replies: 20
    Last Post: - 15th December 2006, 13:55
  5. Anyone Got a 16F88 to Work in Analog?
    By thunderstrike44 in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 31st August 2004, 22:34

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