circuitprofessor.com

path to learn electronics

Introducing Microprocessors: The Tiny Chips That Power Our Devices (9 steps)

ByDavid E. Olson

Dec 29, 2022
microprocessor

Have you ever cracked one of your electronic toy cars or the remote of your TV ? can you remember There were small black blicks in the circuit? those are the microprocessors.

Actually, Microprocessors are the brains of modern computers, as well as an essential component of many electronic devices.

The microprocessor is a superhero who lives inside our electronic devices. This superhero has many abilities, including the ability to calculate at high speeds and operate multiple tasks at once. That is why I suggest the name “superhero” for microprocessors. These superheroes (microprocessors) are getting better and better. Furthermore, some superheroes (microprocessors) only do specific tasks during their lifetime.

This article will cover everything there is to know about microcontrollers and microprocessors.

  • History of microprocessors: Microprocessor development over time, including key milestones and innovations.
  • The architecture of microprocessors: Microprocessor design and structure, including the elements that make up a microprocessor and how they work together.
  • Types of microprocessors: Microprocessors are classified into three types, central processing units (CPUs), graphics processing units (GPUs), and specialized microprocessors for specific tasks.
  • Microprocessor performance: Clock speed, number of cores, and memory size are all factors that affect microprocessor performance.
  • Applications of microprocessors: Computers, smartphones, tablets, and appliances are examples of devices and systems that use microprocessors.
  • Microprocessor manufacturing: The design and manufacturing of microprocessors, which contains the use of specialized equipment and materials.
  • Advancements in microprocessors: Ongoing microprocessor research and development, such as attempts to enhance performance and efficiency.
  • Microprocessor security: The security measures put in place to protect microprocessors from threats like malware and hacking.
  • Microprocessor market: The global microprocessor market, including trends, demand, and major industry players.

History of microprocessors

let’s see the improvement of the microprocessors (superheroes) according to time.

microprocessors

The development of microprocessors is observable. This timeline also includes parameters such as clock speed, transistor count, and instruction per second. It’s fine if you don’t understand those names. We will discuss all you need to know about microprocessors.

We are now in the fifth generation of microprocessors.

let’s see the advantages of the fifth generation of microprocessors.

  1. increasing the speed
  2. Greater capability for handling multiple tasks
  3. Improved energy efficiency
  4. Enhanced security features
  5. Improved scalability
  6. Better support for virtualization

Get some rough ideas for improvements. We will discuss these topics on a deeper level later.

The architecture of microprocessors

architecture of microprocessors is the main subtopic of this article, and please read it carefully. Let’s now focus on the architecture of microprocessors.

what is that mean? A microprocessor’s architecture is the layout and organization of the various components that make up the microprocessor. then what is the components inside the microprocessors?

  1. ALU (arithmetic and logic unit)
  2. Registers
  3. Bus interface
  4. Control unit

1. ALU (arithmetic and logic unit)

microprocessors

The ALU is the CPU component that handles arithmetic and logic operations. It is broken down into a number of complex logic circuits that perform operations on binary numbers such as addition, subtraction, and multiplication.

2. Registers

Registers are groups of memory cells arranged as a single memory word with 8, 16, or 32 bits. The number of registers varies with the type of microprocessor. They are used to store data during processing temporarily.

usually, registers are drowned like this. learn more about registers.

there are various types of registers in microprocessors.

  • Instruction registers
  • Accumulators
  • Status registers
  • A,B,C,D registers
  • Program counter

The purpose of these registers will be explained better in the following section, such as Microprocessor performance. Don’t be confused by some words in the register introduction.

Instruction registers

The instruction that is currently being executed or decoded is saved.

Accumulators

holds the outcome of the arithmetic and logic units’ operations.

Status registers

designed to contain all of the appropriate 1-bit status flags that change as a result of arithmetic and logic unit operations. For example, if your arithmetic and logic unit operator completed some work (addition, subtraction, etc.), a cell in the status register will be set up and a bit value (1 or 0) will appear in that cell.

A,B,C,D, registers

The A, B, C, and D registers are most likely general-purpose registers that can hold any type of data and be used for a variety of purposes depending on the CPU instructions.

Program counter

A register in a computer processor that contains the current address (location) of the instruction fetch. As each instruction is collected, the program counter adds one to its stored value.

3. Bus interface

External components such as memory and I/O devices are interconnected through a set of signal lines known as buses. The bus interface coordinates the activities associated with data transfer into and out of the microprocessor via these buses.

basically, there are three types of buses in microprocessors.

  1. data bus

2. Address bus

3. control bus

we will talk more about these things in the next sections.

4. Control unit

The microprocessor is controlled by the control unit. A fetch-execute cycle is the CPU’s called the normal operation.

You now understand the fundamental elements of a microprocessor, such as ALU, Register, Bus interface, and Control unit. Then we can talk about the processes and parameters inside the microprocessor.

processes

  • Fetch cycle
  • Execute cycle
  • decode

parameters

  • Transistors
  • Microns
  • Clock speed
  • Data width
  • MIPS

We start with the parameters and then move on to the microprocessor operating principles.

Transistors

The transistor count in each microprocessor is discussed in the History of the Microprocessor section. transistors are the most essential component of a microprocessor. Transistors are used in all calculations, data storage, and other processes. if the transistors count is higher then the speed and accuracy of the microprocessor are higher.

