16F87xA ADC in CCS compiler

Thread Starter

disney_snoopy

Joined Feb 19, 2009
28
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?
 

SgtWookie

Joined Jul 17, 2007
22,230
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
 

thatoneguy

Joined Feb 19, 2009
6,359
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+
 

Thread Starter

disney_snoopy

Joined Feb 19, 2009
28
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
 

thatoneguy

Joined Feb 19, 2009
6,359
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?
 
Top