fbpx

What are microprocessors and how have they changed?

The first thing to understand is that a microprocessor by itself is useless. It can’t do anything without other components such as memory, communications, port controllers, display drivers, etc. All these are integrated circuits. There’re called integrated circuits, or ICs, because all the transistors are bundled together on a single piece of silicon that’s packaged inside a piece of plastic with connections exposed so it can connect with other ICs. The ICs are also sometimes called chips.

Computers sometimes refer to a central processing unit or CPU. Think of a microprocessor as a CPU on a single integrated circuit. It still acts as the brains of the device and it coordinates the activities of all the other ICs.

Probably the most critical component that a microprocessor relies on, other than a good supply of power anyway, is the clock. You’ve heard about computers running at some gigahertz speed or another. This is the clock speed. Computers didn’t always run this fast.

Listen to the full episode for more information about clocks and how the microprocessor can read and write information from memory. Or you can also read the full transcript below.

Transcript

I’ve explained some of this in episodes 3 and 4 so make sure to listen to them for more information. This episode will help you understand the microprocessor from an electronic angle. The recent electronics episodes will also help.

The first thing to understand is that a microprocessor by itself is useless. It can’t do anything without other components such as memory, communications, port controllers, display drivers, etc. All these are integrated circuits. There’re called integrated circuits, or ICs, because all the transistors are bundled together on a single piece of silicon that’s packaged inside a piece of plastic with connections exposed so it can connect with other ICs. The ICs are also sometimes called chips.

I’ll explain transistors in another episode. I wanted to bring the focus back to programming for this episode so you don’t feel like this podcast has lost its direction. This is a programming podcast and learning about electronics will help you become a better programmer.

Microprocessors used to have about 2 thousand transistors in the 1970’s and it’s gone up dramatically since then. The more transistors a processor has, the more it can do. Your smart phone has a microprocessor and it probably has 2 to 3 billion transistors. A high end graphics card also has a graphical processor and today might have as many as 15 billion transistors.

Computers sometimes refer to a central processing unit or CPU. Think of a microprocessor as a CPU on a single integrated circuit. It still acts as the brains of the device and it coordinates the activities of all the other ICs.

Probably the most critical component that a microprocessor relies on, other than a good supply of power anyway, is the clock. You’ve heard about computers running at some gigahertz speed. This is the clock speed. Computers didn’t always run this fast.

The original IBM personal computers had a clock of 4 megahertz. And they had a turbo button that could increase the speed to 8 megahertz. A modern computer will likely have a clock speed of 2 to 3 gigahertz.

A clock signal is nothing more than a voltage that goes from zero volts to whatever high voltage level your system is using and then back to zero volts, and then back to high. It does this very fast and regularly. The key to a good clean clock signal is that it should be regular. In other words, it shouldn’t remain high for some period of time and then low for a different period of time. And when it goes high again, it should remain high for the same length of time.

Each time the clock signal goes high and then low and back to the same spot is called a cycle. And counting how many times each second it does this is the frequency which is measured in hertz. So a clock signal running at 4 megahertz has 4 million cycles per second while a clock running at 2 gigahertz has 2 billion cycles per second.

It gets harder and harder to increase clock frequencies and make devices smaller. That’s because these changing voltages travel along thin wires spaced close together. The wires start acting like capacitors and coils that introduce stray capacitance and stray inductance. I know I haven’t explained coils or inductance and this podcast probably won’t be the place. These stray effects are part of the reason why the speed of computers has stopped increasing so much and instead processors are being made with more cores. Each core is another processor.

The days of enjoying faster running applications by just buying a faster computer are coming to an end. That’s not to say there won’t be some breakthrough that allows the speed to start increasing again. But for now anyway, if you want your application to run faster, you need to know how to take advantage of multiple cores. And that means multithreading. Listen to episodes 92 through 106 for more information about multithreading.

Of the connections or pins exposed by a microprocessor, you can group them into three main categories. There can be other connections for different purposes. But for now, I’m going to explain addresses, data, and control. These connections are also called lines. And when grouped together they’re called a bus. So you have an address bus composed of individual address lines, a data bus composed of data lines, and a control bus composed of control lines. I’ve always thought of the clock as being part of the control bus.

The clock not only provides timing for actions happening inside the microprocessor but makes sure that each component in the computer is synchronized to the same steps. I’ll go into more detail in a future episode but the general idea is this.

The processor uses the control lines to specify that a valid memory address has been place onto the address bus and whether it wants to read or write information at that address. Another IC holding memory will respond to that request. If the processor wants to read data, then it waits for the memory chip to retrieve the value from inside itself and place the data on the data bus. And if the processor wants to write data, then it will place the data to be written on the data bus. The address bus is always used by the processor to let other chips know what address is being referred to. The processor is in control of the address bus lines. The data bus though is sometimes controlled by the processor when writing data and at other times controlled by other chips such as a memory chip when reading data.

Depending on your processor, there could be anywhere from 16 to 50 or more address lines. And the number of data lines will match the size of data your processor works with. So if you have a 64 bit processor, then there will be 64 data lines.

The earlier episodes describe how the processor interprets some data as instructions and some data as just data. But now, you know a little more about how this is done.