Microcontrollers for Beginners #3; The First Chapter

No questions to answer this time!

I had an hour last night to begin reading through the book I bought. The first chapter served, as one would expect, as an introduction to the concept of the microcontroller (from now on uC) and gave a basic layout and description of the parts which make up a uC.

Bascially, four parts. You have the Central Processing Unit, Input and Output Devices, Memory and Buses.

The CPU manages the uC. The memory acts as a storage area for instructions and data used by the CPU. Input/Output devices are just that - devices which either give information to the CPU (switches, a mouse, keyboard, etc) and output devices show what the CPU has done (LEDs, LCD screen, etc). Finally buses are the channels, along which the CPU, memory and I/O communicate. Perhaps a better name for them would be roads - but buses it is!



CPU;

This controls the order of instructions, reads the input devices and controls the output devices. A CPU will contain an Arithmetic and Logic Unit (for doing sums and thinking), a control unit (which controls the CPU), internal registers (for temporary storage on data), time-related components and connections to other sections of the uC. As you can guess, the CPU really is the 'manager' of the uC.


Memory;

Memory is used for storing information. It can be divided into two parts - instructions (in your programs), and data (which allows your program to function).

If you wanted a yes/no answer, you'd be using the instruction part. If you needed to add two numbers, you'd need the data to store the numbers and then the instruction section to manipulate the numbers.

I'll briefly talk about something called a cache. This is basically a small section of memory, which helps the CPU to find information in the memory quicker. You tend to have a hirearchy, where the CPU will first scan the cache. If it cannot find it, then it;ll scan the 2nd level cache, and it'll carry on until it finds what it needs - usually in the main memory.

Although you can have faster access to information with a cache, you have the constraint of smaller size of memory for each cache - so use them wisely!


Input and Output devices:

These are also written as I/O, and are very simple to understand. Anything which creates information (either by pressing a key, flipping a switch, or with movement) is an input device. Anything which displays what the CPU wants is the output device - like the monitor you are reading this from!


Buses:

Like memory, you get different types of buses - three, in fact. The address bus, data bus and control bus.

You can probably guess what each one transports! The address bus moves instructions around, the data bus moves data around and the control bus moves commands such as read or write amongst the CPU, memory and I/O devices.

Simples!


Now this is a fairly general description, but it serves us well. It's going to be important to know how everything connects, communicates and works together.

Any more questions, about this post or any previous, send them to me in a pm or as a comment here and I'll do my best to help you! Please let me know what post you are asking about.

Thanks for reading,

Sparky




P.S. I'm going to be away this weekend, so I'm afraid there'll be no update until Monday. Enjoy your weekend!

Blog entry information

Author
Sparky49
Views
805
Comments
1
Last update

More entries in General

More entries from Sparky49

  • Learning Chiptunes
    So I've been learning how to produce chiptunes. You know, the...
  • High or Low?
    This may seem a bit cryptic at the moment, but all will be revealed in...
  • Nothing to see here...
    Sorry guys. :p All will be revealed in a couple of months...
  • Rant
    Okay a little rant.... We have a design exercise to do in uni - it...
  • Here's a thing
    I've been at uni for more than five months now. Not once have I seen...

Share this entry

Top