Well And he must to have many atention with the time conversion, with xtal of 4 to 20 MHz, he must to put a little delay to see the conversion or to wait the interrupt. Regards Santiago Tjaart van der Walt escribi—: > Andre Abelian wrote: > > > Hi to all engineers. > > I am working with 16c71 to learn more about it. > > this is what I know about it. > > > > 1. adres A/D result will be in this register after conversion > > 2. adcon1 to setup analog inputs and Voltage reference > > 3. adcon0 conversion clock, analog channel select, and more > > > > I played with one A/D converter I got good result. > > since I see only one result (adres) register I do not imagine > > using all four A/D converters where are you going to put > > results from each A/D converter at the same time. > > > > Could you please explain how it works. > > > > The A/D inputs are multiplexed to one A/D only. You haveto select which > input you want to sample. The result of the > A/D is alway in ADRES, so you have to pick the right channel. > To do this, you have to set up ADCON0. I didn't have a > PDF file for the 16C71 on-hand, but to explain it, here is > the breakdown for the 16C74 (see bit 5-3) : > > ADCON0 > > bit 7-6: ADCS1:ADCS0: A/D Conversion Clock Select bits > 00 = FOSC/2 > 01 = FOSC/8 > 10 = FOSC/32 > 11 = FRC (clock derived from an internal RC oscillator) > bit 5-3: CHS2:CHS0: Analog Channel Select bits > 000 = channel 0, (RA0/AN0) > 001 = channel 1, (RA1/AN1) > 010 = channel 2, (RA2/AN2) > 011 = channel 3, (RA3/AN3) > 100 = channel 4, (RA5/AN4) > 101 = channel 5, (RE0/AN5) (1) > 110 = channel 6, (RE1/AN6) (1) > 111 = channel 7, (RE2/AN7) (1) > bit 2: GO/DONE: A/D Conversion Status bit > 1 = A/D conversion in progress (setting this bit starts the > A/D conversion) > 0 = A/D conversion not in progress (This bit is > automatically cleared by hardware when the A/D conversion > is complete) > bit 1: Unimplemented: Read as '0' > bit 0: ADON: A/D On bit > 1 = A/D converter module is operating > 0 = A/D converter module is shutoff and consumes no > operating current > > -- > Friendly Regards > > Tjaart van der Walt > mailto:tjaart@wasp.co.za > _____________________________________________________________ > | WASP International http://www.wasp.co.za/~tjaart/index.html | > | R&D Engineer : GSM peripheral services development | > | Vehicle tracking | Telemetry systems | GSM data transfer | > | Voice : +27-(0)11-622-8686 | Fax : +27-(0)11-622-8973 | > | WGS-84 : 26¡10.52'S 28¡06.19'E | > |_____________________________________________________________|