User manual

33
After the PIC 18F452 had been programmed, it placed to the SK40C and
connected to input and output to run the system. This chip had been programmed
several times before desired output is obtained. By using microcontroller, the
program can be easily change for convenience or depend on requirement of the
project. The input and output must be taken into consideration with a suitable range
of current to avoid damage on PIC 18F452. The complete coding can be referring to
Appendix B.
3.3 HARDWARE IMPLEMENTATION
Hardware implementation can be divided into two parts. The first part consist
SK40C and microcontroller only using the successful debug program. The other part
is the complete system including the IR proximity sensor and relay interfacing with
the lighting system.
3.3.1 Part I (Using SK40C)
The first part of this project involve SK40C and PIC 18F452 only. Once the
programming had been done, the program tested on SK40C board and the output
observed. In this stage, the push button pin is referred as the sensor. RB0 and RB1
indicate sensor 1 and sensor 2 respectively. RB6 and RB7 denote the output of the
microcontroller. During the testing, RB6 is the input of the relay that is connected to
the lighting system while RB7 is the connection to buzzer that will sound on if error
occurs. Both of this connection can be observed through RB6 and RB7 LED. As the
push button pin, RB1 and RB2 pressed according to the program, RB6 LED will turn
on. RB7 LED will turn on only if error had been detected. For instance, both push