??? 03/23/08 21:11 Read: times |
#152463 - Welcome Sir Michael Karas Responding to: ???'s previous message |
Hello Everybody,
I thank you all for your involvement. The IR receiver units will poll two inputs; one: from IR handset(all set at particular address).After filtering non-RC5 noise and decoding for a particular command and address,the receiver in each room will put on an LED as acknowledgement and then put on the relay to let the central detector know.The activated relay will simply short the two wires coming out of it. two: from the tactile switch on top of the receiver.Pressing this will bring the receiver back to its idle polling state;LED off and relay off. All above can happen simultaneously in all the 10 rooms,I mean even if all the handsets and all the tactile switches are pressed together nothing hangs. Now that was the scenario at the what you call the clients side. The two wires coming out from each receiver are not electrically connected to the transformerless receivers. They carry the switch closure signal from the relay contact points. Now the what you call server side central detector is always polling the 10 external switch closures and on board switches.As soon as any any external switch is found closed,a musical chime will be generated.There will 10 musical chimes each for a particular room. Music will be played for 5/10 seconds for a particular input i.e. switch closure.Then polling for other switches will continue.There will be 10 tactile switches on top of the central detector;each for a room and 10 7-seg displays showing room numbers.So on detecting a switch closure the central detector will also show the room number from which the signal is coming while playing music every say 10 seconds.These so called chime written by me (not the Lara'Theme from from Dr.Zivago,but Rabindra Sangeet is what they want)can be stopped by pressing the tactile switches below 7 seg displays on central detector.But the 7-seg display showing the room number/s cannot be put off from central server but only from that particular room's receiver tactile switch. Hello Michael, here I think out of those 10 switches on central detector meant for stopping the chime,9 are redundant.Any switc stops the music - will it be a short cut?I think initially I am in switch polling loop;after detecting a switch closure and debouncing it at length(since there is no demand for hurry but for reliability),I can put on the 7-seg for the room,and activate a chime_on flag.Next I enter the chime loop and play chimes if there are active flags.Then I enter the local switch polling loop and detecting a closure,deactivate the chime_on flag.Shall I have to have 10 separate chime flags? My problem is to stop the chime after programmed duration and restart it after programmed rest period. For chimes I have to use two timers one for pitch and other for note length.Do I have to use the third Timer2 and its overflow counter for measuring 5/10 seconds. Do I increment the overflow counter in its ISR or in the main loop?I am at a little loss.Please help me. With best regards A.S.Rudra |