Before proceeding to programming, first understand the steps of programming. Programming may be in any language but must need some basic things to be considered.
Steps of Program
Development:
- Defining
the problem
- Algorithm: Sequence of operation or program
- Flow chart: Geographical representation of operation or program
- Check list initialization: like required registers, flags, SFR’s, Ports, variables, constants etc.
- Selecting instructions properly
- Converting the algorithm in actual program
Program is nothing but sequence of instruction
which is arranged in proper manner. Following are some steps involved in
software development i.e. software development cycle.
1.
Write
codes i.e. instructions
2.
Translate
written codes into suitable language
3.
Debug
the codes i.e. look for errors using emulators
4.
Linking
programs together
5.
Load
final code into microcontroller (Burn the program into microcontroller)
1.
Write
codes i.e. instructions: Generally assembly language (Low level language) or
C-language (High level language) is used to write the codes/ instructions for
microcontroller. To write codes, editors are used. By considering difference between assembly language and C-language, one can decide his/her choice. Editor
programs such as MS dox, notepad are used to write codes in ASCII text format.
The written codes must be saved with extension .asm (for assembly language) or
.c (for C-language). Thus output of editor program is .asm or .c file.
2.
Translate
written codes into suitable language: Assembler is used to convert codes
written in assembly language into machine codes. On the other hand compiler is
used for the same when codes are written in C-language. Assembler/compiler produces
.obj files (Object files) and .lst files (List files). List file lists all
operational codes addresses and errors that are detected assembler/compiler.
3.
Debug
the codes i.e. look for errors using emulators: Debugger is the tool used to
debug the codes. Most of the compilers/assemblers include debugger which allows
the user to test and debug program. Debugger provides facility of breakpoints
as well as single step testing.
4.
Linking
programs together: Generally large programs are divided into small modules for
ease of testing and debugging. The function of linker is to combine all object
files into one program. The output of linker program is .abs file (absolute
file) which is input for next stage.
5.
Load
final code into microcontroller (Burn the program into microcontroller): Object hex programs are used to convert
absolute files into final executable file i.e. hex files that are ready to burn
into ROM of microcontroller. There are so may OTP (one time programmer) and
flash programming tools like flash magic, which are used to load/burn program
into microcontroller.
Software
and hardware tools used in software development:
Following is the list of different hardware
and software development tools followed by brief explanation.
1.
Editor
2.
Assembler
3.
Compiler
4.
Interpreter
5.
Linker
6.
Locator
7.
Loader
8.
Library
9.
Debugger
10. Simulator
11. Emulator
12. IDE
Editor: Editor Program is used to create and modify
the source program written in low level language (assembly language) or high
level language (c-language). Editor program comes with commands to change, delete
or insert lines or characters. Notepad, MS docs, MSDOS are some examples of
editor.
Assembler: Assembler is a program used to translate low
level language (Assembly) programs into machine language.
Self assembler is
type of assembler which runs on the microcontroller for which it produces
output. In other words, codes generated by self assembler are used for that particular
microcontroller.
Cross assemblers are
the assemblers that create codes for different microcontrollers. Macro
assembler is the assembler which provide facility to use macro (macro is the
sequence of codes or instruction to which name is assigned)
No comments:
Post a Comment