This document describes the design and implementation of an automatic fire-fighting system for buildings using a Peripheral Interface Controller. The system consists of gas and temperature sensors to detect fires, an alarm system using an LED and buzzer, and a fire extinguishing system using a solenoid. When the temperature or gas sensors detect a fire, the alarm is activated. If both sensors detect a fire, the extinguishing system releases water from the solenoid to put out the fire. The system is powered by a 5V supply and uses a PIC microcontroller to process sensor signals and control the alarm and extinguishing systems. The document outlines the hardware components, software design, and testing results of the automatic fire