You are on page 1of 45

Melec.

ir

RFID SMS ARM



1931

Melec.ir

Melec.ir

1Page

Melec.ir


, .

Melec.ir

2Page

Melec.ir

4 .............................................................................................................................................
5 ..........................................................................................................................................

5 ......................................................................................................................................

5 ........................................................................................

6 ...................................................................................................................... ARM

8 ........................................................................................ ARM

(8 ................................................................. ARM)NXP-LPC2138

9 ................................................................................................... NXP-LPC 2138


10 ........................................................................................................ NXP-LPC 2138
16 ...........................................................................................................................
17 ......................................................................................................................... VIC

19 .................................................................................................................................. FIQ

IRQ 19 ........................................................................................................................

IRQ 20 ...................................................................................................................

/ 20 ......................................................................................................................
22 ......................................................................................................................................... UART
Source 28 .................................................................................................................. Keil
LCD 33 ....................................................................................................................... Keil
35 ................................................................................................................... RFID

36 ...................................................................................................................................... TAG

36 .......................................................................................................... EPC

)EM-18(RFID 37 .........................................................................................
38 ............................................................................................. )SIM 900(GSM
43 .......................................................................................................................... )SIM 900(GSM

Melec.ir

3Page

Melec.ir

44 .......................................................................................................................................


RFID

.

.

;
3 .

.

.


.

LPC 2138 .

Melec.ir

4Page

Melec.ir

:
RF ID SMS .ARM
RF ID (
)
RF ID SMS
.
SMS
.
option LCD
.


; .

)NXP-LPC2138( ARM C
GSM SIM 900 ( RFID )EM-18 .IC RS232

Melec.ir

5Page

Melec.ir

: ARM
80 ARM ACRON . 80
1990 APPLE VLST Technology ACRON ARM
. RISC
75 32 .
90 ARM
.
ARM ( )
ARM .
... .

Melec.ir

6Page

Melec.ir

ARM11 ARM9 ARM7 ... .


Cortex M0 Cortex-M3 .

( ) ARM v4-6
( ) ARM v7-M ARM v7-R ( ) ARM v7-A
( )
.

Melec.ir

7Page

Melec.ir

90 ARM
4 .
50 ARM
KEIL IAR .
: ARM

200

1GHz Over Clock


( )PLL


( ) ( )
.

: . I2C Can
USB RS232 ... .
(ARM)NXP-LPC2138
Keil ARM ARM C ++C /
/ / ARM /
/ .

Melec.ir

8Page

Melec.ir

: NXP-LPC 2138

3 TIMER0 UART0 UART1


.

Melec.ir

9Page

Melec.ir

NXP-LPC 2138

ARM 63 51 49 43 23 ) Vcc ( 7 59
50 42 25 18 ) GND ( 6 57 48 41 24 20 Pull up( 17
ARM IC

Melec.ir

nF

)1

100 .

11Page

Melec.ir

Melec.ir

11Page

Melec.ir

Melec.ir

12Page

Melec.ir

Melec.ir

13Page

Melec.ir

Melec.ir

14Page

Melec.ir

Melec.ir

15Page

Melec.ir

:
ARM ( ) Exception
.
ARM 2 IRQ FIQ CPSR
2 .

CPSR
IRQ FIQ .
Memory abort Undefined Instruction Reset .

Melec.ir

16Page

Melec.ir

)general Interrupt ReQuest( IRQ


.)Fast Interrupt ReQuest ( FIQ 2 nIRQ nFIQ
ARM. CPU .

:VIC
ARM7 2 nIRQ nFIQ.
ARM7 nFIQ
. nIRQ
. OR .

Melec.ir

17Page

Melec.ir

nIRQ CPU

. " "
) Vectored Interrupt Controller ( VIC .
VIC
VIC . LPC2000 32
.
( CPU nFIQ
)nIRQ 3 .

Melec.ir

18Page

Melec.ir

FIQ IRQ IRQ . 3


FIQ IRQ IRQ
.
: FIQ
FIQ . VIC ( VICIntSelect
) Interrupt Select FIQ
. VICIntSelect
FIQ . FIQ
) VIC Interrupt Enable ( VICIntEnable .
VIC
. FIQ CPSR ( )
FIQ CPU FIQ
FIQ 0x0000001C .
.

.
.
IRQ
FIQ IRQ
. VIC
( )Lookup Table ) Interrupt Service Routine ( ISR

Melec.ir

19Page

Melec.ir

VIC . 16 ( ) Slot
.
) VIC Vector Control ( VICVectCntl Field
( 0 ) 4 ( .)5 Slot VIC
.
. LPC
2138 0 TIMER0 :

VIC )VIC Vector Address( VICVectAddr.


ISR
. ISR
VICVectaddr0 VICVectAddr15 VICVectAddr .
ISR
VICVectAddr .
ISR IRQ FIQ .
ISR ( ) 0x00000000 VICVectAddr
ISR VIC .
IRQ :
VIC 16 IRQ FIQ .
17 VIC .
ISR VICDefVectAddr
( ) VIC Default Vector Address .
VICIntEnable FIQ
( VICIntSelect ). VIC
IRQ .
VICDefVectAddr VICVectAddr CPU .
IRQ )VIC IRQ Status(VICIRQStatus
.
IRQ

Melec.ir

21Page

Melec.ir


.
/ :
LPC2000 / ( ) General Purpose
. / 2 / 32
. LPC2138 2 / TIMER0 TIMER1
2 .

/ 2 PCLK CAPx.n .
/
.

Melec.ir

21Page

Melec.ir

32 32
. TxPR
( ) Prescaler Register x 0 1.
)Prescaler Counter( TxPC PCLK
TxPR . TxCR TxPR TxTC
( )Timer Counter TxPC .
) Timer Control Register ( TxTCR .
TxTCR 2 .
( CAP0.n/ ) 0 ( CAP1.n/ ) 1
n 0 3. / 4
. 4 ( ) Capture
. / 1:0
) Count Control Register ( TxCTCR . /
2:3 TxCTCR 4 .
/ 4 . TxMRn
( ) Match Register ( x / 0 1 n 0 3).
32 . ( ) TxTC
( ) TxMRn . 2 /

/ ( ) Toggle.

MATx.n x / 0 1 n 0 3
.

Melec.ir

22Page

Melec.ir

) Match Control Register ( TxMCR


/ .
/ User Manual LPC2138 .
: UART
LPC2000 2 4 " " UART
( )Transmiter/Universal Asynchronous Reciever. LPC2138 UART
UART0 UART1. UART1
. UART " "550 . " "550
16550 ( ) National semiconductor
PC . 2 UART
BoudRate 16 Byte FIFO .
UART / PC
( PLC ) ( ) RS232 ( ) RS485
UART . LPC2000 .
UART Baud Rate . Baud Rate 16
PCLK 16 Baud Rate (
UART 16 :).

2 ) UARTx Divisor Latch LSB ( UXDLL UARTx Divisor ( UxDLM


)Latch MSB x (. UART 2 0 1).
2 1MHZ =PCLK
1200 =Baud Rate:

Melec.ir

23Page

Melec.ir

0x00 UxDLM 0x34 UXDLL .


UxDLM UxDLL ) Divisor Latch Access Bit ( DLAB
) UARTx Line Control Register ( UxLCR UxDLM UxDLL
SET .
Package LPC2138
PINSEL
) General Purpose Input/Output ( GPIO
:
: PINSEL0

Melec.ir

24Page

Melec.ir

: PINSEL1

Melec.ir

25Page

Melec.ir

: PINSEL2

UART0 PINSEL0 0x00000003


P0.0 P0.2 TxD0 RxD0 .
UART1 PINSEL0 0x00050000
P0.8 P0.9 TxD1 RxD1 .
UART ( ) Data Frame .

Melec.ir

26Page

Melec.ir

( 7 6 5 ) 8 ( 1 ) 2
( ) ( Break RS-232
( ). ).
UxLCR . 0x03
U1LCR " 8" 1" " " ".

UART UARTx Transmitter ( UxTHR


) Holding Register . UARTx Receive ( UxRBR
) Buffer Register UART .

Melec.ir

27Page

Melec.ir

0xE0010000
FIFO
FIFO .
UART ) Transmitter Holding Register Empty ( THRE
)Line Statuse Register( UxLSR
UxTHR . RDR
( )Reciever Data Register UxLSR .

Source : Keil

Melec.ir

28Page

Melec.ir

Melec.ir

29Page

Melec.ir

Melec.ir

31Page

Melec.ir

Melec.ir

31Page

Melec.ir

Melec.ir

32Page

Melec.ir

Melec.ir

33Page

Melec.ir

LCD : Keil

Melec.ir

34Page

Melec.ir

Melec.ir

35Page

Melec.ir

RFID

)Radio Frequency Identification)RFID RFID .


. 2000
. RFID
credit card ATM RFID .

RFID
. RFID (
) .
.

Melec.ir

36Page

Melec.ir

Auto-ID Technologies
( )Biometrics .

.

TAG

( )Smart Labels .
RFID ( )
. RFID


.


.
.
.

EPC
RFID .
RFID
:
( :13.56 MHz )HF .
(960 MHz )UHF

: EPC-Global ( )Gen 2

6 .
: 45.2 GHz .
.
UHF
.
EPC Gen 2 UHF
960 MHz

802.11 .

Melec.ir

37Page

Melec.ir


.
)EM-18(RFID

.
Proteus Altum Designer
.

)EM-18(RFID UART1 RXD1


.

Melec.ir

38Page

Melec.ir

)SIM 900( GSM


GSM Global System For Mobile Communications

.
1982
( )GSM
.
1988 . 1989
( )ETSI
GSM 1990 .
1993 70 48
.
Application .
.
( CEPT ) .
CEPT
.

Melec.ir

39Page

Melec.ir

CEPT GSM .
CEPT .
GSM 1991 .
CEPT=European Post offices and Telecommunication
GSM 3 :
.1
.2
.3
GSM

.
GSM :
A MSC BSC .
bis-A BSC BTS .
UM BTS MS .
MAP EIR HLR VLR MSC AUC
.
.1
end-to-end Mobility
GSM ( ) PSTN .
MSC AUC HLR VLR EIR
.
:
: MSC ( )call setup

.

Melec.ir

41Page

Melec.ir

: HLR HOME
PLMN . PLMN HLR
HLR .
: VLR visitor
MSC . MS MSC VLR
MSC MS HLR HLR . MS
MSC MS . MS
VLR
HLR VLR . HLR
.
: AUC HLR HLR
.
: EIR
( )IMEI .
Echo Canceller ( )
PSTN .
IWF MSC ( PSTN ) ISDN .

.2 :
handover .
BTS BSC MS MS .

mobility .
))IWF=InterWorking Function
MS . GSM BTS
. BTS BSC .
BSC-BTS .
. BSC handover power control BSC.
BTS BSS BSS . MSC MS
BSS .

