8/9/2019 10.Keil Software
http://slidepdf.com/reader/full/10keil-software 1/12
Software Introduction
5.2 SOFTWARE REQUIRED
KEIL CO!ILER"
Keil compiler is software used where the machine language code is written and
compiled. After compilation, the machine source code is converted into hex code which
is to be dumped into the microcontroller for further processing. Keil compiler also
supports C language code.
!ROLOAD"
Proload is software which accepts only hex files. Once the machine code is
converted into hex code, that hex code has to be dumped into the microcontroller and this
is done by the Proload. Proload is a programmer which itself contains a microcontroller
in it other than the one which is to be programmed. This microcontroller has a program in
it written in such a way that it accepts the hex file from the eil compiler and dumps this
hex file into the microcontroller which is to be programmed. As the proload programmer
it re!uires power supply to be operated, this power supply is given from the power
supply circuit designed above. "t should be noted that this programmer it contains a
power supply section in the board itself but in order to switch on that power supply, a
source is re!uired. Thus this is accomplished from the power supply board with an output
of #$volts.
KEIL CO!ILER
Than you for allowing Keil %oftware to provide you with software development tools
for &'(# based microcontrollers. )ith the Keil tools, you can generate embedded applications
for virtually every &'(# derivative. The supported microcontrollers are listed in the *+ision
8/9/2019 10.Keil Software
http://slidepdf.com/reader/full/10keil-software 2/12
De#ice Data$a%e& . The Keil %oftware &'(# development tools are designed for the
professional software developer, but any level of programmer can use them to get the most out of
the &'(# microcontroller architecture.
)e are constantly adding new devices and simulation support for onchip peripherals so be sure
to chec webbased De#ice Data$a%e& if your plan to use a device that is currently not listed inyour local *+ision installation.
The Keil %oftware &'(# development tools listed below are programs you use to compile your Ccode, assemble your assembly source files, lin and locate ob-ect modules and libraries, create
/0 files, and debug your target program.
'(i%ion1 is an "ntegrated 2evelopment /nvironment that combines pro-ect management,
source code editing, and program debugging in one single, powerful environment.
The C x5) A3%" Optimi4ing C Cross Compiler creates relocatable ob-ect modules from
your C source code.
The A x5) 5acro Assembler creates relocatable ob-ect modules from your &'(# assembly
source code.
The *L5) 6iner76ocator combines relocatable ob-ect modules created by the C(#
Compiler and the A(# Assembler into absolute ob-ect modules.
The L+5) /xtended 6iner76ocator supports extended device variants and provides
additional features. 60(# supports all variants of the C x(# Compiler and the A x(#Assembler.
The LI* x5) 6ibrary 5anager combines ob-ect modules into libraries that may be used
by the liner.
The O, x5) Ob-ect/0 Converter creates "ntel /0 files from absolute ob-ect
modules.
The RT+5) Tin- 8ealtime Operating %ystem that simplifies the design of complex,
timecritical software pro-ects.
Te%t !rora/% wit0 t0e '(i%ion De$uer
This chapter describes the De$u ode of *+ision and shows you how to use the user interface
to test a sample program. Also discussed are simulation mode and the different options available
for program debugging.
8/9/2019 10.Keil Software
http://slidepdf.com/reader/full/10keil-software 3/12
9ou can use *+ision 2ebugger to test the applications you develop using the C x(# Compiler and
A x(# 5acro Assembler. The *+ision 2ebugger offers two operating modes that are selected in
the O1tion% for Taret De$u dialog.
U%e Si/u3ator allows to configure the *+ision 2ebugger as software-only product that
simulates most features of the &'(# microcontroller without actually having targethardware. 9ou can test and debug your embedded application before the hardware isready. *+ision simulates a wide variety of peripherals including the serial port, external
"7O, and timers. The peripheral set is selected when you select a CP: from the device
database for your target.
U%e De$uer Dri#er% that connect the *+ision 2ebugger directly to emulators,
/mbedded "C/ ;Onchip 2ebug %ystem< for example with the Kei3 ULI4K US*6TA7
Ada1ter.
A113ication !rora/ E8ecution
*+ision lets execute your application program in several different ways=
)ith the De$u enu and De$u Commands.
)ith the Run ti33 Cur%or 3ine command in the local context menu. The local context
menu opens with a right mouse clic on the code line in the Editor or Di%a%%e/$3-
window.
"n the Out1ut Window Co//and page you can use the 7o, O%te1, !%te1, and T%te1
commands.
O1code%
The following table lists the &'(# instructions by /0 code.
8/9/2019 10.Keil Software
http://slidepdf.com/reader/full/10keil-software 4/12
,e8
Code *-te% ne/onic O1erand%
'' # 3OP
'# $ A>5P addr##
'$ ? 6>5P addr#@
'? # 88 A' # "3C A
'( $ "3C direct
'@ # "3C B8'
' # "3C B8#
'& # "3C 8'
'D # "3C 8#
'A # "3C 8$
'E # "3C 8?
'C # "3C 8
'2 # "3C 8(
'/ # "3C 8@
'F # "3C 8
#' ? >EC bit, offset
## $ ACA66 addr##
#$ ? 6CA66 addr#@
#? # 88C A
# # 2/C A
#( $ 2/C direct
#@ # 2/C B8'
# # 2/C B8#
#& # 2/C 8'
#D # 2/C 8#
#A # 2/C 8$
#E # 2/C 8?
#C # 2/C 8
#2 # 2/C 8(
#/ # 2/C 8@
#F # 2/C 8
$' ? >E bit, offset
$# $ A>5P addr##
$$ # 8/T
$? # 86 A
$ $ A22 A, Gimmed
$( $ A22 A, direct
$@ # A22 A, B8'
$ # A22 A, B8#
$& # A22 A, 8'
$D # A22 A, 8#
$A # A22 A, 8$
,e8
Code *-te% ne/onic O1erand%
&' $ %>5P offset
&# $ A>5P addr##
&$ $ A36 C, bit
&? # 5O+C A, BAHPC& # 2"+ AE
&( ? 5O+ direct, direct
&@ $ 5O+ direct, B8'
& $ 5O+ direct, B8#
&& $ 5O+ direct, 8'
&D $ 5O+ direct, 8#
&A $ 5O+ direct, 8$
&E $ 5O+ direct, 8?
&C $ 5O+ direct, 8
&2 $ 5O+ direct, 8(
&/ $ 5O+ direct, 8@
&F $ 5O+ direct, 8
D' ? 5O+ direct, 8&
D# $ ACA66 addr##
D$ $ 5O+ bit, C
D? # 5O+C A, BAH2PT8
D $ %:EE A, Gimmed
D( $ %:EE A, direct
D@ # %:EE A, B8'
D # %:EE A, B8#
D& # %:EE A, 8'
DD # %:EE A, 8#
DA # %:EE A, 8$
DE # %:EE A, 8?
DC # %:EE A, 8
D2 # %:EE A, 8(
D/ # %:EE A, 8@
DF # %:EE A, 8
A' $ O86 C, 7bit
A# $ A>5P addr##
A$ $ 5O+ C, bit
A? # "3C 2PT8
A # 5:6 AE
A( reserved
A@ $ 5O+ B8', direct
A $ 5O+ B8#, direct
A& $ 5O+ 8', direct
AD $ 5O+ 8#, direct
AA $ 5O+ 8$, direct
8/9/2019 10.Keil Software
http://slidepdf.com/reader/full/10keil-software 5/12
8/9/2019 10.Keil Software
http://slidepdf.com/reader/full/10keil-software 6/12
(& # A36 A, 8'
(D # A36 A, 8#
(A # A36 A, 8$
(E # A36 A, 8?
(C # A36 A, 8
(2 # A36 A, 8(
(/ # A36 A, 8@
(F # A36 A, 8
@' $ >I offset
@# $ A>5P addr##
@$ $ 086 direct, A
@? ? 086 direct, Gimmed
@ $ 086 A, Gimmed
@( $ 086 A, direct
@@ # 086 A, B8'
@ # 086 A, B8#
@& # 086 A, 8'
@D # 086 A, 8#
@A # 086 A, 8$
@E # 086 A, 8?
@C # 086 A, 8
@2 # 086 A, 8(
@/ # 086 A, 8@
@F # 086 A, 8
' $ >3I offset
# $ ACA66 addr##
$ $ O86 C, bit
? # >5P BAH2PT8
$ 5O+ A, Gimmed
( ? 5O+ direct, Gimmed
@ $ 5O+ B8', Gimmed
$ 5O+ B8#, Gimmed
& $ 5O+ 8', Gimmed
D $ 5O+ 8#, Gimmed
A $ 5O+ 8$, Gimmed
E $ 5O+ 8?, Gimmed
C $ 5O+ 8, Gimmed
2 $ 5O+ 8(, Gimmed
/ $ 5O+ 8@, Gimmed
F $ 5O+ 8, Gimmed
2 # 0C2 A, B8#
2& $ 2>3I 8', offset
2D $ 2>3I 8#, offset
2A $ 2>3I 8$, offset
2E $ 2>3I 8?, offset
2C $ 2>3I 8, offset
22 $ 2>3I 8(, offset
2/ $ 2>3I 8@, offset
2F $ 2>3I 8, offset
/' # 5O+0 A, B2PT8
/# $ A>5P addr##
/$ # 5O+0 A, B8'
/? # 5O+0 A, B8#
/ # C68 A
/( $ 5O+ A, direct
/@ # 5O+ A, B8'
/ # 5O+ A, B8#
/& # 5O+ A, 8'
/D # 5O+ A, 8#
/A # 5O+ A, 8$
/E # 5O+ A, 8?
/C # 5O+ A, 8
/2 # 5O+ A, 8(
// # 5O+ A, 8@
/F # 5O+ A, 8
F' # 5O+0 B2PT8, A
F# $ ACA66 addr##
F$ # 5O+0 B8', A
F? # 5O+0 B8#, A
F # CP6 A
F( $ 5O+ direct, A
F@ # 5O+ B8', A
F # 5O+ B8#, A
F& # 5O+ 8', A
FD # 5O+ 8#, A
FA # 5O+ 8$, A
FE # 5O+ 8?, A
FC # 5O+ 8, A
F2 # 5O+ 8(, A
F/ # 5O+ 8@, A
FF # 5O+ 8, A
All mnemonics Copyright J #D&' "ntel Corporation.
Copyright ;c< Keil %oftware, "nc. and Keil /letroni mb. All rights reserved.
8/9/2019 10.Keil Software
http://slidepdf.com/reader/full/10keil-software 7/12
8/9/2019 10.Keil Software
http://slidepdf.com/reader/full/10keil-software 8/12
8/9/2019 10.Keil Software
http://slidepdf.com/reader/full/10keil-software 9/12
%P" Communication etc.
N+ision, the popular "2/ from Keil %oftware, combines Pro-ect 5anagement, %ourceCode /diting, Program 2ebugging, and Flash Programming in a single, powerful environment. H
Pro-ect 5anagement, 2evice %etup, and Tool Configuration. H Target 2ebugging or CP: Peripheral %imulation. For experienced users, N+ision? adds new features such as %ource
Outlining, Function 3avigation, /ditor Templates, "ncremental %earch, $ Configuration )i4ard,6ogic Analy4er, CA3 and " C %imulation, Flash Programming, and >TA 2ebugging.
This uic %tart guide gives you the information necessary to use N+ision? for your own pro-ects. "t provides an overview of the most commonly used N+ision? features including= /ditor
facilities for Creating, 5odifying, and Correcting Programs.
U%in OnC0i1 !eri10era3%
There are a number of techni!ues you must now to create programs that utili4e the variousonchip peripherals and features of the &'(# family. 5any of these are described in this chapter.
9ou may use the code examples provided here to !uicly get started woring with the &'(#.
There is no single standard set of onchip peripherals for the &'(# family. "nstead, &'(# chip
vendors use a wide variety of onchip peripherals to distinguish their parts from each other. The
code examples in this chapter demonstrate how to use the peripherals of a particular chip orfamily. Ee aware that there are more configuration options than are presented in this text .
%tartup Code
%pecial Function 8egisters
8egister Eans
"nterrupt %ervice 8outines
"nterrupt /nable 8egisters
Parallel Port "7O
Timers7Counters
%erial "nterface
8/9/2019 10.Keil Software
http://slidepdf.com/reader/full/10keil-software 10/12
)atchdog Timer
27A Converter
A72 Converter
Power 8eduction 5odes
De$uin
This chapter describes the De$u ode of *+ision? and shows you how to use the userinterface to test a sample program. Also discussed are simulation mode and the different options
available for program debugging.
9ou can use *+ision? 2ebugger to test the applications you develop. The *+ision? 2ebugger
offers two operating modes that are selected in the O1tion% for Taret De$u dialog.
U%e Si/u3ator configures the *+ision? 2ebugger as software-only product that
simulates most features of a microcontroller without actually having target hardware. 9ou
can test and debug your embedded application before the hardware is ready. *+ision?simulates a wide variety of peripherals including the serial port, external "7O, and timers.
The peripheral set is selected when you select a CP: from the device database for your
target.
U%e Advanced 2" drivers, lie the ULI4K De$uer to interface to your target
hardware. For *+ision? various drivers are available that interface to=
6TA79OCDS Ad1ater= which connects to onchip debugging systems lie the
A85 /mbedded "C/.
onitor= that may be integrated with user hardware or is available on many
evaluation boards.
8/9/2019 10.Keil Software
http://slidepdf.com/reader/full/10keil-software 11/12
E/u3ator= which connects to the CP: pins of the target hardware.
InS-%te/ De$uer= which is part of the user application program and provides
basic test functions.
Te%t ,ardware= such as the "nfineon %martCard 8O5 5onitor 85@@P or the
Philips %mart50 2Eox.
4ote
The Statu% *ar shows the current active debugging tool. "n simulation mode, timing
statistic is provided.
ASSE*L: I4STRUCTIO4S"
Chec the components supplied in the Kit against the Component list and identify
all the components.
"t is generally best to solder the lowest height components first. %older the
components in the following order=
>umpers, resistors, diodes, "C base, transistors and other components.
Tae care of terminals polarity while soldering diodes, 6/2s and electrolytic
capacitors.
"dentify the terminals of transistors and solder them in correct direction.
Connect the 6C2 with the help of #@pin malefemale worstrip connector.
:se flux cored lead to avoid dry solder ability.
"nspect the solder points against dry solder 7 excess solder
8/9/2019 10.Keil Software
http://slidepdf.com/reader/full/10keil-software 12/12