16F876 ADC problem


Closed Thread
Results 1 to 4 of 4

Hybrid View

  1. #1
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    It would be better like so...

    Code:
    meten:
    	ADCON0=%01000001		' Set Fosc, Select Channel, Turn-On A/D
    	Pauseus 50			' Wait for channel to setup
    	ADCON0.2 = 1			' Start conversion
    	While ADCON0.2=1:Wend		' Wait for conversion

  2. #2
    Douwe's Avatar
    Douwe Guest


    Did you find this post helpful? Yes | No

    Default thats right

    Quote Originally Posted by Melanie
    It would be better like so...

    Code:
    meten:
    	ADCON0=%01000001		' Set Fosc, Select Channel, Turn-On A/D
    	Pauseus 50			' Wait for channel to setup
    	ADCON0.2 = 1			' Start conversion
    	While ADCON0.2=1:Wend		' Wait for conversion
    O.K. Melanie,
    nice programming, and it works o.k. thanks for the tip.

    Douwe.

Similar Threads

  1. ADC or ADCIN "bias" problem?
    By RussMartin in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 26th February 2010, 19:39
  2. pic12f675 ADC problem
    By radu022003 in forum mel PIC BASIC
    Replies: 3
    Last Post: - 1st September 2009, 10:13
  3. PIC18F2423, ADC problem
    By mistergh in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 17th March 2009, 01:31
  4. Mutliple ADC problem with PIC16F877
    By andyto in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 3rd October 2007, 17:47
  5. ADC problem with PIC16F917
    By eetech in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 7th March 2007, 21:22

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