I am sorry with misaddressing by defining sensors.....I will connected multiple switch inputs when the switch is closed sends a pulse. eg : activation of multiple door bells
Distance is again a grey area....roughly around 100mts diameter.
All i need a edge trigger and a way to define the exact source from were i am receiving.
As you can see that the physical device is totally dumb.
It would be wonderful if someone can give a right direction.
I am using PIC16F628A which has just one EXT INT and about 8 -10 I/O pins.
Can multiplexers be used for the same....but by doing this identity of the source generating the pulse is not known......as i need the identity to send specific control commands.
But this will involve me to poll for the push buttons status.....that is not i what i want........
This how it is : I have 4 doorbells at different locations . Now when a bell is pressed i need to know which bell is pressed and send a specific command to all the end device connected to the network.
So i have introduced a hub. And struck how to proceed.
Okay, when I asked if you have one or two I/O I was under the impression from your first post that you had three INT inputs, not one. I also see that you are looking for an edge meaning that you must respond to the switch closure instantly, rather than waiting for a poll of the switch to detect a closure? Perhaps because the switch does not remain closed long enough for a poll detection, or because the response to a closure must be very fast?
Okay, when I asked if you have one or two I/O I was under the impression from your first post that you had three INT inputs, not one. I also see that you are looking for an edge meaning that you must respond to the switch closure instantly, rather than waiting for a poll of the switch to detect a closure? Perhaps because the switch does not remain closed long enough for a poll detection, or because the response to a closure must be very fast?
I am pretty sure that you can poll six I/O pins fast enough to detect a manual push of a doorbell switch. A manual switch closure and then release involves tens of milliseconds of closure time to complete.
This how it is : I have 4 doorbells at different locations . Now when a bell is pressed i need to know which bell is pressed and send a specific command to all the end device connected to the network.
I missed the fact you were using a 16F628. However the 628 also has interrupt on change on the top 4 bits of port b and so could be used to read 4 push buttons. With a bit of ingenuity you can easily make an array of 4*4 switches produce an interrupt when 1 or more are pushed.
Maybe you should explain what you are trying to do as push buttons are normally so slow that polling would be easily fast enough.
See it need not be a switch all the time...it could be a any trigger pulse to the PIC input. Ex: a trigger pulse from an existing Fire alarm device(tapping the signal to my PIC). or any device that can trigger a pulse.
Can 82c59 PIC (programmable interrupt controller be used for the same)....to logically increase the No: of interrupt lines.If so does anyone have any schematics for the same.
See it need not be a switch all the time...it could be a any trigger pulse to the PIC input. Ex: a trigger pulse from an existing Fire alarm device(tapping the signal to my PIC). or any device that can trigger a pulse.
Can 82c59 PIC (programmable interrupt controller be used for the same)....to logically increase the No: of interrupt lines.If so does anyone have any schematics for the same.
The 82c59 seems like overkill for your application, but I suppose you could use it to do the job.
I'm thinking six edge-triggered flip-flops (like the 74HC175) to capture and store an edge event. Present the output of the flip-flops to your I/O pins directly, or follow with a multiplexer so that you can identify and route the stored event into one of 3 interrupts.
Those hundreds of feet of cable are a definite design consideration. A cable that long is subject to picking up all sorts of EMI and triggering an event. The cable should be twisted shielded pair and a schmitt-trigger, and or other input conditioning scheme should be placed in front of the edge storage function.
You might try putting a 555 timer used as a "one shot" on each button so that the PIC will see the initial signal as an interrupt, and then have enough time to poll which timer is still high.