PDA

View Full Version : IOC on a ACD pin ?



longpole001
- 26th August 2013, 05:23
is it possible to trigger a IOC on a acd pin ?

cheers

Sheldon

Jerson
- 26th August 2013, 18:30
My hunch is that it should be possible. You may need to configure the pin for digital input to capture the IO Change and then switch the pin to analog to get the analog value.

longpole001
- 27th August 2013, 00:13
but would that not work if i was looking for a analog change not a logic change ?

Jerson
- 27th August 2013, 04:52
Obviously not. You cannot have an interrupt on analog change.

mark_s
- 27th August 2013, 16:01
Hello,
You did not mention which pic you are using? Many pics have comparator modules connected to the analog pins. These can generate interrupts on change by setting the reference voltage to your desired trigger level.
Just an idea, depending on your specific pic and available pins.

longpole001
- 28th August 2013, 01:11
thats a good thought . the pic i am using is 16F1947 ,

I IOC pins cannot be an analog pin on this chip.

reason is i am using a 4 analog pins connected to a touch panel , so would be good to use a interrupt to serve the routine