> > I'm quite new to the world of PICs, and I've got a couple of (hopefully > simple) questions about the PIC16C71... > > > 1. When a pin is configured as an analog input, can it still be used as > a digital output? No. > 2. If you write a digital 1 or 0 to a pin which is configured as an > analog input (and has a voltage connected to it), will it damage the > PIC? Since the digital output is disabled: No. > 3. The databook states that an analog input reads as a digital 0. Does > this mean it's not a good idea to do a BSF/BCF on PORT_A if you've > got one or more pins set up as analog inputs? No problem. > 4. Let's say I've got RA0 & RA1 set up as analog inputs, and RA2-RA4 as > digital I/O. What happens if I write to one of the digital outputs > on PORT_A while an A/D conversion is taking place? Will it cause an > incorrect value to be converted? No promise, but I don't see any reason why it should. If you want your conversion to be as good as possible Microchip recomends executing a "sleep" directly after the conversion is started. The end of conversion interrupt will wake the PIC up. This however gives you problem with defining the sampling rate (since the conversion then has to be internally RC-timed) which is crucial for calculating the anti-aliasing filter you need. /Tomas Tomas Westlund OPQ Systems AB SWEDEN tomas@opq.se