|Yasen Stoyanov

About Yasen Stoyanov

This author has not yet filled in any details.
So far Yasen Stoyanov has created 34 blog entries.

Memory Addressing Modes

Addressing Mode refers to the way the actual location of an instruction's operand is specified. It is used in the decode phase of the instruction cycle to extract the operand of the instruction so the proceeding execute phase can start. The main purpose of having different addressing modes is to provide flexibility when referencing the memory location of

Microprocessor Instruction Cycle

The microprocessor (also known as Central Processing Unit (CPU)) can be defined simply as a calculation machine. It executes predefined operations called instructions. The steps the CPU performs in order to execute an instruction is called an instruction cycle (also known as fetch-execute cycle or fetch-decode-execute cycle). Understanding the instruction cycle is a great starting point for

Microprocessor Instructions

A microprocessor instruction is a description of an operation that has to be performed on a data. The data is called operand. An instruction may have one or more operands. The microprocessor executes instructions in a process called instruction cycle. Each microprocessor is designed to operate on a specific set of instructions defined in its instruction set

Microprocessor Program Counter

The program counter (PC) is a register that is part of the central processing unit (CPU). It contains the memory address for the next instruction that has to be executed during the instruction cycle of the microprocessor. Principle of Operation Each instruction cycle begins by accessing the instruction stored at the address that is pointed by

Bit Manipulation in C

Writing programs for embedded systems often requires the manipulation of individual bits. Below is a list of the most common operations. In the examples we are performing them on an unsigned long variable called ctrl_reg. Setting a bit We can set a bit using the bitwise OR operator (|): ctrl_reg |= 1UL << n; The

2018-08-17T22:57:56+03:00By |Categories: Explained Simply|0 Comments

Exception Types in Microcontrollers

Exceptions are events that disrupt the normal execution flow of the program. When an exception occurs the processor handles it by usually executing dedicated piece of code called exception handler. Each type of exception can have its own exception handler. In some literature sources exceptions and interrupts are analyzed as two different things. Expeptions being

2019-05-18T23:16:07+03:00By |Categories: Embedded Systems|Tags: |0 Comments

Software and Hardware Breakpoints

A breakpoint is an intentional stopping place during an execution of a program. It is a powerful debugging feature allowing us to suspend the execution of the program at a certain point and examine the current values of variables and memory locations. The program can then be resumed from the exact point it was suspended. Adding or removing breakpoints

2019-05-18T23:18:47+03:00By |Categories: Embedded Systems|Tags: |0 Comments