Embedded System 03
Embedded System 03
LEC #03
RAM, ROM, I/O Ports, and Timers RAM, ROM, I/O Ports, and Timers
can be added externally and can cannot be added externally. These
vary in numbers. components are to be embedded
together on a chip and are fixed in
numbers.
Microprocessor vs Microcontroller
Microprocessor Microcontroller
Designers can decide the number Fixed number for memory or I/O
of memory or I/O ports needed. makes a microcontroller ideal for a
limited but specific task.
External support of external Microcontrollers are lightweight
memory and I/O ports makes a and cheaper than a
microprocessor-based system microprocessor.
heavier and costlier.
Decompiler
A program that can translate a program from a low-level language to a
high-level language is called a decompiler.
Language Converter
A program that translates programs written in different high-level
languages is normally called a language translator, source to source
translator, or language converter.
Embedded Systems - Tools
Assemblers
An assembler is a program that takes basic computer instructions (called
as assembly language) and converts them into a pattern of bits that the
computer's processor can use to perform its basic operations. An
assembler creates object code by translating assembly instruction
mnemonics into opcodes, resolving symbolic names to memory
locations. Assembly language uses a mnemonic to represent each low-
level machine operation (opcode).
Debugging Tools in an Embedded System
Debugging is a process used to find and reduce the number of bugs in a
computer program or a piece of electronic hardware, so that it works as
expected.
1. Simulators
2. Microcontroller starter kits
Debugging Tools in an Embedded System
Simulators
Code is tested for the MCU / system by simulating it on the host
computer used for code development. Simulators try to model the
behavior of the complete microcontroller in software.
Functions of Simulators
- Defines the processor or processing device family as well as its various
versions for the target system.
- Monitors the detailed information of a source code part with labels
and symbolic arguments as the execution goes on for each single step.
- Provides the status of RAM and simulated ports of the target system
for each single step execution.
Debugging Tools in an Embedded System
- Monitors system response and determines throughput.
- Provides trace of the output of contents of program counter versus the
processor registers.
- Provides the detailed meaning of the present command.
- Monitors the detailed information of the simulator commands as
these are entered from the keyboard or selected from the menu.
- Supports the conditions (up to 8 or 16 or 32 conditions) and
unconditional breakpoints.
- Provides breakpoints and the trace which are together the important
testing and debugging tool.
- Facilitates synchronizing the internal peripherals and delays.
Debugging Tools in an Embedded System
Microcontroller Starter Kit
A microcontroller starter kit consists of −
- Hardware board (Evaluation board)
- In-system programmer
- Some software tools like compiler, assembler, linker, etc.
A big advantage of these kits over simulators is that they work in real-
time and thus allow for easy input/output functionality verification.
Starter kits, however, are completely sufficient and the cheapest option
to develop simple microcontroller projects.
Debugging Tools in an Embedded System
Microcontroller Starter Kit
Criteria for Choosing Microcontroller
While choosing a microcontroller, make sure it meets the task at hand
and that it is cost effective.
Number of Bits - We must see whether an 8-bit, 16-bit or 32-bit
microcontroller can best handle the computing needs of a task.
Speed − What is the highest speed the microcontroller can support?
Packaging − Is it 40-pin DIP (Dual-inline-package) or QFP (Quad flat
package)? This is important in terms of space, assembling, and
prototyping the end-product.
Power Consumption − This is an important criteria for battery-powered
products.
Criteria for Choosing Microcontroller
Amount of RAM and ROM on the chip.
Count of I/O pins and Timers on the chip.
Cost per Unit − This is important in terms of final cost of the product in
which the microcontroller is to be used.
Further, make sure you have tools such as compilers, debuggers, and
assemblers, available with the microcontroller. The most important of
all, you should purchase a microcontroller from a reliable source.