A micro controller is an integrated chip that is often part of an embedded system. The micro controller includes a CPU, RAM, ROM, I/O ports, and timers like a standard computer Error! Reference source not found.. These are designed to execute only a single specific task to control a single system, they are much smaller and simplified so that they can include all the functions required on a single chip. Error! Reference source not found.
Hardware Description of CONTROLLED SPY VEHICLE
1.1 Hardware Components
The RF controlled spy vehicle system consists of following major components, and is explained in the following:
- CMOS Hex Buffers/Converters
- Single 8-channel analog multiplexer/demultiplexer
- RF Transmitter
- GSM Sim300DZ
- GPS Holux M-89
- Wireless Camera
- Crystal Oscillator
- Serial Port
A microcontroller is an integrated chip that is often part of an embedded system. The microcontroller includes a CPU, RAM, ROM, I/O ports, and timers like a standard computer Error! Reference source not found.. These are designed to execute only a single specific task to control a single system, they are much smaller and simplified so that they can include all the functions required on a single chip. Error! Reference source not found.
1.2.2 Selection of a Microcontroller
Choosing a microcontroller depends on what one wants to achieve. When choosing a microcontroller, one have to ask yourself the right questions and research the different type of microcontrollers before making your choice Error! Reference source not found..
- In terms of programmability and reprogram ability. This will help in determining memory requirements of the microcontroller.
- In terms of peripheral devices you will be using or wanting to use in the future.
- In terms of the physical packaging and the limitations can be associated with it.
- In terms of the memory aspects. More complex systems will need more memory, and thus, bigger chips.
- In terms of the architecture of the system you are planning.
- In terms of hardware and software tools that are manufactured with the micro controllers compared to what you will need.
- In terms of costs and what you have budgeted to spend on the micro controller.
The micro controller we have chosen is PIC18F452. The brief description micro controller chip is given below.
The 40 pins make it easier to use the peripherals as the functions are spread out over the pins. This makes it easier to decide what external devices to attach without worrying too much if there enough pins to do the job.
Figure 3.2‑1: PIC18F452 Bubble Diagram
Our microcontroller has been explained along with there pin details and configuration which is as follows.
Figure 3.2‑2: PIC18F452 Pin Configuration 
|Pin #||Description||Pin #||Description|
Table 3.2‑1: PIC18F452 Pin Description 
- Operating frequency DC-40MHz
- Flash program memory 32K
- Data memory(bytes) 1536 Bytes
- EEPROM data memory 256 Bytes
- Interrupts 18
- I/O ports Port A,B,C,D,E
- Timers 4
- Serial communications MSSP, USART
- Parallel communication PSP
- 10-bit Analogue to Digital module 8 input channels
- Instruction set 75 Instructions
- Packages 40-pin DIP
- Resets & (Delays) POR, BOR
1.1.2 Pins Description
PIN 1(MCLR/VPP): Master Clear (Reset) input or programming voltage input. This pin is an active low RESET to the device. PIN 2 and 3 (RA0/AN0 and RA1/AN1): These can be analogue inputs.  PINS 4 and 5(RA2/AN2/Vref- and RA2/AN2/Vref+): RA2 can also be analog input2 or negative analog reference voltage.RA3/AN3/VREF+ can also be analog input3 or positive analog reference voltage. PIN 6(RA4/T0CKI): It can also be the clock input to the Timer0 timer/counter. Output is open drain type. PIN 7 (RA5/SS/AN4): It can also be analog input4 or the slave select for the synchronous serial port PIN 13(OSC1/CLKIN): Oscillator crystal input/external clock source input. PIN 14(OSC2/CLKOUT): Oscillator crystal output. Connects to crystal or resonator in crystal oscillator mode. In RC mode, OSC2 pin outputs CLKOUT which has 1/4 the frequency of OSC1, and denotes the instruction cycle rate. PIN 33-35(RB0/INT, RB1, and RB2): These can be external interrupt pins. PIN 37-40(RB4, RB5, RB6/PGC, and RB7/PGD): First two are Interrupt-on-change pin. While last two are Interrupt-on-change pin or In-Circuit Debugger pin. Serial programming clock PIN 12, 31 (V bb): Ground reference for logic and I/O pins. PIN 11, 32(V dd): Positive supply for logic and I/O pins. 
There are 5 ports of 18F452 A, B, C, D and E. PORT A (Pins 2-7): The port A is a general purpose bi-directional input/output port which can be used for a variety of interfacing tasks. The other ports have dual roles or additional functions associated with them based upon the context of their usage. PORT B (Pins 33-40): PORTB is a bi-directional I/O port. PORTB can be software programmed for internal weak pull-up on all input. It has function of interrupt. PORT C (Pins 15-18, 23-26): PORT C includes the pins which are timer inputs or outputs. It also includes compare and PEM outputs. Comparing is additional function of this port. PORT D (Pins19-22, 27-30): PORTD is a bi-directional I/O port or parallel slave port when interfacing to a microprocessor bus. PORT E (Pins 8, 9, 10): PORT E is a bi directional I/O port. It includes 8,9,10 pins. Where 8 and 9 pin can be read and write control for parallel slave port or analogue inputs 5and 6 respectively. The pin 10 is control select for parallel slave port or analogue input 7. 
1.2 MAX 232
The MAX232 is a dual driver/receiver that includes a capacitive voltage generator to supply voltage levels from a single 5-V supply. Each receiver converts inputs to 5-V levels. These receivers have a typical threshold of 1.3 V, a typical hysteresis of 0.5 V, and can accept D30-V inputs. 
Figure 3.3‑1: MAX 232
Figure 3.3‑2: Pin Description of MAX 232
- Input supply voltage range, VCC (-0.3 V to 6 V)
- Positive output supply voltage range, VS+ (VCC – 0.3 V to 15)
- Negative output supply voltage range, VS– ( -0.3 V to — 15 V)
- Input voltage range, VI: Driver ( -0.3 V to VCC + 0.3 V )
- Receiver (+30 V)
- Output voltage range, VO: T1OUT, T2OUT VS-( – 0.3 V to VS+ + 0.3 V )
- R1OUT, R2OUT( -0.3 V to VCC + 0.3 V)
- Short-circuit duration: TlOUT, T2OUT (Unlimited)
- Package thermal impedance (D package 730C/W )
- Operating virtual junction temperature, TJ (150°C)
- Storage temperature range, Tstg (-65°C to 150°C). 
- Portable Computers
- Low-Power Modems
- Interface Translation
- Battery-Powered RS-232 Systems
- Multidrop RS-232 Network. 
1.3 7 channel Darlington Sink Driver
The ULN2003APG Series are high-voltage, high-current darlington drivers comprised of seven NPN darlington pairs. All units feature integral clamp diodes for switching inductive loads. Applications include relay, hammer, lamp and display (LED) drivers.
- Output current (single output): 500 mA max.
- High sustaining voltage output: 50 V min.
- Output clamp diodes.
- Output compatible with various types of logic.
- DIP-16 pin.
Figure 3.4‑1: ULN2003APG Pin Connection
Figure 3.4‑2: Schematic Diagram
Table 3.4‑1: Absolute Maximum Ratings (Ta= 25ºC)