Micrones

Basically, it indicates the width of the smallest wire in the microprocessors.It is defined by the manufacturer’s technology.

Clock speed

The microprocessor’s hertz (Hz) value is clock speed. It is used to determine the speed of the microprocessor’s execution of instructions.

Data width

Can you remember, in the history of the microprocessors section, we discussed the bit values? that bit value is related to this data width. actually, data width means how much data is processed at one time. data bus width size is also an important factor when discussing data width.

MIPS

Millions of instructions per second. This is a rough estimate of microprocessor performance.

This is the relation between MIPS & Clock speed. we can measure the processing speed of one instruction by using this equation.

microprocessor number of clock cycles per one instruction
microprocessors speed of instruction execution

let’s do an example

Have you heard of Arduino? The microcontroller is located on the Arduino Uno board (an extended version of the microprocessor.) Atmega328p.It contains the cristal, which functions as the microcontroller’s heart. The clock pulses are generated by cristal.

Normally, the Arduino UNO board includes a 16M hertz crystal. 1 MIPS value. then let’s calculate the speed of instruction execution.

No of clock cycles per one instruction = 16 M Hz/ 1 M

= 16

Speed of the instruction execution = 16 * [1/16 *10^(6)]s

= 0.000 001 S

Here is a code in ASSEMBLY that will automatically calculate the execution time of your microprocessors. Simply upload and run it.

visit – Assembly basic programming

NOTE : in some microprocessors may occur some errors

; Set up timer 1 to count the number of clock cycles
ldi r16, 0x84 ; TCCR1B: CS10 = 1 (no prescaler)
sts TCCR1B, r16

; Start timer 1
ldi r16, 0x01 ; TCCR1A: WGM10 = 1 (CTC mode)
sts TCCR1A, r16
ldi r16, 0x00 ; TCNT1: Initialize timer 1 to 0
sts TCNT1, r16
ldi r16, 0xFF ; OCR1A: Set the compare value to the maximum timer value
sts OCR1A, r16

; Wait for timer 1 to reach the compare value
wait_loop:
  lds r16, TCNT1
  cpi r16, 0xFF
  breq wait_loop

; Stop timer 1
ldi r16, 0x00 ; TCCR1B: CS10 = 0 (stop timer)
sts TCCR1B, r16

; Calculate the execution time in seconds
mov r1, #0xFF ; Timer 1 maximum value
mov r2, #1000000 ; Clock frequency in Hz
div r1, r1, r2

; Print the execution time to the serial monitor
push {r1}
mov r0, #1 ; File descriptor for the serial monitor
mov r1, #4 ; Number of bytes to write
mov r2, sp ; Pointer to the execution time
mov r7, #4 ; SYS_WRITE system call number
swi 0 ; Invoke the system call
pop {r1}

; Print "Done!" to the serial monitor
mov r0, #1 ; File descriptor for the serial monitor
mov r1, #5 ; Number of bytes to write
mov r2, #"Done!" ; Pointer to the message
mov r7, #4 ; SYS_WRITE system call number
swi 0 ; Invoke the system call

then let’s move to some processes inside the microprocessor

Inside microprocessors, fetch, decode, and execution are all sequential processes.

Fetch cycle

Fetch reads instructions from memory In general.

The CPU initially places the address of the instruction to be executed on the address bus. The address information comes from the control unit’s program counter (PC) and program counter.

The control bus then stores the information needed to read the memory location.

The data bus takes the instruction from memory to the instruction register.

execute cycle

This is the cycle of handling actions based on recorded instructions.

This process includes transmitting the necessary data as well as doing the required logical and arithmetic operations.

Finally, the final output is given to memory, I/O devices, or registers.

decode

Actually decode is the intermediate process between fetch and execute.

Decoding is sometimes a subprocess of the executing cycle.

When the fetch cycle is finished, some data is saved in the accumulator. So, how does the microprocessor understand that data/instruction?

That process of understanding is known as decoding.

fetch-execute cycle

this is a combination of fetch, decode and execute.

  • first program counter and control unit gives the address value of the instruction memory.
  • then control carries out that address and then triggers the instruction memory location
  • then takes the data of that location using the data bus.
  • and store the values in the instruction register.

(end the fetch cycle)

  • then that stored instruction is decoded.

(end of the decoding)

  • The decoded instruction is then executed.
  • Many processes occur during the execution cycle: data is transmitted, data is received, and some arithmetic and logic operations are performed.
  • Normally, the program counter is incremented after each fetch-execute cycle.

(end of the execution cycle)

ok! now we have some knowledge about microprocessors. actually, we covered the main 2 subtopics above mentioned. History of microprocessors and architecture of the microprocessors.

and we get some knowledge about Microprocessor performance like clock speed…etc. let’s collect the key points which are related to the above 2 topics. then we can move to the next topic.

Key points

  • we are in the fifth generation of the age of the microprocessor
  • ALU, registers, busses and control units are the main elements in the microprocessor.
  • There are various types of registers inside the processor.
  • Data, control and address bus are the main buses.
  • Fetch, Decode and Execute are the main cycle.

Leave a Reply

Your email address will not be published. Required fields are marked *