0% found this document useful (0 votes)
6 views

Microcontroller_1_1707718209291

The document provides a comprehensive overview of microcontrollers, including their comparison with microprocessors, architectural models (Von Neumann and Harvard), and the characteristics of embedded systems. It also discusses the limitations of 8-bit microcontrollers, the role of microcontrollers in embedded systems, and details about RS232 and RS485 communication standards. Key features and functionalities of RISC and CISC architectures are also highlighted.

Uploaded by

shraddhaalegavi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views

Microcontroller_1_1707718209291

The document provides a comprehensive overview of microcontrollers, including their comparison with microprocessors, architectural models (Von Neumann and Harvard), and the characteristics of embedded systems. It also discusses the limitations of 8-bit microcontrollers, the role of microcontrollers in embedded systems, and details about RS232 and RS485 communication standards. Key features and functionalities of RISC and CISC architectures are also highlighted.

Uploaded by

shraddhaalegavi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 48

Introduction to Microcontroller

DEpt of E&TC, RSCOE 1


Microprocessor and Microcontroller comparison
Parameters Microprocessor Microcontroller
Microprocessor is the heart of Computer Micro Controller is the heart of an embedded
system. system.
Architecture Microprocessor is based on Von-Neumann Microcontroller is based on Harvard architecture
architecture where program memory and data where program memory and data memory are
memory are common separate
CPU General purpose CPU runs at a higher Specific purpose CPU runs at a lower frequency
frequency
Speed Faster in various operations Slower

Components Components can be outside the processor, it All devices and peripherals are integrated inside the
is only a processor, so memory and I/O unit. Micro Controller has a processor along with
components need to be connected externally internal memory and I/O components.
Boolean Functions Does not support Supports

CPU Registers Need more time to access CPU registers Faster in accessing the CPU registers

Usage In desktop, servers, laptops, and other general Mostly in real time applications to control
purpose computer devices
Real time operating Supports RTOS +kernel-based services Supports RTOS
system
Hardware complexity More complex Relatively simple

Peripheral interface The common peripheral interface for the The common peripheral interface for the
microprocessor is USB, UART, and high- microcontroller is I2C, SPI, and UART.
DEpt of E&TC, RSCOE speed Ethernet. 2
Von Neumann Architecture
 The Von Neumann architecture is an architectural model, originally proposed by
John Von Neumann. the Von Neumann architecture divides a computing system
into four main units: CPU, memory, input and output units.
Von Neumann architecture Features
 The Von Neumann architecture is a theoretical design based on the stored-program
computer concept.
 The Von Neumann architecture has only one bus that is used for both instructions
fetches and data transfers. More importantly, the operation must be scheduled
because they cannot be performed at the same time.
 The processing unit would require two clock cycles to complete an instruction.
 Von Neumann architecture is usually used literally in all machines from desktop
computers, notebooks, high performance computers to workstations.
 In Von Neumann, instructions and data use the same bus system therefore the
design and development of control unit is simplified, hence the cost of production
becomes minimum.
DEpt of E&TC, RSCOE 3
Harvard Architecture
 Harvard architecture is named after the “Harvard Mark I” relay based computer, which was an IBM
computer in the University of Harvard. In the Harvard architecture, there are two separate memory
spaces: one for programs and another for data.
Harvard Architecture Features
 The Harvard architecture is a modern computer architecture based on the Harvard Mark I relay-based
computer model.

 The Harvard architecture has separate memory space for instructions and data which physically
separates signals and storage code and data memory, which in turn makes it possible to access each
of the memory system simultaneously.

 In the Harvard architecture, the processing unit can complete an instruction in one cycle if appropriate
pipelining plans have been set.
 Harvard architecture is a new concept used specifically in microcontrollers and digital signal
processing (DSP).

 Harvard architecture is complex kind of architecture because it employs two buses for instruction and
data, a factor that makes development of the control unit comparatively more expensive.

