Quote Originally Posted by jmbanales21485 View Post
I got the ccp interupt working on the 12f683 and i am able to count the pulse width, period, etc with it. but i need to count the pulse on 6 different pins and i could only use the ccp interupt on the ccp pin. therefore i though i should use the "pulsin" to count the pulses so i can use multiple pins. i could use "pulsin" on any pin and as many pins i want right? the minimum pulse width is 25us and the maximum pulse is 16.5ms on the system that im trying to interface. do you have any suggestions as to what size crystal i should get? i think im gonna stick with the pic16f84A for this project. it has 13 different I/Os 6 of which are going to be input from the pulses.
You could 'steer' the different pulses to the ccp pin using a simple logic gate, something like a 2 input AND gate, one input tied to an 'enable' pin, the other input tied to the actual input pulse.

- Pulsin can be used on as many pins as can be set to inputs.

- If you used a 20Mhz oscillator, the pulsin resolution is 2us... Therefore, at 25us, you'll get either 12 (24us) or 13 (26us) counts; at 'exactly' 16.5ms (16,500 us), you'll get 8,250 counts.
(Theoretically, and if the PIC supported it, you should be able to go all the way up to 80Mhz...25us=100 counts, 16,500=33,000 counts).