Problem Statements Problem Solving Introduction Peripheral Interface Circuit PIC

1.4 Problem Statements

Usually the old version of the condenser in the car used heat detector and timer to operate the cooling fan. Even though the air-conditioner did not switch on, the cooling fan still operates because the heat detector sense heat. So time spent of the battery did not last long.  The original system used a timer and heat detector to switch on the condenser’s fan.  The cooling fan still operates even though there is no pressure.

1.5 Problem Solving

The new version of the condenser is used only PIC controller and pressure switch in order to generate the whole condenser system. The cooling fan will only operate when the pressure switch sense pressure.  Used only a pressure sensorswitch to turn on the cooling fan.  By using the pressure sensorswitch, the cooling fan will turn ON only with the present of the pressure. CHAPTER 2 LITERATURE REVIEW This chapter discuss about the theory, the components, and the study that used in this project.

2.1 Introduction

The basic components used in this project will be, PIC circuit using PIC16F877A, condenser, pressure switch, and C Language. To develop the controller for the system, the researches need to be done on the microchip. For example the datasheet, the rating, and all about it. For the condenser as well, some research had to be done.

2.2 Peripheral Interface Circuit PIC

PIC is one of the controllers that often used in engineering field. It is simple if compared to the microprocessor. It combined all necessary needs into single Integrated Circuit IC. PIC microcontroller also very easy for programming. A microcontroller is sometimes referred to as an embedded processor because it can be embedded into a device that has some function other than being a general purpose computer. This generally implies that microcontrollers are less expensive and less powerful than a full- fledged microprocessor. But a microcontroller can be dedicated to a specific task; it can actually do many things that a full PC is not very good at. This is because a microcontroller and its program are very tightly integrated. Microcontroller is wide used because of its need, from a sensor it will go to a microcontroller and it will trigger the actuators. There are many ways to programming the PIC. It can use assembler MPLAB, basic programming PIC Basic Pro, Micro Basic, and C Language HITEC PICC, MicroC. This project using C Language as its programming language. It is because the C Language is wide used. Almost everybody use C Language because of its uncomplicated. Figure 2.1 shows the PIC16F877A configuration pins, a well built microchip with 40 pins represents its own addresses. It is also have 33 pins just for inputoutput connection. The powerful microchip PIC16F877A controller running at 20 MHZ, with 368 bytes of data memory, 256 bytes of EEPROM data memory, and 8K bytes of FLASH program memory. This microchip is programmed through C Compiler. Figure 2.2 shows a basic PIC circuit where it is always consist of PIC16F877A, a 20 MHz crystal, a RS232 adapter, a 78L05 voltage regulator, and others basic components such as resistor and capacitor. It also have high performance RISC CPU with a 35 single-word instruction set and interrupts capability of up to 14 sources. Regulated +5 V dc can be sourced from several screw terminal connectors or it can be connected through a +5V circuit. RS-232 used a serial port for downloading program to the on-board PIC, via a 9-way D-type connector, which can also be used as a stand-alone serial communications port. Figure 2.1: PIC16F877A configuration pins In most microcontrollers all components are contained inside a single chip. Only a few external parts are usually required to make the microcontroller run. CPU is the most important device in this controller. It has many small micros use an 8-bit CPU, although 16 and 32 CPUs also exist. For program memory, it is used to store the program to be run Flash RAM is used in modern microcontroller. RAM also used in the microcontroller. It is a temporary memory used while the program being executed. EEPROM is a permanent storage to allow programs to save settings and other data when the power is off. Oscillator is used to support for different types of clock sources are usually available, including crystals, resonators, external clock sources, and internal clocks. The clock affects the speed of the program execution, timers and other parts. Speeds from 4-40MHz are typical. IO Ports pins used for interfacing the microcontroller to other devices. Most microcontrollers allow individual control of each pin, making them very flexible. There are many peripherals that is widely use. Many useful peripherals are common such as USARTs; serial ports which can send and receive data at up to 1Mbps or more. The Comparators and AD Converters are used for sensing and measuring analog signal. Timer peripheral used for counting pulses and measuring accurate time intervals. There also have a Pulse Width Modulators PWM peripheral. It is used to control motors, lamps, LEDs, and other control devices. Figure 2.2: Basic PIC circuit Figure 2.2: Basic PIC Circuit

2.3 PIC Peripheral Interface Circuit Programming Language