DEpt of E&TC, RSCOE 4


Von-Neumann and Harvard
Architecture

DEpt of E&TC, RSCOE 5


Comparison of RISC and CISC
RISC CISC

RISC stands for Reduced Instruction Set Computer. CISC stands for Complex Instruction Set Computer.

RISC processors have simple instructions taking about one CSIC processor has complex instructions that take up multiple
clock cycle. The average clock cycle per instruction (CPI) is 1.5 clocks for execution. The average clock cycle per instruction
(CPI) is in the range of 2 and 15.
Performance is optimized with more focus on software Performance is optimized with more focus on hardware.

It has no memory unit and uses separate hardware to implement It has a memory unit to implement complex instructions.
instructions..
The instruction set has a variety of different instructions that CISC has many different addressing modes and can thus be
can be used for complex operations used to represent higher-level programming language
statements more efficiently.
Fewer addressing modes More addressing modes

fixed (32-bit) format Varying formats (16-64 bits for each instruction).

RISC processors are highly pipelined They are normally not pipelined or less pipelined

The most common RISC microprocessors are Alpha, ARC, Examples of CISC processors are the System/360, VAX, PDP-
ARM, AVR, MIPS, PA-RISC, PIC, Power Architecture, and 11, Motorola 68000 family, AMD, and Intel x86 CPUs.
SPARC.
RISC architecture is used in high-end applications such as video CISC architecture is used in low-end applications such as
processing, telecommunications, and image processing. security systems, home automation, etc.
DEpt of E&TC, RSCOE 6
RISC and CISC Block diagram

DEpt of E&TC, RSCOE 7


Definition of embedded system

 An embedded system is a system that has software embedded into hardware, which
makes a system dedicated for an application (s) or specific part of an application or
product or part of a larger system
OR
 Microcontroller-based, software-driven, reliable, real-time control system, autonomous
or human or network-interactive, operating on diverse physical variables and in diverse
environments, and sold into competitive and cost-conscious market.

DEpt of E&TC, RSCOE 8


Characteristics of Embedded System
 Power: The amount of power consumed by the system, which determines the
lifetime of a battery, cooling requirements for an integrated circuits.
 Nonrecurring engineering cost(NRE cost): It is the one time momentary cost
that is required at the time of designing the system. A number of units can be
designed once the system is designed.
 Reliability: The system should be able to work properly even if anything
happens to the system. The system software should cope up with all kinds of
situations without human intervention.
 Response time: The response time of an embedded system is the time required
for the embedded system to react to certain situations. The response time
should be as small as possible.
 Flexibility: Flexibility of an embedded system is the amount by which the
designer can change the functionality of embedded system without bearing a
heavy nonrecurring engineering cost.

DEpt of E&TC, RSCOE 9


Continued
 Maintainability: It is the ability by which the designer can change the embedded
system after the system has been released.
 Safety: This parameter indicates the probability by which the system is safe to
the user and will not cause harm.
 Correctness: It gives the user a confidence that he has been successful in
implementing the system’s functionality correctly. We can check the
functionality throughout the process of designing the system, and we can insert
test circuitry to check that manufacturing was correct.
 Memory size: the physical space required by the system, often measured in
bytes for software, and gates or transistors for hardware. The embedded
system must be designed such that the design meets with all the system
requirements and acquires a finite amount of memory space.
 Unit cost: the monetary cost of manufacturing each copy of the system,
excluding NRE cost. It includes the cost that is required for producing each unit
of the embedded system.
DEpt of E&TC, RSCOE 10
Continued
 Time-to-prototype: The amount of time to build a working version of the system,
which may be bigger or more expensive than the final system implementation,
but can be used to verify the system’s usefulness and correctness and to refine
the system's functionality.
 Performance: the execution time or throughput of the system. The execution
time should be as small as possible.
 Time-to-market: The amount of time required to design and manufacture the
