Electrical Dost

Microcontroller Development tools

electricaldost

Table of Contents

Development tools for microcontroller

The basic development tools used for microcontroller-based systems are

i) Software development tools
(ii) Hardware development tools

The software development tools comprise of

(i) assemblers
(ii) editors
(iii) compilers
(iv) simulators
(v) debuggers
(vi) IDE (Integrated development environment)

The hardware development tools comprise of

(i) Emulators
(ii) Demo boards
(ii) Logic analyzers
(iv) Digital storage oscilloscopes (DSO)
(v) Logic probes

In this post, we will study these hardware and software development tools.

1] Editor

–It is a program that allows the programmer to enter-and edit our programs.
–An editor is a software (i.e. a program).
–It helps the user to create a file that contains the assembly language statements.
–The examples of editors used for the assembly language programs are Wordstar, Edit, WordPad, Notepad, etc.
–The job of the editor is to store the ASCII codes for the letters and numbers in the successive RAM locations.
–As the typing of the program is over, this file is stored on a floppy or hard disk.
–This file is called the “source file” and an ASM extension is given to it.
–The source file is then processed using an assembler.
–The microchip MPLAB IDE has a text editor that allows the user to enter programs and also edit them.

2] Assembler

–Each assembly level instruction has a mnemonic. For example in the instruction MOVLW Ox50, MOVLW represents the mnemonic.
–An assembler is a program which translates the assembly language mnemonics into corresponding binary codes.
–The assembler reads the source file more than once.

Assembler operation:
–The assembler first reads the source file of the program.
–Then it determines the displacement of data items, offsets of labels, etc., and puts this information into a symbol table.
–Then it produces the binary codes for each assembly language instruction and detects syntax errors if any. Then it inserts the offsets etc. calculated earlier.

File Generation in assembly:
–An assembler generates two files namely the object file and the assembler list file.
–The object file is given an extension.OBJ whereas the assembler list file is given an extension.LST.
–Object file It contains the binary codes of the program instructions and the information about the addresses of instructions.
–List file It contains the assembly language statements, the binary codes for each instruction, and the offset of each instruction.
–Any typing or syntax errors are indicated in the assembly listing if we take a print out of.LST file.

Error detection and correction:
–The assembler is capable of only finding the syntax errors.
–To check if our program is working, we have to test and run the program.
–The errors indicated by the assembler should be edited using the editor.
–This edit-assemble loop should be executed till all the errors are corrected.
— It has the following features:
i) All the source codes can be translated into object codes.
ii) It produces the .obj, .lst files needed for debugging with the emulator systems.
iii) It has macro assembly capability.
iv) It supports decimal, hex, and octal sources as well as listing formats.

3] Compiler

— Compiler is a program that translates the high level language source program to a machine language program. The program written in a high-level language is called the source program and the program that is compiled on the machine is called an object code.
— A compiler translates the source program into relocatable object modules. The object. modules are linked by the linker. Locator loads the complete program in memory where it can be executed.
— However, the drawback of using the compiler is that if any error is detected we need to correct the source program and repeat the compilation process.

4] Cross Assembler and Compiler

— The special feature of the cross assembler is that it is not written in the same language that is used by the microcontroller that executes the machine code that is generated by the assembler.
— The cross assembler is usually written in a high-level language like FORTRAN, C, PASCAL, etc that makes it machine-independent.
— An assembler that runs on one type of computer and assembles the source code for a different target computer is called as a cross-assembler.
— For example,
(i) An assembler that runs on an Intel x86 machine and generates object code for Motorola’s 68HC05.
(ii) 8086 assembler may be written in C and then the assembler may be executed on some other machine like Motorola 6800.
— For a PIC18XXX microcontroller the cross assemblers and cross compilers generate an executable code that can be placed in the ROM, EPROM, Flash memory, or EEPROM.

 

5] Debugger

— Debugger is software too! that is used to detect the source of program or script errors, by performing step-by-step execution of application code and viewing the content of code variables.
— If a program is directly accessible from the microcomputer and does not need any external hardware, then we can use a debugger to run and test the program.
— Debugger is basically a program which permits the user to load object code program into the system memory, execute the program and debug it.
— The debugger also permits the change in register contents, memory locations and rerun the program.
— With the help of the debugger, we can stop the program execution after each instruction so that we can check or alter the memory and register contents.
— In other words we can put breakpoints in the program and execute the program from one breakpoint to the other.
— It is possible to examine the register and memory contents after partial execution of the program between the breakpoints.
— We can use the debugger to check and correct the program till all the errors are corrected.
— For most IBM PC type computers the basic debugger comes by default.
— The MPLAB IDE allows the user to debug programs using source files for PIC18xxx. family of microcontrollers.
— They make the debugging easier and allow the user to see the contents of registers and memory locations as the program is executed.

 

