18F4520 A/D working weird


Closed Thread
Results 1 to 18 of 18

Hybrid View

  1. #1
    TurboLS's Avatar
    TurboLS Guest


    Did you find this post helpful? Yes | No

    Question

    Is there any way to set PORTA.0 as a low impedance input???

  2. #2
    Join Date
    Feb 2004
    Location
    Germany
    Posts
    762


    Did you find this post helpful? Yes | No

    Default

    we tried to amplify the signal before buffering it and the output just becomes noisy as hell with or without the PIC connected.
    So it's not a PIC problem, it's more a problem with the output of your sensor.

    Is there any way to set PORTA.0 as a low impedance input???
    With external hardware.


    It's still not really clear to me what you are trying to achieve.

    What does the timing of the analog signal look like?
    regards

    Ralph

    _______________________________________________
    There are only 10 types of people:
    Those who understand binary, and those who don't ...
    _______________________________________________



  3. #3
    TurboLS's Avatar
    TurboLS Guest


    Did you find this post helpful? Yes | No

    Default

    I would post the picture from that PDF file if I could. But the signal I get before the PIC is just like the one on page 13 labeled "Vout" and it is in phase with the horizontal clocks and the reset clock in that same corner of the page. I figured that putting the signal through a buffer would take care of the low impedance issue, but it doesn't. What external hardware would you recommend for lowering the impedance??

  4. #4
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    opamp, transistors, mosfet, fet.... usually opamp
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  5. #5
    TurboLS's Avatar
    TurboLS Guest


    Did you find this post helpful? Yes | No

    Default

    that's what i figured, but i tried an LF411 and an LM741 and it doesn't seem to make a difference at the input to the PIC.

  6. #6
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    depending wich configuration you have play with... did you use a simple buffer circuit (inverted input => to the output)?

    what is the actual frequency of this signal???

    Personnaly, for that kind of signal, i'll prefer to use multiple external or internal voltage comparators instead. Faster than a/d IMO
    Last edited by mister_e; - 7th April 2005 at 07:01.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  7. #7
    Warrier's Avatar
    Warrier Guest


    Did you find this post helpful? Yes | No

    Default A/D on 18F4520

    Well, may be I am all wrong but here is what I see as some fundamental problems!

    The Kodak chip is outputting video signal at a typical frequency of 4MHZ and this is before any anti-aliasing filter which means high edge transitions from the CCD.

    Even at 20MHz, A/D acquisition time is about 2.4usec - refer to data on page 230-231. This is defined by the internal S/H cap =20pF and the sampling switch impedance. You haven't given the settings for ADCON2?

    You are trying to use LF411 or LM741 - these op amps CANNOT handle the signal bandwidth as they will slew rate limit the signal with heavy distortion. But this is academic as you cannot sample the input signal adequately (remember Nyquist) with a Tacq=2usec and even with a minimum Tad =2.

    So unless your read out clock is slowed down so that CCD analog output is limited to around 400kHz, I think you are out of luck with the PIC. They don't have video bandwidth ADC.

    As Ralph and Steve are trying to figure out from your posting, there is really no info on signal amplitude and shape! Oscilloscope can obviously show these waveforms as it has adequate input bandwidth. Hence my discouraging input..... Anyway, please read datasheet Section 19 and you will get a better idea of how the ADC is configured.

    -warrier

Similar Threads

  1. 12f675 A/d Miseries
    By MARAD75 in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 16th December 2008, 03:16
  2. 12F675 A/D and GPIO sleep interrupt
    By macinug in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 8th September 2008, 15:39
  3. Need advice on A/D
    By james in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 24th August 2007, 20:30
  4. A/D converter fails?
    By egberttheone in forum mel PIC BASIC Pro
    Replies: 14
    Last Post: - 13th February 2006, 19:57
  5. Replies: 2
    Last Post: - 13th September 2005, 19:23

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