Moreover, when activity takes places, such as the opening of a window, the sensors report the activity to the control center and the center registers that
a disturbance has occurred. In managed alarm systems, the control panel also checks the sensors to verify that they are still operational; if a sensor fails to reply, the center alerts the home owner of an out of order sensor. If the home owner activates the alarm system and the control center registers activity in the home, a signal is sent by the control to a buzzer, flashing lights or any other audiovisual alarm element. Our design for a functional keypad was the usage of an alternation of ports between inputs and outputs which is done by using the TRIS function. We started off by setting the first four ports of PORTB
as the inputs and the latter four ports as the outputs. The first four ports are connected to the columns meanwhile the last four are connected to the rows. Moreover, as a justification for this reasoning is the fact that it is required to scan the columns for the pressed key and then scan the rows and the results will be decoded in a decoder telling us which button of the keypad was pressed. The main functionality of the keypad as mentioned earlier is to set the code. The alarm can be armed and disarmed with a standard four digit user code in our case. The master code is a step above a regular user code. It is used to unlock the system, as well as programming or erasing a regular user code.