ystoyanov

/Yasen Stoyanov

About Yasen Stoyanov

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

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 [...]

By |2019-05-18T23:06:39+03:00December 2nd, 2018|Categories: Digital Logic|Tags: |0 Comments

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 [...]

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

Memory Types Used in Embedded Systems

Hardware memory is used for storing information. In the case of embedded systems that may be the program data ,the program code itself, event logging etc. There are many types of technologies used when creating memory cells and many ways to categorize them, but we can distinguish two major categories based on the memory reaction [...]

By |2019-05-18T23:09:39+03:00November 15th, 2017|Categories: Embedded Systems|Tags: |1 Comment

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 [...]

By |2019-05-18T23:16:07+03:00September 24th, 2017|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 [...]

By |2019-05-18T23:18:47+03:00July 3rd, 2017|Categories: Embedded Systems|Tags: |0 Comments

Build Stages of Embedded C Programs

We can generally define three levels of abstraction from the underlying hardware when we develop embedded programs: Machine Code  Assembly Language  High Level Language Machine code is the native language of the microprocessors (but it is not used for directly writing programs). So no matter at what level of abstraction we decide to write our [...]

By |2019-05-18T23:16:23+03:00June 18th, 2017|Categories: Embedded Systems|Tags: |0 Comments

Global and Local Variables in Embedded C Programs

There are two main concepts that have to be explained in order for us to fully understand the differences between global and local variables in C programs: Scope  -  determines the region of the program where a variable can be accessed Storage Duration - determines when a variable is created and destroyed (lifetime of the variable) [...]

By |2019-05-18T23:36:48+03:00May 11th, 2017|Categories: Embedded Systems|Tags: |0 Comments

Memory Layout of Embedded C Programs

The memory layout of C programs consists of several segments. The segments accessible to a user program are shown in the figure below:   Fig. 1 C program memory layout Code Segment (.text)   This segment stores the executable program code (the machine instructions). Variables defined with the const type qualifier can also be placed [...]

By |2019-05-18T23:19:36+03:00May 2nd, 2017|Categories: Embedded Systems|Tags: |4 Comments
We use cookies on this site to improve our service, perform analytics and remember website preference. By using the site, you consent to these cookies (Privacy policy). I consent to cookies