On Fri, 16 May 2003 12:35:59 +0000, you wrote: >Hi everyone, I am using a microcontroller (M16C) to do simple analog to >digital conversion. Due to the rather limited documentation and support = for >this chip (by mitsubishi), I have some queries on certain aspect of this= A-D >stuff. > >The manual mention that the A-D functionality uses 3 other pins beside = the >analog input pin(AN0-AN4...). They are: >AVcc =3D Power source pin of the analog section >AVss =3D GND pin of the analog section >Vref =3D Input pin of reference voltage >(These pins can be tied to internal source or externally) > >My question is: >1) If my external analog signal(-5V to 5V) is using a different power >supply, how shall I connect these 3 pins? If your input can go negative, you will need to level-shift it to bring = it inside the range of the ADC. An inverting op-amp configuration with a gain of 0.5 will convert it= to 0..5V. You may also need to buffer the input if the source impedance is significant or = non-constant.=20 e.g. 10K from input to opamp -ve input, 5K from opamp -ve to output, = connect opamp+ve to a reference which is 0.5 Vref (e.g. 10K/10K divider, with 100n decoupling from the = 0.5Vref to ground.). Avss,Avdd should normally be connected to digital Vss,Vdd, occasionally = via some noise-filtering components. you can NOT use different AVdd/ss to level-shift your input. -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu