need help for adc programming using PIC18F4550

Discussion in 'Programmer's Corner' started by cyril666, Feb 17, 2009.

  1. cyril666

    Thread Starter Member

    Feb 7, 2009
    12
    0
    I want to do ADC conversion for single channel EEG amplifier but I am not really sure how to do it...
    can anyone help me....

    I need a code for this PIC because i do not know how to write the code....I had already search for some codes but the problem is I do not know which part of the codes that i kneed to edit..

    please help me....
     
  2. beenthere

    Retired Moderator

    Apr 20, 2004
    15,815
    282
    Do you have the data sheet for the PIC? If so, the process of A to D conversion and how the result is brought into the microprocessor is explained.

    Hint: apply some known and stable voltage, like a 1.5 volt battery and see what the conversions look like.

    EEG waveforms are complex, and will require a well thought out program to capture. You will be generating hundreds of data points per second - do you have enough memory to soak up all those numbers?
     
  3. cyril666

    Thread Starter Member

    Feb 7, 2009
    12
    0
    i need any code that working for adc PIC18F4550.
    please help me...

    only one analog input...
     
  4. mik3

    Senior Member

    Feb 4, 2008
    4,846
    63
    This PIC has an internal oscillator so you don't need an external crystal to clock it.

    What is the analog signal you want to measure?
    From where is it generated from?


    What do you want to control with the PIC?

    Which C compiler are you using?
     
  5. cyril666

    Thread Starter Member

    Feb 7, 2009
    12
    0
    thanks to Alberto and mik3


    the input comes from EEG signal of the brain....the signal will be filtered and amplified before entering the pic.

    since i am a beginner...i just use 1 channel input....

    i just want to convert the signal to digital signal....

    i using MPlab.....

    i prefer in c language



    (question for Alberto)

    if i use your code....can u explain which pin is for analog input and output on the pic...

    thanks to you
     
Loading...