Embedded programming and something else......

Group Assignment 2022 (Raffaele Alone)



A microcontroller is a complete programmable circuit, capable of executing the orders recorded in its memory. It is composed of several functional blocks that fulfill a specific task. A microcontroller includes within it the three main functional units of a computer: microprocessor, memory, and input/output peripherals.


Some microcontrollers can use four-bit words and run at clock speeds as low as 4 kHz, with low power consumption (mW or microwatts). It will usually have the ability to wait for an event such as a button press or other interrupt; thus, power consumption during idle state (CPU clock and most peripherals) can be as low as nanowatts, making many of them well suited for long battery life applications.

When the microcontroller is manufactured, it contains no data in ROM. In order to control some process, it is necessary to generate or create and then record in the EEPROM or equivalent of the microcontroller some program, which can be written in assembly language or another language for microcontrollers; however, for the program to be recorded in the memory of the microcontroller, it must be encoded in the hexadecimal numerical system, which is ultimately the system that makes the microcontroller work when it is supplied with the appropriate voltage and associated with analog and discrete devices for its functioning.


Images/week8/PlatformIO.png

The microprocessor is the electronic circuit that processes the energy necessary for the electronic device in which it is located to work, executing the commands and programs properly. The Central Processing Unit (CPU) of a computer is an example of a microprocessor.


It is called micro for its English meaning that indicates "small", in relation to the importance of its function in a device, sometimes compared to the brain and the heart of human beings.

This electronic component is responsible for processing and executing instructions encoded in binary numbers.


Images/week8/PlatformIO.png

The microprocessor is commonly known as the Central Processing Unit (CPU) of different electronic devices, but other devices such as hard drives also contain processors.

The function of the microprocessor is so important that it is currently considered the most influential electronic component in human life.

At an economic level, it is the most commercialized product worldwide and, at a social level, it is the most used object, present in a wide variety of electronic devices and components, as well as computers, cell phones, smartphones and tablets.

Today we can distinguish between four types of architectures: CISC architecture (Complex Instruction Set Computer) or execution of a complex instruction, which forms the basis of all x86 or intel-compatible processors, RISC architecture (Reduced Instruction Set Computer) or execution of a limited number of instructions, VLIW (Very Long Instruction Word) architecture, and the closest EPIC (Explicit Parallel Instruction Computing) or fully2013/parallel machine. It should be noted that some products on the market may combine a number of these architecture models.


Historically, the most used models can be summarized as follows.

  • Harvard Architecture
  • Von Neumann architecture
  • Microcontroller
  • RISC
  • SISC

In computational architecture, CISC (from the English Complex Instruction Set Computer, in Spanish Computador con Set de Instruccions Complexes) is a model of computer architecture.


CISC microprocessors have an instruction set that is characterized by being very broad and allowing complex operations between operands located in memory or internal registers, as opposed to the RISC architecture.

It is capable of executing several hundred different complex instructions and is extremely versatile.

Images/week8/PlatformIO.png

This type of architecture makes it difficult to parallelize instructions, so today most high-performance CISC systems implement a system that converts these complex instructions into several simple RISC-type instructions, generally called microinstructions.

CISCs belong to the first stream of processor construction, before the development of RISCs. Examples of them are: Motorola 68000, Zilog Z80 and the entire Intel x86 family, AMD x86-64 used in most current personal computers.

It should be noted, however, that the use of the term CISC began after the appearance of RISC processors as a derogatory nomenclature by the defenders/creators of the latter.

The von Neumann architecture, also known as the von Neumann model or Princeton architecture, is a computer architecture based on that described in 1945 by mathematician and physicist John von Neumann and others in the first draft of an EDVAC report.


It describes a design architecture for an electronic digital computer with parts consisting of a processing unit containing an arithmetic logic unit and processor registers, a control unit containing an instruction register and a program counter, a memory for store both data and instructions, external mass storage, and input/output mechanisms.

The concept has evolved into a stored-program computer in which an instruction fetch and a data operation cannot occur simultaneously, since they share a common bus. This is known as the Von Neumann bottleneck, and it often limits system performance.

Images/week8/PlatformIO.png

The design of a von Neumann architecture is simpler than the more modern Harvard architecture, which is also a stored-program system, but has a dedicated set of addresses and data buses for reading data from and writing data to memory, and another set of addresses and data buses to fetch instructions.

A stored-program digital computer is one that maintains its program instructions, as well as its data, in read-write random access memory (RAM). Stored-program computers represented an advance over the program-controlled computers of the 1940s, such as the Colossus and the ENIAC, which were programmed by setting switches and inserting interconnecting wires to route data and to control signals between computers. various functional units. In the vast majority of modern computers, the same memory is used for both data and program instructions, and the distinction between von Neumann vs. Harvard applies to cache memory architecture, but not to main memory.

In computational architecture, RISC (from the English Reduced Instruction Set Computer) is a type of CPU design generally used in microprocessors or microcontrollers with the following fundamental characteristics:


Images/week8/PlatformIO.png

Fixed-size instructions presented in a reduced number of formats. Only load and store instructions access data memory. In addition, these processors usually have many general purpose registers.

The objective of designing machines with this architecture is to enable segmentation and parallelism in the execution of instructions and to reduce memory accesses. RISC machines are leading the current trend of building microprocessors. PowerPC,2 DEC Alpha, MIPS, ARM, SPARC are examples of some of them.

RISC is a computer CPU design philosophy that favors small, simple instruction sets that take less time to execute. The most commonly used type of processor in desktop computers, x86, is based on CISC rather than RISC, although newer versions translate CISC x86-based instructions to simpler RISC-based instructions for internal use before execution.

The idea was inspired by the fact that many of the features that were included in traditional CPU designs to increase speed were being ignored by the programs running on them. Also, the speed of the processor relative to the computer memory it accessed was getting higher and higher.

This led to the emergence of numerous techniques to reduce processing within the CPU, as well as to reduce the total number of memory accesses. More modern terminology refers to such designs as load-store architectures.

CISC (Complex Instruction Set Computer) technology was born from the hand of Intel, creator in 1971 of the first microchip that would allow the birth of personal computing. More specifically, it would be in 1972 when the 8080 would appear, the first chip capable of processing 8 bits, enough to represent numbers and letters. With the possibility of placing all the circuits on a single chip and the ability to handle numbers and letters, the fourth generation of computers would be born, known as PCs or personal computers.


Images/week8/PlatformIO.png

CISC microprocessors have an instruction set that is characterized by being very broad and allowing complex operations between operands located in memory or internal registers.

This type of architecture makes it difficult to parallelize instructions, so today most high-performance CISC systems implement a system that converts these complex instructions into several simple instructions, generally called microinstructions.

Microprogramming is an important and essential feature of almost all CISC architectures. Microprogramming means that each machine instruction is interpreted by a microprogram located in a memory on the integrated circuit of the processor. Compound instructions are internally decoded and executed with a series of microinstructions stored in internal ROM. This requires several clock cycles, at least one per microinstruction. This is how CISC chips use commands that incorporate a wide variety of small instructions to perform a single operation.

When the operating system or an application requires one of these actions, it sends the processor the name of the command to perform it along with the rest of the additional information that is needed. But each of these CISC ROM commands vary in size and, therefore, the chip must first check how much space the command requires to be executed in order to reserve it in internal memory. In addition, the processor must determine the correct way to load and store the command, both of which slow down system performance.

The processor then sends the requested command to a unit that decodes it into smaller instructions that can be executed by a nanoprocessor, a kind of processor within the processor. And since the instructions are not independent, since they are minor instructions from the decoding of a major instruction, only one instruction can be carried out at a time.

Now I am trying to make another electronic board to serve for my final project. .


Images/week8/PlatformIO.png

The idea is to mount an ESP 32 microprocessor with several outputs so that it can be the brain of my lamp and give instructions to other microcontrollers.