system to the point the system can be sold to customers. The time is
dependent on the design time, manufacturing time and the testing time.
 Testability: It is the ability of the embedded system to prepare a setup to test
the embedded system software.

DEpt of E&TC, RSCOE 11


Limitation of 8-bit microcontrollers
 An 8-bit microcontroller has limited addressing
 An 8-bit microcontroller would normally only allow arithmetic operations that
output numbers ranging from 0 to 255 (or from -127 to 128)
 A typical 8-bit microcontroller usually runs at 8 Mhz while a 32-bit
microcontroller can be clocked up to hundreds of Mhz.
 An 8-bit microcontroller would be insufficient if we require Ethernet, Universal
Serial Bus (USB Stack), multiple universal asynchronous receiver-transmitter
devices (UARTS), and a Controller Area Network (CAN) bus
 8 bit microcontroller reveals velocity of 12 MIPS at 48 MHz whereas 16 bit
reveals most 16 MIPS at 32 MHz
 It takes more cycles for an 8-bit MCU to complete a large computation. If
there’s an interrupt or failure in the middle of a transfer, the 8-bit MCU has a
greater chance of not completing the task, with several cycles required
 Using an 8 bit microcontroller may not suffice the required accuracy of the
application.

DEpt of E&TC, RSCOE 12


Role of Microcontroller in Embedded
system
 A microcontroller is a independent system with a processor, memory
and General Purpose Input Output (GPIO) pins and can be used as an
embedded system.
 Most of the microcontrollers in use today are embedded in other
machinery, such as automobiles, smartphones, home appliances, and
peripherals for computer systems.
 A microcontroller has microprocessor along with RAM, ROM, etc on a
single board. It not only helps in processing the data but also to
perform operations on the data obtained.
 Microcontroller acts as brain in embedded system. It controls the flow
of data and execute functions accordingly.

DEpt of E&TC, RSCOE 13


RS 232
 RS232 port is a standard serial communication transmission of data. In RS 232,
the term RS stands for recommended standard and the number 232 specifies
the latest version.
 The RS232 is a communication cable, generally used to transfer and receive
the serial data between two devices
 In RS232, a 1 is represented by -3 ~ -25 V, while a 0 bit is +3 ~ +25 V.
 The most of the serial cable connectors are DB-9 (9-pin connector) and B-25
(25-pin connector). These cables may be male or female type.
 Nowadays, most of the PCs use DB9 cable for the exchange of asynchronous
data.
 RS232 describes the signals connecting between a data terminal equipment
(DTE) that refers to terminal and computers that send and receive data and a
data circuit terminating equipment (DCE) that refers to communication
equipment.
 DTE is a computer terminal and DCE is a modem.

DEpt of E&TC, RSCOE 14


RS232 DB9

DEpt of E&TC, RSCOE 15


Continued
 DTR (data terminal ready) - When terminal is turned on, it sends out signal DTR to indicate that
it is ready for communication

 DSR (data set ready)-When DCE is turned on and has gone through the self-test, it asserts
DSR to indicate that it is ready to communicate

 RTS (request to send) - When the DTE device has byte to transmit, it assert RTS to signal the
modem that it has a byte of data to transmit

 CTS (clear to send) - When the modem has room for storing the data it is to receive, it sends
out signal CTS to DTE to indicate that it can receive the data now
 DCD (data carrier detect)- The modem asserts signal DCD to inform the DTE that a valid
carrier has been detected and that contact between it and the other modem is established
 RI (ring indicator)- An output from the modem and an input to a PC indicates that the telephone
is ringing. It goes on and off in synchronous with the ringing sound.
 RS232 is not TTL logic compatible, so require line driver. A line driver such as the MAX232
chip is required to convert RS232 voltage levels to TTL levels, and vice versa.
 https://www.youtube.com/watch?v=XVEnxipCIJ0
DEpt of E&TC, RSCOE 16
RS232 communication

DEpt of E&TC, RSCOE 17


RS232 interfacing to MC using
MAX232
Continued

