PIC18F252 and AD configuration


Closed Thread
Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2006
    Location
    Slovenia EU
    Posts
    32

    Default PIC18F252 and AD configuration

    Hello,

    I have PIC18F252 and use first 3 analog input with 10 bit resolution. On each input have trimmer 10K resistor between VCC and GND.
    If set one or two trimmer to min.(gnd) then couldn't set third trimmer to over 800? Wheen set two
    trimmer to max (VCC) then can set value on third trimmer to max 1023. Where i have made mistake?

    my configuration are:

    DEFINE ADC_BITS 10 ' ADCIN resolution (Bits)
    DEFINE ADC_CLOCK 2 ' ADC clock source (Fosc/32)
    DEFINE ADC_SAMPLEUS 11 ' ADC sampling time (uSec)

    ADCON1=%10010010
    ADCON0=%11000111

    Samo

  2. #2
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default Re: PIC18F252 and AD configuration

    The ADCON0 register, shown in Register 17-1, con-
    trols the operation of the A/D module. The ADCON1
    register, shown in Register 17-2, configures the
    functions of the port pins.
    Try not setting ADCON0, let PBP take care of that.
    Dave
    Always wear safety glasses while programming.

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


    Did you find this post helpful? Yes | No

    Default Re: PIC18F252 and AD configuration

    I solve this problem.

    I was leaved ADCON1 and ADCON0 to unchanged. I changed sampling time to 50us and ADC clock to 3. Now working each channel independed from other.

    I use Mister E PIC multi-calc and A/D calc menu. I don't understand how calculate input impedance?
    I have 3 trimmer resistor 10K on each channel. How is then 30k input impedance or 10K in my case?

    have someone the solution?

    Thanks,
    Samo

Members who have read this thread : 1

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