Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Thread Closed: Thread will re-open when original poster replies

???
06/03/06 07:08
Read: times


 
#117681 - writing firmware
Responding to: ???'s previous message
Hi Yogesh,

First, stop thinking in terms of armed or disarmed. Instead, think about states. The panel will always monitor the condition of the various circuits or zones, but it will respond to changes in the condition of a given zone based on the current system state. For example, you might have a circuit that has a contact switch on the front door. If the panel detects that the front door is opened, it will illuminate an led on a panel (to indicate that the door is opened) and then check the current system state. If the system is disarmed, it will do nothing else. If it finds that the system is in perimeter monitoring mode it might ring a soft alert chime. If it finds that the system is in the full armed delay mode, it will start a 60 second timer to give you a chance to come in and disarm the system, and if you haven't disarmed the system in the alloted time it will then initiate a full alarm. If it finds that the system is in full armed instant mode it will simply initiate a full alarm immediately.

You will need to allocate a register, or a memory location, to a set of status bits. Arming the system is then just a matter of setting the appropriate bit to indicate which mode the system is set to. Likewise, disarming the system is just a matter of clearing the appropriate bits.

Suppose you have a disarmed state, a perimiter monitoring state, a perimeter only armed with delay state, a perimiter only armed without delay state, and a full armed state. That's five possible system states, which means you would need 3 bits to represent each possible state.

000 = disarmed
001 = perimeter monitoring
010 = perimeter armed w/delay
011 = perimeter armed w/o delay
100 = system fully armed

Since every byte has 5 more bits, you could use them to represent the state of any special circuits you might have (like a special store room or a gun cabinet) that you want to leave armed all the time, unless you specifically disarm that zone/circuit specially.

Whatever arming/disarming technology you use, be it a keypad or a fingerprint scanner or a simple dry contact key switch, when the system receives the signal from the arming device it responds by setting or clearing the appropriate bits in your state byte or register.

Good luck,

Joe

List of 32 messages in thread
TopicAuthorDate
ARM/DISARM ALARM PANEL            01/01/70 00:00      
   do you expect ANY coherence of the repli            01/01/70 00:00      
   SORRY !!!!            01/01/70 00:00      
      OK            01/01/70 00:00      
         Secret code            01/01/70 00:00      
            if you have a switch, what is the use of            01/01/70 00:00      
               Input or output pins            01/01/70 00:00      
                  if you are referring to enabling the det            01/01/70 00:00      
                     My Alarm system            01/01/70 00:00      
                        Good neighbors            01/01/70 00:00      
                           Prolly best really            01/01/70 00:00      
                     key fob            01/01/70 00:00      
   use a one-wire unique device            01/01/70 00:00      
      Like this            01/01/70 00:00      
   biometrics            01/01/70 00:00      
      Wait a minute, ...            01/01/70 00:00      
         monitoring a bitfor 20 seconds            01/01/70 00:00      
            What ?            01/01/70 00:00      
      ARM/DISARM ALARM PANEL            01/01/70 00:00      
         Locking doors            01/01/70 00:00      
      biometrics            01/01/70 00:00      
         lent and lost keys            01/01/70 00:00      
   I guess...            01/01/70 00:00      
      Input or Output pins            01/01/70 00:00      
   Don't disarm the panel,            01/01/70 00:00      
      Need more guidance            01/01/70 00:00      
         writing firmware            01/01/70 00:00      
            writing firmware            01/01/70 00:00      
               writing firmware            01/01/70 00:00      
               no, eh.., yes            01/01/70 00:00      
                  Writing to flash            01/01/70 00:00      
                     FlashMagic            01/01/70 00:00      

Back to Subject List