DEpt of E&TC, RSCOE 18


Continued
 MAX232 also called as line driver or voltage converter, uses +5V power supply which is
same as the controller or modem.
 The IC MAX232 comprises of a transmitter – receiver arrangement so that two serial
ports can be connected using the IC.
 5 Capacitors each of 1 microFarad are used to generate the necessary RS232 voltage
from the TTL/CMOS voltage.
 The transmitter section converts the TTL level to RS232 level, and the receiver section
receives the input of the RS232 and converts them to TTL level.
 Basically, it is a 16-pin IC where the transmitter pins are connected to the microcontroller
and the input of the transmitter pin gets TTL i/p from the microcontroller and the o/p of the
transmitter pin supply o/p to the RS232 port.
 The receiver pins attach to the RS 232 port such that the receiver’s i/p receives RS232
input from the personal computer port and the o/p receiver pin supplies the TTL i/p to the
microcontroller.
 So, the transmitter receives I/p from the microcontroller and gives o/p to the RS232 port
while the receiver takes i/p from the RS232 port and gives o/p to the microcontroller.

DEpt of E&TC, RSCOE 19


RS485
 One of the main problems with RS232 is the lack of immunity for noise on the signal
lines.
 Noise is easily picked up and limits both the maximum distance and communication
speed.
 The RS485 standard is used when high speed serial data communications of 10
Mbps is needed.
 RS485 is able to provide a headline data rate of 10 Mbps at distances up to 50 feet,
but distances can be extended to 4000 feet with a lower speed of 100 kbps.
 RS485 proved to be a robust standard and able to provide reliable data
communications over extended distances.
 RS485 proved to be a robust standard and able to provide reliable data
communications over extended distances.
 RS-485 allows multiple devices (up to 32) to communicate at half-duplex on a single
pair of wires, plus a ground wire
 Using RS-485, it is possible to construct a multi-point data communications network.

DEpt of E&TC, RSCOE 20


Continued
 The standard specifies that up to 32 drivers or transmitters along with 32 receivers
can be used on a system. This means that there can be 32 nodes capable to both
transmit and receive.
 RS485 is the only of the interfaces capable of internetworking multiple transmitters
and receivers in the same network.
 When using the default RS485 receivers with an input resistance of 12 kΩ it is
possible to connect 32 devices to the network.
 RS485 repeaters are also available which make it possible to increase the number
of nodes to several thousands, spanning multiple kilometers.
 In most higher level protocols, one of the nodes is defined as a master which sends
queries or commands over the RS485 bus.
 All other nodes receive these data. Depending of the information in the sent data,
zero or more nodes on the line respond to the master.
 In this situation, bandwidth can be used for almost 100%. There are other
implementations of RS485 networks where every node can start a data session on
its own.
DEpt of E&TC, RSCOE 21
I2C Protocol
 Philips developed Inter-IC bus, or I2C, in the 1980s.
 I2C is a low-bandwidth, short distance protocol for on board communications. All
devices are connected through two wires: serial data (SDA) and serial clock (SCL).
 Used for moving data simply and quickly from one device to another,
 Serial Interface of only two signals serial data (SDA) and serial clock (SCL).
 Bidirectional i.e., Data is sent either direction on the serial data line (SDA) by the master
or slave..
 I2C is a Synchronous protocol. The data is clocked along with a clock signal(SCL). The
clock signal controls when data is changed and when it should be read.
 I2C is a Master-Slave protocol. The Master device controls the clock (SCL).The
slave devices may hold the clock low to prevent data transfer. No data is
transferred unless a clock signal is present. All slaves are controlled by the
master clock.
https://www.youtube.com/watch?v=6IAkYpmA1DQ
https://www.youtube.com/watch?v=Mx-srugCZgg
Continued
 It supports multiple data speeds:
 standard (100 kbps), fast (400 kbps), high speed (3.4 Mbps) communications.
