How to make adcin stable?


Closed Thread
Results 1 to 12 of 12

Hybrid View

  1. #1
    Join Date
    Jan 2009
    Posts
    3


    Did you find this post helpful? Yes | No

    Default

    Thank you so much for your help!

    This is all of the code,

    A0 VAR WORD
    DEFINE ADC_BITS 10
    DEFINE ADC_CLOCK 3
    DEFINE ADC_SAMPLEUS 50
    TRISA = 255 ' Set PORTA to all input
    'ADCON1 = 2 ' This gives me 16 bit results
    ADCON1=%10000010 'This gives me 8 bit results
    ADCIN 0, A0 ' PORTA.0 PIN 13
    SEROUT PORTC.5,6,[" A0 = ",#A0,10]

  2. #2
    Join Date
    Jan 2006
    Location
    Slovenia EU
    Posts
    32


    Did you find this post helpful? Yes | No

    Default

    your defines are ok.

    A0 VAR WORD
    DEFINE ADC_BITS 10
    DEFINE ADC_CLOCK 3
    DEFINE ADC_SAMPLEUS 50
    TRISA = 255 ' Set PORTA to all input
    ADCON1=%10000010 'This gives me 8 bit results
    ADCIN 0, A0 ' PORTA.0 PIN 13
    SEROUT PORTC.5,6,[" A0 = ",#A0,10]


    note!
    When use 8 bit PIC then working this only with 8 bit resolution. Check datasheet from your PIC

Similar Threads

  1. ADCIN and PIC18F4331 Arghhhhh !
    By GrandPa in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 6th December 2010, 20:27
  2. Change On Interrupt, PIC16F884
    By elec_mech in forum mel PIC BASIC Pro
    Replies: 17
    Last Post: - 14th November 2008, 17:25
  3. ADCIN problems with PIC16F73
    By passion1 in forum mel PIC BASIC Pro
    Replies: 19
    Last Post: - 26th July 2007, 11:38
  4. How come they make electronics hard as poss
    By George in forum Off Topic
    Replies: 9
    Last Post: - 13th July 2007, 23:54
  5. help using adcin
    By harryweb in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 31st January 2006, 07:46

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