6] Emulator

— The emulator is used to test and debug the hardware and software of an external system such as the Microcontroller based system.
— Emulator is a combination of hardware and software.
— An emulator consists of a multi-wire cable that connects the host system to the external system.
— Through this cable the software of the emulator allows the user to download the object code program into RAM in the external system being developed.
— Like the debugger the emulator also allows the user to load the programs to be tested, nun the, programs check and modify the contents of various registers and memory locations and also insert the breakpoints.
— As each instruction in the assembly language program is executed, the emulator as if takes “snapshot” of the register contents, activities on the address and data buses, and the state of the flag register. The emulator stores this data as “trace data”.
— It is possible to take out the print out of the trace data so as to analyse the results produced in the program on the step by step basis.

 

7] Simulator

— A Simulator is often used to execute a program that has to run on Some inconvenient type of computer. For example, simulators are usually used to debug a microprogram
— Since the operation of the computer 1s Simulated, all of the information about the computer’s operation is directly available to the programmer, and the speed and execution of the simulation can be varied as per the user’s wish.
— Simulators may also be used to interpret fault trees, or test logic designs before they are constructed.
— Many video games are also simulators, that are implemented inexpensively.
— Simulator is a software package that functions like hardware without acquiring hardware. The 8051 microcontroller simulator gives the user an 8051 environment on the PC
— It performs the functions of the 8051 microcontroller / 8085 microprocessor without using it
— It also performs a simulation of different peripherals that are used with the microcontroller/ microprocessor in any application
— It provides facilities that help the user to find logical errors, facilities to help the Users learn about the initialization of different peripherals and get an insight into the microcontroller functioning.
— It does act as a direct replacement of the costly 8051 microcontroller kit.
— It shows all internal registers, entire memory and peripherals on the monitor.
— lt supports breakpoint and single-stepping facilities that help the user to debug their programs.

Computer configuration required to run the simulator:

The 8051 simulator runs on the PC. The requirement for PC is
(a) RAM of 512 KB.
(b) DOS Compatibility.
(c) IBM Mono, CGA, EGA, VGA, or Compatible Monitor.
(d) Two Disk Drives.

Features:
— Easy to operate.
— Allows Simulation of peripherals.
— Allows Simulation of Interrupts.
— Provides continuous display of the system register values.
— The Program can be easily modified.
— The core can be viewed and the corresponding instruction makes it easy to understand the logic of the program while the program executes.
— It is a powerful debugging tool with different high level debugging facilities.
— It saves the development time.
— It allows checking of Software before the hardware is available to the user.
— It has the ability for the user to construct screens that show various parts of the 8051 system. Each screen is made up of separate windows that display internal CPU registers, code and Data Memory areas.

Modes of Simulator:
The simulator has three modes of operation. They are:
1. Idle mode : This is a nonexecuting mode. This mode allows the user to set the configuration i.e. loading the program file, saving required memory contents on the disk, change the default directory or drive, etc.
2. Execute Mode: This mode is a continuous execution mode. In this mode the program that the user wishes is continuously executed.
3. Single Step Mode: In this Mode, the user program is executed step by step When the user presses the key F2 an instruction is executed, and the PC points to the next instruction.

8] Programmer

— After developing and through testing, the application is to be burned on the microcontroller chip. Burning is the action of programming each bit at successive addresses.
— The burning is done on an erased PROM (EPROM/ EEPROM or flash). Erasing means all bits = 1s.
— Then, an integrated circuit (1C) integrates the microcontroller PROM with RAM and other interfacing circuit t0 get a finished product or part of the application.
— The device programmer allows selection of the device. It then uses a hex file for burning the codes using a ribbon cable that connects to the device.
— The device programmer burns the code from hex file record of the absolute object file for an application.
— Burning means putting in the codes in PROM part of a device.

 

For other post SUPERPOSITION OF WAVES

For job updates jobinger.com

Share this post on your social media platform

Share on whatsapp
WhatsApp
Share on facebook
Facebook
Share on twitter
Twitter
Share on linkedin
LinkedIn
Share on telegram
Telegram

Krushna Bochare

Electrical Engineer, Content Creator, Working At PowerIT Solutions Pvt Ltd.

Leave a Comment

Related Posts