The bus has two roles for nodes: master and slave:
 Master node – node that generates the clock and initiates communication with
slaves.
 Slave node – node that receives the clock and responds when addressed by the
master.
 The bus is a multi-master bus, which means that any number of master nodes
can be present.
Working of I2C
I2C has a master/slave protocol. The master initiates the communication. The sequence of
events are
The Master device issues a start condition. This condition informs all the slave devices to
listen on the serial data line for instructions.
 The Master device sends the address of the target slave device and a read/write flag.
The Slave device with the matching address responds with an acknowledgement signal.
Communication proceeds between the Master and the Slave on the data bus. Both the
master and slave can receive or transmit data depending on whether the communication is a
read or write.
The transmitter sends 8- bits of data to the receiver which replies with a 1-bit
acknowledgment
When the communication is complete, the master issues a stop condition indicating that
everything is done
I2C Protocol
 The master is initially in master transmit mode by sending a START followed by
the 7-bit address of the slave it wishes to communicate with
 This is finally followed by a single bit representing whether it wishes to write (0)
to or read (1) from the slave.
 If the slave exists on the bus then it will respond with an ACK bit (active low for
acknowledged) for that address.
 The master then continues in either transmit or receive mode(according to the
read/write bit it sent), and the slave continues in the complementary mode
(receive or transmit, respectively).
 The address and the data bytes are sent most significant bit first.
 The master terminates a message with a STOP condition if this is the end of
the transaction or it may send another START condition to retain control of the
bus for another message.
Continued
 If the master wishes to write to the slave, then it repeatedly sends a byte with
the slave sending an ACK bit. (In this situation, the master is in master transmit
mode, and the slave is in slave receive mode.)
 If the master wishes to read from the slave, then it repeatedly receives a byte
from the slave, the master sending an ACK bit after every byte except the last
one. (In this situation, the master is in master receive mode, and the slave is in
slave transmit mode.)
 An I²C transaction may consist of multiple messages.
Timing diagram
 Data transfer is initiated with a start bit (S) signaled by SDA being pulled low while SCL
stays high.
 SCL is pulled low, and SDA sets the first data bit level while keeping SCL low
 The data are sampled (received) when SCL rises for the first bit (B1). For a bit to be valid,
SDA must not change between a rising edge of SCL and the subsequent falling edge
 This process repeats, SDA transitioning while SCL is low, and the data being read while
SCL is high (B2, ...Bn).
 The final bit is followed by a clock pulse, during which SDA is pulled low in preparation for
the stop bit.
 A stop bit (P) is signaled when SCL rises, followed by SDA rising.
Serial Peripheral Interface(SPI)
Protocol
The Serial Peripheral Interface bus (SPI) is synchronous serial communication
interface specification used for short distance communication
 SPI devices communicate in full duplex mode using a master-slave architecture with
a single master and with one or more slave devices.
 The master device originates the frame for reading and writing. Multiple slave
devices are supported through selection with individual slave select (SS) lines.
 One unique feature of SPI is that data can be transferred without interruption.
 Any number of bits can be sent or received in a continuous stream.
 In SPI, only one side generates the clock signal. The side that generates
the clock is called the “master”, and the other side is called the “slave”.
 The master is the controlling device (usually a microcontroller), while the slave
(usually a sensor, display, or memory chip) takes instruction from the master.
Continued
 The SPI bus specifies four logic signals:
 SCLK: Serial Clock (output from master).
 The clock signal synchronizes the output of data bits from the master
 One bit of data is transferred in each clock cycle, so the speed of data transfer is
determined by the frequency of the clock signal.
 MOSI: Master Output Slave Input (data output from master).
 MISO: Master Input Slave Output, or Master In SlaveOut (data output from
slave).
 SS: Slave Select (often active low, output from master).
 The master can choose which slave it wants to communicate to by setting the slave’s
CS/SS line to a low voltage level.
https://www.youtube.com/watch?v=qyHaiDMf7p4
The Protocol
 To begin communication, the bus master configures the clock, using a frequency
