??? 07/04/06 14:46 Modified: 07/04/06 15:12 Read: times |
#119623 - Not scary at all... Responding to: ???'s previous message |
Abhishek said:
But only to begin with I will have two simple programs running rather than 1 complicated one. As you know I am a beginner and would not like to scare myself away from things! The code isn't scary at all! We would explain it for you. Abhishek said:
I have to monitor 64 relays, each sends closes at least once every second. So I have to run the debouncing routine 8 times on the input port before I get input form all the relays. Don’t you think that is going to be a problem? You should read all the contacts every 10msec or so, to adequately debounce them. I think it's only your main code, which could make trouble. The debouncing code should be fast enough. You can estimate it: Each instruction needs less than 24 oscillator periods, makes 2µsec at 12MHz clock frequency. So, the debouncing code needs less than 12 x 2µsec = 24µsec for each byte. 8 bytes need less than 24µsec x 8 = 192µsec then, so say 200µsec. What needs your main code? Abhishek said:
And by the way, please also let me know if the latch is mandatory. Could you draw a schematic? I'm not quite clear what you are intending to do. Do you have only one free port for all the relay contacts? Kai |