You are on page 1of 8

I HC QUC GIA H NI

TRNG I HC CNG NGH

TRNG XUN THNG

GIAO TIP VI VI IU KHIN ARM

LUN VN THC S

H Ni - 2011

I HC QUC GIA H NI
TRNG I HC CNG NGH

TRNG XUN THNG

GIAO TIP VI VI IU KHIN ARM


Ngnh: Cng ngh in t - Vin thng
Chuyn ngnh: K thut in t
M s: 60 52 70

LUN VN THC S

NGI HNG DN KHOA HC: PGS. TS NG DIN TP

H Ni - 2011

-1MC LC
M U .........................................................................................................................5
PHN I - L THUYT CHUNG.................................................................................6
CHNG 1 - CU TRC VI IU KHIN ARM ..................................................6
1.1 i nt v lch s hnh thnh v pht trin vi iu khin ARM ..........................6
1.2 Cu trc c bn ARM ..........................................................................................7
1.3 M hnh kin trc .................................................................................................7
1.4 M hnh thit k ARM .......................................................................................10
1.4.1 Li x l ......................................................................................................10
1.4.2 Cc thanh ghi ca ARM ..............................................................................11
1.5 Cu trc load-store .............................................................................................12
1.6 Cu trc tp lnh ca ARM ...............................................................................12
1.6.1 Thc thi lnh c iu kin ...........................................................................12
1.6.2 Phng thc nh a ch ............................................................................12
1.6.3 Ngn xp .....................................................................................................13
1.6.4 Tp lnh ARM.............................................................................................13
1.7 Kt lun ..............................................................................................................16
CHNG 2 - GIAO TIP VI VI IU KHIN ARM .......................................17
2.1 M hnh giao tip trong vi iu khin ARM .....................................................17
2.2 Cc giao tip c bn trong vi iu khin ARM .................................................18
2.2.1 Giao tip vi b nh ....................................................................................18
2.2.2 Giao tip vi b iu khin ngt .................................................................21
2.2.3 Giao tip vi b nh thi ...........................................................................25
2.2.4 Giao tip vi b iu khin tm dng v Reset ..........................................28
2.2.5 Giao tip vi khi GIPO .............................................................................30
2.2.6 Giao tip vi khi truyn/thu khng ng b a nng (UART) .................32
2.2.7 Giao tip ngoi vi ni tip (SPI) .................................................................34
2.2.8 Giao tip USB .............................................................................................35
2.2.9 Kin trc bus truyn d liu cao cp ca vi iu khin ARM ....................37
2.3 Kt lun ..............................................................................................................41
CHNG 3 - C IM CC DNG LI X L ARM ...................................43
3.1 Phn loi v tnh nng cc dng li x l ARM................................................43
3.2 c im cc dng li x l ARM ....................................................................45
3.2.1 c im ca kin trc dng li x l ARM v4T ......................................45
3.2.2 c im kin trc dng li x l ARM v5 ...............................................46
3.2.3 c im kin trc dng li x l ARM v6 ...............................................47
3.2.4 Kin trc dng li x l ARM v7 ...............................................................48
3.3 Kt lun ..............................................................................................................49

-2PHN II - THC NGHIM ......................................................................................50


CHNG 4 - NG DNG MT S GIAO TIP VI VI IU KHIN
AT91SAM7S64.............................................................................................................50
4.1 Gii thiu ...........................................................................................................50
4.2 c tnh c bn ca vi iu khin AT91SAM7S64 ..........................................51
4.3 Khi ngun cung cp .........................................................................................53
4.4 Cng kt ni chun JTAG .................................................................................55
4.5 Mch cm bin nhit .....................................................................................55
4.6 Giao tip vi IC thi gian thc DS12C887 .......................................................58
4.7 Hin th d liu trn LED 7 on ......................................................................69
4.8 Giao tip vi SD Card........................................................................................72
4.9 Giao tip vi my tnh qua cng COM..............................................................79
4.10 S nguyn l mch......................................................................................82
4.11 S mt trn mch in ....................................................................................84
4.12 S mt di mch in ...................................................................................84
4.13 Mch hon chnh ..............................................................................................85
4.14 Kt qu .............................................................................................................85
4.15 Lu thut ton .............................................................................................88
KT LUN ..................................................................................................................89
TI LIU THAM KHO .............................................................................................90
DANH MC BNG ......................................................................................................91
DANH MC HNH ........................................................................................................92
PH LC ......................................................................................................................94

Tn lun vn: Giao tip vi vi iu khin ARM


Hc vin: Trng Xun Thng.
Chuyn ngnh: K thut in t.
Ngnh: Cng ngh in t - Vin thng.
Khoa: in t - Vin thng.
Email: thange16@gmail.com

Gio vin hng dn: PGS. TS Ng Din Tp.


C quan cng tc: Trng i hc Cng ngh, i hc
Quc gia H Ni.
Email: ndtap06@vnn.vn

T kho li x l ARM, giao tip ARM, SD Card vi vi iu khin, lu tr d liu thi gian thc.

I. TNG QUAN ARM

Trnh by v tng quan v cu trc vi iu khin ARM.


II. M HNH GIAO TIP VI IU KHIN ARM

Cc giao tip trn vi iu khin ARM c ti u t khi thit k, lun c sn cc cng c h tr giao
tip cho c phn cng v phn mm t hng, rt thun li cho ngi lp trnh tip cn v pht trin ng
dng.
Cc giao tip ny lun c kh nng tng tc tt vi cc thit b ngoi vi trn h thng bus truyn d
liu c tc x l cao v tiu th nng lng thp.
III. C IM CC DNG LI X L ARM

Cc dng li x l ARM cho n nay gm bn kin trc. Kin trc ARMv4, ARMv5, ARMv6 v
ARMv7. Mi mt kin trc u c nhng tnh nng x l c trng, phin bn sau c s b sung thm
cc tnh nng c bit, nhng c tnh k tha ca cc phin bn trc. phin bn ARMv7, hng ARM
pht trin chun giao tip phn mm vi iu khin Cortex (CMSIS), kt hp cht ch vi cc nh cung
cp phn mm chun ha giao tip vi cc thit b ngoi vi, cc h iu hnh thi gian thc v cc
thit b trung gian.
IV. XY DNG MCH THC NGHIM DA TRN VI IU KHIN ARM

Th nghim giao tip trn vi iu khin AT91SAM7S64 ca Atmel c li x l l ARM7TDMI, ni


dung thc nghim gm:
- Thu thp nhit , hin th nhit v thi gian thc trn LED 7 on;
- Lu d liu vo th nh vi thi gian thc (nhit ; thi gian; ngy/ thng/nm);
- c kt qu d liu lu vo th nh trn my tnh bng u c th hoc c trc tip trn mch
qua cng COM.
Trnh by s khi ca mch thc nghim, nguyn l lm vic chi tit tng khi, s mch in,
lu thut ton chng trnh v kt qu thc nghim ca ti.
IV. KT LUN

Lun vn t c kt qu sau:
- Tm hiu c cu trc, cc giao tip c bn ca vi iu khin ARM v c im chung cc dng
li x l ARM hin nay.
- Xy dng c mt mch in thc t p ng mc tiu t ra.
- Lun vn m ra kh nng v hng pht trin cc ng dng da trn vi iu khin ARM.
TI LIU THAM KHO
Ng Din Tp (2006), Vi iu khin vi lp trnh C, Nh xut bn Khoa hc v K thut H Ni.
Ng Din Tp (1999), Vi x l trong o lng v iu khin, Nh xut bn Khoa hc v K thut H Ni.
Trn Quang Vinh, Ch Vn An (2005), Nguyn l k thut in t, Nh xut bn Gio dc.
Trn Quang Vinh (2005), Cu trc my vi tnh, Nh xut bn i Hc Quc Gia H Ni.
Andy Wu (March 12, 2003), ARM SOC Architecture, Graduate Institute of Electronics Engineering, NTU.
Andrew N. SLOSS, Dominic, Chris WRIGHT (San Francisco, 2004), ARM System Developers Guide, Designing and
Optimizing System Software.
[7] ARM DUI 0061A (March 1997). ARM Target Development System, User Guide. Copyright ARM Ltd. Part 5:
Programmers Model of the ARM Development Board.
[8] ARM DDI 0062D, Copyright Advanced RISC Machines Ltd (ARM) 1996. Reference Peripherals Specification.
[9] ARM DUI 0159B, Copyright 2002 ARM Ltd. Integrator/CP. Chapter 4: Peripherals and Interfaces.
[1]
[2]
[3]
[4]
[5]
[6]

[10] Jan Axelson (2005), USB Complete: Everything You Need to Develop USB Peripherals, Third Edition.
[11] ARM DVI 0010A (October 1996). Introduction to AMBA.
[12] ARM IHI 0011A (13th May 1999). AMBA Specification (Rev 2.0).
[13] http://www.arm.com/
[14] AT91SAM7S64 datasheet.
[15] James P. Lynch, Grand Island, New York, USA (October 8, 2006). Using Open Source Tools for AT91SAM7S Cross
Development (Revision 2).
[16] LM35 datasheet.
[17] LM358AD datasheet.
[18] DS12C887 datasheet.
[19] 74HC595 datasheet.
[20] Dogan Ibrahim (2010). SD Card Projects using the PIC Microcontroller.
[21] PL-2303 Edition USB to Serial Bridge Controller datasheet (April 26, 2005).

Thesis name: Interface with the ARM MicroController


Student name: Trng Xun Thng.
Minor: Electronic Engineering.
Major: Electronics Technology - Telecommunications.
Department: Electronics - Telecommunications.
Email: thange16@gmail.com

Professor name: Professor, Ph.D Ng Din Tp.


Affiliation: University of Engineering and Technology,
Vietnam National University, Hanoi.
Email: ndtap06@vnn.vn

Keywords ARM cores, ARM interface, SD Card with a MicroController, to store data in real time.

I. OVERVIEW OF ARM MICROCONTROLLER


Overview of ARM MicroControllers structure
II. INTERFACES MODELING OF ARM MICROCONTROLLER
The interface on the ARM microcontroller is optimized when designing, readily available tools to support
communication for both hardware and software from vendors.Therefore, its very convenient for access to
programming and application development.
The communication is always able to interact well with other peripherals on the system bus data transfering
speeds and high processing energy consumption low.
III. CHARACTERISTICS OF THE ARM PROCESSOR CORE SERIES
The ARM processor core series to date consists of four architectural: ARMv4, ARMv5, ARMv6 v ARMv7.
Each architecture has its unique processing features, later with the addition of special features, but the legacy of
its predecessors. In version ARMv7, ARM has developed standard interfaces in software Cortex Microcontroller
(CMSIS), incorporated with software vendors to standardize communication with peripheral devices, operating
systems real-time and middleware devices.
IV. EXPERIMENTAL CIRCUIT DESIGNING BASE ON ARM MICROCONTROLLER
Testing of communication on the Atmel microcontroller AT91SAM7S64 with the ARM7TDMI processor core,
including:
- Collect temperature, display temperature and real-time on 7 segment LED;
- Save data to a memory card with real time (temperature; time; day / month / year);
- Read the result data stored in computer memory card with card reader or read directly on the circuit through
the COM port.
Display the block diagram of the experimental circuit, the principle of detailed work each block, in circuit
diagram, flowchart program algorithms and experimental results of the research.
V. CONCLUSION
Thesis achieved the following results:
- Get thorough knowledge on ARM MicroController.
- Understanding on basic interfaces on ARM MicroController.
- Understanding on features of ARM processing cores.
- Building experimental circuits based on Atmels AT91SAM7S64 MicroController.
REFERENCES
Ng Din Tp (2006), Vi iu khin vi lp trnh C, Nh xut bn Khoa hc v K thut H Ni.
Ng Din Tp (1999), Vi x l trong o lng v iu khin, Nh xut bn Khoa hc v K thut H Ni.
Trn Quang Vinh, Ch Vn An (2005), Nguyn l k thut in t, Nh xut bn Gio dc.
Trn Quang Vinh (2005), Cu trc my vi tnh, Nh xut bn i Hc Quc Gia H Ni.
Andy Wu (March 12, 2003), ARM SOC Architecture, Graduate Institute of Electronics Engineering, NTU.
Andrew N. SLOSS, Dominic, Chris WRIGHT (San Francisco, 2004), ARM System Developers Guide, Designing and
Optimizing System Software.
[7] ARM DUI 0061A (March 1997). ARM Target Development System, User Guide. Copyright ARM Ltd. Part 5: Programmers
Model of the ARM Development Board.
[8] ARM DDI 0062D, Copyright Advanced RISC Machines Ltd (ARM) 1996. Reference Peripherals Specification.
[9] ARM DUI 0159B, Copyright 2002 ARM Ltd. Integrator/CP. Chapter 4: Peripherals and Interfaces.
[10] Jan Axelson (2005), USB Complete: Everything You Need to Develop USB Peripherals, Third Edition.
[11] ARM DVI 0010A (October 1996). Introduction to AMBA.
[1]
[2]
[3]
[4]
[5]
[6]

[12] ARM IHI 0011A (13th May 1999). AMBA Specification (Rev 2.0).
[13] http://www.arm.com/
[14] AT91SAM7S64 datasheet.
[15] James P. Lynch, Grand Island, New York, USA (October 8, 2006). Using Open Source Tools for AT91SAM7S Cross
Development (Revision 2).
[16] LM35 datasheet.
[17] LM358AD datasheet.
[18] DS12C887 datasheet.
[19] 74HC595 datasheet.
[20] Dogan Ibrahim (2010). SD Card Projects using the PIC Microcontroller.
[21] PL-2303 Edition USB to Serial Bridge Controller datasheet (April 26, 2005)

You might also like