supported by the slave device, typically up to a few MHz.
 The master then selects the slave device with a logic level 0 on the select line.
 If a waiting period is required, such as for an analog to- digital conversion, the
master must wait for at least that period of time before issuing clock cycles.
 During each SPI clock cycle, a full duplex data transmission occurs.
 The master sends a bit on the MOSI line and the slave reads it, while the slave
sends a bit on the MISO line and the master reads it.
Summary
1. The master outputs the clock signal
Continued

2. The master switches the SS/CS pin to a low voltage state, which activates the slave:

3. The master sends the data one bit at a time to the slave along the MOSI line. The slave
reads the bits as they are received

4. If a response is needed, the slave returns data one bit at a time to the master along the
MISO line. The master reads the bits as they are received
Data transmission in SPI
 Transmissions normally involve two shift registers of some given word size ( may be
8 bits), one in the master and one in the slave
 They are connected in a virtual ring topology.
 Data is usually shifted out with the most-significant bit first. On the clock edge, both
master and slave shift out a bit and output it on the transmission line to the
counterpart.
 On the next clock edge, at each receiver the bit is sampled from the transmission
line and set as a new least-significant bit of the shift register.
 After the register bits have been shifted out and in, the master and slave have
exchanged register values.
 If more data needs to be exchanged, the shift registers are reloaded and the
process repeats.
 Transmission may continue for any number of clock cycles.
 When complete, the master stops toggling the clock signal, and typically deselects
the slave.
Continued
Digital Storage Oscilloscope
 The digital storage oscilloscope is an instrument which gives the storage of a
digital waveform or the digital copy of the waveform. It allows us to store the
signal or the waveform in the digital format, and in the digital memory also it
allows us to do the digital signal processing techniques over that signal.
 The maximum frequency measured on the digital signal oscilloscope depends
upon two things they are: sampling rate of the scope and the nature of the
converter.
Applications
 It is used in audio and video recording.
 It is used in radio broadcasting for signal testing.
 In circuit debugging, it is used for testing of the voltage of the signal.
DSO
Working of DSO
 Initially digital storage oscilloscope digitizes the analog input signal, then the
analog input signal is amplified by amplifier if it has any weak signal.
 After amplification, the signal is digitized by the digitizer and that digitized signal
stores in memory.
 The analyzer circuit process the digital signal after that the waveform is
reconstructed (again the digital signal is converted into an analog form) and
then that signal is applied to vertical plates of the cathode ray tube (CRT).
 The cathode ray tube has two inputs they are vertical input and horizontal input.
The vertical input signal is the ‘Y’ axis and the horizontal input signal is the ‘X’
axis.
 The time base circuit is triggered by the trigger and clock input signal, so it is
going to generate the time base signal which is a ramp signal.
 Then the ramp signal is amplified by the horizontal amplifier, and this horizontal
amplifier will provide input to the horizontal plate. On the CRT screen, we will
get the waveform of the input signal versus time.
Continued
 The digitizing occurs by taking a sample of the input waveform at periodic
intervals. At the periodic time interval means, when half of the time cycle is
completed then we are taking the samples of the signal.
 The process of digitizing or sampling should follow the sampling theorem.
The sampling theorem says that the rate at which the samples are taken should
be greater than twice the highest frequency present in the input signal.
 When the analog signal is not properly converted into digital then there occurs
an aliasing effect.
 When the analog signal is properly converted into digital then the resolution of
the A/D converter will be decreased.
 When the input signals stored in analog store registers can be read out at a
much slower rate by the A/D converter, then the digital output of the A/D
converter stored in the digital store, and it allows operation up to 100 mega
samples per second.
 This is the working principle of a digital storage oscilloscope.
Comparison of DSO and CRO
Conventional Storage Oscilloscope
S.NO Digital Storage Oscilloscope

