Saturday, 22 September 2012

RECEIVER PROGRAMMING



SetPorts     bsf       STATUS,                                RP0     ; select bank 1
                  movlw             b'01000010'                             ; A7=input
                  movwf             TRISB
                  CLRF TRISA
                  bcf       TRISC,4
                  bcf       STATUS,                                RP0     ; select bank 0
                  call       SER_INIT                                          ; initialize serial port

CheckB                 call Insert                   

This example of programming that have been wrote in MPLAB. This program is activating when key ‘A’ and LCD will display ‘set password 1’. Then this programming is to scan the input have been key in by user. The process is looping 5 times because entered password is 5 bits. 

Saturday, 15 September 2012

LITERATURE REVIEW

DEFINITION OF DOOR SECURITY MONITORING SYSTEM


A lock is a mechanical fastening device which may be used on a door, vehicle, or container, restricting access to the area or enclosed property. Commonly, it can be released by using a key, keycard, RFID signal, but for this FYP it comes out with user need to key in the code or password. Besides, it also combines with transmitter, receiver, PIC, magnetic lock, electronic components and programming.

  PIC MICROCONTROLLER 16F877A

Microcontrollers must contain at least two primary components – random access memory (RAM), and an instruction set. RAM is a type of internal logic unit that stores information temporarily. RAM contents disappear when the power is turned off. While RAM is used to hold any kind of data, some RAM is specialized, referred to as registers. The instruction set is a list of all commands and their corresponding functions.Most microcontrollers also contain read-only memory (ROM), programmable read-only memory (PROM), or erasable programmable read-only memory (EPROM). Al1 of these memories are permanent, they retain what is programmed into them even during loss of power. They are used to store the firmware that tells the microcontroller how to operate. They are also used to store permanent lookup tables. Often these memories do not reside in the microcontroller; instead, they are contained in external ICs, and the instructions are fetched as the microcontroller runs. This enables quick and low-cost updates to the firmware by replacing the ROM.

KEYPAD

For keypad wiring, keypads pins need to pull up or pull down to avoid floating case happen. Pull up normally connect to 5V and pull down is connect to ground. 4x4 Keypad pin can directly connect to microcontroller or keypad decoder IC for decodes purpose. However, DIY scanning of keypad consumes a lot of understanding in programming and more program space. The better way to interface a keypad to the PIC is to use a keypad encoder in between the keypad and the microcontroller

TRUTH TABLE KEYPAD ENCODER MMC74C922



Switch Position
0 1 2 3 4 5 Y1,X1 Y1,X2 Y1,X3 Y1,X4 Y2,X1 Y2,X2
6 7 8 9 10 Y2,X3 Y2,X4 Y3,X1 Y3,X2 Y3,X3
11Y3,X4
D













A
A
0
1
0
1
0
1
0
1
0
1
0
1
T
B
0
0
1
1
0
0
1
1
0
0
1
1
A
C
0
0
0
0
1
1
1
1
0
0
0
0
O
D
0
0
0
0
0
0
0
0
1
1
1
1
U
E (Note 1)
0
0
0
0
0
0
0
0
0
0
0
0

Switch Position
12 Y4,X1
13 Y4,X2
14 Y4,X3
15 Y4,X4
16 Y5(Note 1), X1
17 Y5 (Note 1), X2
18 Y5 (Note 1), X3
19 Y5 (Note 1), X4
D









A
A
0
1
0
1
0
1
0
1
T
B
0
0
1
1
0
0
1
1
A
C
1
1
1
1
0
0
0
0
O
D
1
1
1
1
0
0
0
0
U
E (Note 1)
0
0
0
0
1
1
1
1

  

Saturday, 8 September 2012


 RS 232 SERIAL COMMUNICATION

RS232 is a popular communications protocol for connecting modems and data acquisition devices to computers. RS232 devices can be plugged straight into the computer's serial port (also known as the COM or Comms port). Examples of data acquisition devices include GPS receivers, electronic balances, data loggers, temperature interfaces and other measurement instruments. A nine pin D plug has become the standard fitting for the serial ports of PCs. The pin connections used are as shown in Table 4. The connector on the PC has male pins, therefore the mating cable needs to terminate in a DB9/F (Female pin) connector 


RS232 PIN ASSIGNMENTS (DB9 PC SIGNAL SET)


Table 4: RS232 PIN ASSIGNMENTS (DB9 PC SIGNAL SET)

Pin 1
Input
DCD
Data Carrier Detect
Pin 2
Input
RXD
Received Data
Pin 3
Output
TXD
Transmitted Data
Pin 4
Output
DTR
Data Terminal Ready
Pin 5
Signal Ground
Pin 6
Input
DSR
Data Set Ready
Pin 7
Output
RTS
Request To Send
Pin 8
Input
CTS
Clear To Send
Pin 9
Input
RI
Ring Indicator



Normal PC hardware might well run with just Tx, Rx and Ground connected, most driver software will wait forever for one of the handshaking lines to go to the correct level. Depending on the signal state it might sometimes work, other times it might not. The reliable solution is to loop back the handshake lines if they are not used.