Hi
After my previous post on the forum I have made good progress but am very confused with setting up the ADC on a PIC12F675. I have found lots of example code for different processors but can't get any of it working. Does anyone have a really simple example that does not use interupts. e.g. an analog voltage on PIN5 (AN2) is measured and switches on an LED on either PIN2 (GP5) or PIN3 (GP4) depending on whether the converted value is >512 or <512.
Another problem. I am using a PICkit2 connected to pins 4,1,8,7,6. Obviously pins 1 and 8 are for power and ground but which of the other pins can I use (4,7, 6) and for what without frying my chip when I try to program it in-circuit?
All help is greatly appreciated!
Mark.
After my previous post on the forum I have made good progress but am very confused with setting up the ADC on a PIC12F675. I have found lots of example code for different processors but can't get any of it working. Does anyone have a really simple example that does not use interupts. e.g. an analog voltage on PIN5 (AN2) is measured and switches on an LED on either PIN2 (GP5) or PIN3 (GP4) depending on whether the converted value is >512 or <512.
Another problem. I am using a PICkit2 connected to pins 4,1,8,7,6. Obviously pins 1 and 8 are for power and ground but which of the other pins can I use (4,7, 6) and for what without frying my chip when I try to program it in-circuit?
All help is greatly appreciated!
Mark.