The digital storage oscilloscope collects data After triggering only, the conventional
1 always storage oscilloscope collects data

2 The cost of the tube is cheap The cost of the tube is costlier

For higher frequency signals the DSO produce For higher frequency signals the ASO
3 bright images cannot produce bright images

The resolution is higher in digital storage The resolution is lower in conventional


4 oscilloscope storage oscilloscope

5 In DSO an operating speed is less In ASO an operating speed is less


Logic Analyzer
 Logic analyzers are test instruments that are widely used for testing complex digital or logic circuits.
 These include digital hardware debugging, design verification, and embedded software debugging.
 A logic analyzer solely measures digital, not analog signals! It can capture many digital signals
simultaneously and display their often complex timing relationship to one another.
 Provide a time display of logic states: Logic analyzers possess a horizontal time axis and a vertical
axis to indicate a logic high or low states. In this way a picture of the digital lines can be easily
displayed.
 Displays logic states: The vertical display on the analyzer displays the logic state as a high of low
state. The signals enter the various channels and are converted into a high or low state for further
processing within the analyzer. It provides a logic timing diagram of the various lines being monitored.
Operation
There are four steps to using a logic analyzer:
 Probe (connect to the SUT)
 Setup (clock mode and triggering)
 Acquire
 Analyze and display
Block Diagram of Logic Analyzer
Software development tools
Software development tools are basically computer programs, and they usually run on
personal computers, helping the programmer (or system developer) to create and/or
modify or test applications programs.
Some of the commonly used software development tools are the following:
Text editors
Assemblers/compilers
Simulators
1.13.1. Assemblers:
The function of an assembler is to convert a code written in assembly language into
machine language.
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.
Assemblers generate executable code from assembly language programs. The
generated code is usually loaded into the flash program memory of the target
microcontroller.
Software development tools
Debugging is a methodical process to find and reduce the number of bugs in a computer
program or a piece of electronic hardware, so that it works as expected.
Debugging is difficult when subsystems are tightly coupled, because a small change in one
subsystem can create bugs in another.
The debugging tools used in embedded systems differ greatly in terms of their development
time and debugging features.
Emulators
An emulator is a hardware kit or a software program or can be both which emulates the
functions of one computer system (the guest) in another computer system (the host), different
from the first one, so that the emulated behavior closely resembles the behavior of the real
system (the guest).
Emulation refers to the ability of a computer program in an electronic device to emulate
(imitate) another program or device.
Emulation focuses on recreating an original computer environment. Emulators have the
ability to maintain a closer connection to the authenticity of the digital object.
An emulator helps the user to work on any kind of application or operating system on a
platform in a similar way as the software runs as in its original environment.
https://www.youtube.com/watch?v=fhd0z5DIQRU
Software development tools
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.
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.
Software development tools
Compilers
A compiler is a computer program (or a set of programs) that transforms the source
code written in a programming language (the source language) into another computer
language (normally binary format).
The most common reason for conversion is to create an executable program.
The name "compiler" is primarily used for programs that translate the source code
from a high-level programming language to a low-level language (e.g., assembly
language or machine code).
Debugger
A debugger is a tool used to debug your code. It is important to test whether the code
you have written is free from errors or not. So, a debugger is used for this testing.
Debugger goes through the whole code and tests it for errors and bugs.
It tests your code for different types of errors for example a run time error or a syntax
error and notifies you wherever it occurs.
The line number or location of error is shown by debugger so you can go ahead and
rectify it.
Software development tools
Integrated development Environment
An Integrated Development Environment is software that contains all
the necessary tools required for embedded software development.
So it is very helpful to have software that can provide all of the
necessary tools from writing to testing of your code, in one package.
An IDE normally consists of a code editor, compiler and a debugger. An
Integrated Development Environment also provides a user interface.
An example of integrated development environment is Microsoft visual
studio. It is used for developing computer programs and supports
different programming languages.
Example: Keil, Eclipse
IDE

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy