16F87xA ADC in CCS compiler

Discussion in 'Embedded Systems and Microcontrollers' started by disney_snoopy, Mar 11, 2009.

  1. disney_snoopy

    Thread Starter Member

    Feb 19, 2009
    28
    0
    Hi,

    I have problem on setting my AN0 and AN1 with the Vref.

    when set the AN0 with the Vref, it has no problem BUT i add in AN1 the AN1 does not corresponding any result.

    for example the CCS code is

    setup_adc_ports(AN0_VREF_VREF); --> (OK)

    setup_adc_ports(AN0_AN1_VREF_VREF); --> (not OK)

    plz comment how do i get the AN1 function?
     
  2. thatoneguy

    AAC Fanatic!

    Feb 19, 2009
    6,357
    718
  3. disney_snoopy

    Thread Starter Member

    Feb 19, 2009
    28
    0
  4. mik3

    Senior Member

    Feb 4, 2008
    4,846
    63
  5. thatoneguy

    AAC Fanatic!

    Feb 19, 2009
    6,357
    718
  6. disney_snoopy

    Thread Starter Member

    Feb 19, 2009
    28
    0
  7. thatoneguy

    AAC Fanatic!

    Feb 19, 2009
    6,357
    718
  8. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    From the link Thatoneguy posted:
    1) Click on "Signal Conditioning/Measurement" near the bottom of the "Function:" column.
    2) Select "ADC" as a sub-category.
    Then scroll down and select a PDF or ZIP file to view.
    You might start with this one:
    http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1824&appnote=en010979

    You will need a utility program installed to process the ZIP file. If you do not have a utility already, you can download WinZip shareware, here:
    http://www.tucows.com/preview/194294
     
  9. thatoneguy

    AAC Fanatic!

    Feb 19, 2009
    6,357
    718
    Quick question: What are the other PortA I/O set for?

    Only about half the combinations of Digital/Analog support Vref- in addition to Vref+
     
  10. disney_snoopy

    Thread Starter Member

    Feb 19, 2009
    28
    0
    My PortA input were the microphone that is using LM386 as preamplifier. so it is an analog signal. I need to detect several microphone as my input to detect which mic is high.

    While my output PortC were the transmitter. If it sense any signal from PortA then it send signal to my receiver.

    Thatz all
     
  11. thatoneguy

    AAC Fanatic!

    Feb 19, 2009
    6,357
    718
    How many microphones?

    You do realize that it cannot send the analog signal from porta to portc, only change a digital level between 0 and 5V on portc based on what is sampled at porta?
     
Loading...