Melec.ir

41Page

Melec.ir

link handover BSS .


N N .
( ) OMC GSM
OMC .
BSC OMC . GSM (
) HLR .
OMC .
( )NMC OMC .
GSM GSM .
: BTS

Base Transceiver Station.
: TDMA



. BTS .

TDMA .

8 .
:MSISDN
MSISDN
09121620000
:IMSI
IMSI

10 ( 43211 )IR-TCI
15 IMSI 10 MSIN .

Melec.ir

42Page

Melec.ir

10 MSIN .

( )MSISDN
.
: ( )IMSI .

( HLR )
.
.
( )
IR-TCI IR VALIACOM IR-TCI HLR
REGISTER
.
SA ALJAVAL
(
37
).
:TMSI
IMSI
8

( TMSI
IMSI
).


.
LAC : CI
6
BTS ()

Melec.ir

43Page

Melec.ir

.
( CI )CELL ID 5 .
CI
LAC LAC LAC .
LAC 4 .
: BTS ( )
LAC 1211 CI 12115 22115 32115
VLR LAC=1211 CI=32115
.

LAC .

)SIM 900( GSM

Melec.ir

44Page

Melec.ir

RFID ir.vista GSM ammepu.blogfa.com


32 ARM :

Melec.ir

45Page

You might also like