What is a Microcontroller?
A microcontroller is a self-contained system with peripherals, memory and a processor that can be used as an embedded system. Most programmable microcontrollers that are used today are embedded in other consumer products or machinery including phones, peripherals, automobiles and household appliances for computer systems. Due to that, another name for a microcontroller is "embedded controller." Some embedded systems are more sophisticated, while others have minimal requirements for memory and programming length and a low software complexity. Input and output devices include solenoids, LCD displays, relays, switches and sensors for data like humidity, temperature or light level, amongst others.
Assignment:
Individual
-Read a microcontroller datasheet
-Program your board to do something
-With as many different programming languages
-And programming environments as possible
Group
-Compare the performance and development workflows for other architectures
Software :
-Eagle
-Mods
-Arduino
Materials :
-FR1 Boards
-Datasheets
Accomplised
-Understood what to look for in a datasheet
-Learned how to program a board
- Learned a couple of ways to communicate with the board
Datasheet
A datasheet, data sheet, or spec sheet is a document that summarizes the performance and other technical characteristics of a product, machine, component (e.g., an electronic component), material, a subsystem (e.g., a power supply) or software in sufficient detail to be used by a design engineer to integrate the component into a system. Typically, a datasheet is created by the component/subsystem/software manufacturer and begins with an introductory page describing the rest of the document, followed by listings of specific characteristics, with further information on the connectivity of the devices. In cases where there is relevant source code to include, it is usually attached near the end of the document or separated into another file.
Where to find a datasheet?
Every manufacturer while producing an MCU will definitely print a datasheet as well. It's like a manual. Datasheet can be found on the manufacturer's website or even by simply googling the name of the MCU.
I went through several website trying to figure out how to read a datasheet. There are so many abbreviations and technical terms that couldn't comprehend. I wouldn't say I understood all of them but I figured out a simple way to use the datasheet.
The most logical way is to question what the processor is going to be used for and in what environment it is going to be used in. This would give a brief idea whats in the datasheet.
So the questions that I've come up with to understand the datasheet are these:
-What does this MCU have?
-What is it made of?
-What & How do I connect my devices?
-What conditions should I use them in?
-How can I use it in my design of PCB?
Answering these simple question will give a basic idea of whats in the datasheet. The datasheet I'm going to explore can be downloaded from HERE
Its Attiny family MCU from Atmel
What does this MCU have?
The Features on the first page of the datasheet is the answer to this question.
This page explains what type of processor it is, what its architecture, the memory information on it, peripheral features, some special features that it may have, I/O and packages. When you go through this, you get a basic idea of the processor and if it will or will not suit your needs.
What is it made of?
Now we know what the processor packs, but its also necessary to understand how they are packed.
This block diagram provides a schematic idea of how the processor works. It gives a brief idea of how the information gets in - processed - get's out of the processor. This is essential because it gives the user an idea of how the processor is going to behave with the given information. Now in the diagram as shown, ADC is connected to PORT-A, ISP interfaces are to PORT B. This can also be understood by looking at the pinout, but this is for in-depth understanding
What & How do I connect my devices?
A circuit may have various components in them and some may interact with the MCU and some won't. The interacting devices are also of vast types like input or output devices, clock, sensors (digital and analog) etc. In an MCU each pin is specified a certain task and they have to be connected accordingly. To help understand this the manufacturer provides the user with this pin configuration.
What conditions should I use them in?
This is an important question. If the processor is not used in the way they are meant to, it would lead to the frying of the processor or connected device, malfunction etc. To avoid all this from happening the manufactures provide the user with information on how to use the processor optimally. The following are some of the factors to be considered.
Memory
This section describes the different memories in the Atmel® ATtiny24/44/84. The AVR® architecture has two main memory
spaces, the data memory space, and the program memory space. In addition, the Atmel ATtiny24/44/84 features an
EEPROM memory for data storage. All three memory spaces are linear and regular.
This section deals with topic s like the programmable memory available, then the data memory access times, how to erase/write memory.
Power
This is a very important parameter. Less power leads to malfunction of the processor and high power may result in frying od the chip. The manufacturers provide the optimum power that's required. There is even table showing the maximum that it can take and the optimum level that required.
Registry summary
This provides with information on how the data is distributed within the processor. Registers are the data holding spaces where micro-controller holds the specific data. These registers can or can't be read or written with the content. Few registers hold the status of the device, some of them holds the configuration of the device.
Clock
Most of the processors these days come with inbuilt clock. This section in the data sheet provides all the information on the clock cycles of the CPU clock, I/O clock, Flash Clock etc.
How can I use it in my design of PCB?
There are several types of MCU depending upon how they are packed. Here are a few types
Thin Shrink Small Outline Package (TSSOP)
These are some of the basic information that is provided in the datasheet. One needs to study the datasheet before designing the PCB for that MCU.
Programming
To program, I designed a new board with LDR(Light Dependant Resistor) as a switch and connected it to an RGB led with Attiny 45 as my processor. You can check out this page to see how I designed.
The assignment was to compare the architecture of different micro processors. This went as more like a discussion in the group. Out of 4 we split into two where each one read about Harvard Architecture and while the other read about Von-Neumann architecture.
I read about Harvard architecture, and that is what is used in almost all devices today. Harvard is better than Von-Neumann as it can carry out multiple functions at the same time and need not wait for a set of instructions to be complete to start with a new one. All our modern gadgets are based on this. It can read instructions, perform memory access simultaneously thus increasing the performance and speed of the system.
Additionally we took up responsibility to document different weeks in the group website. It was my responsibility this time to document the website.
Conclusion
As I said, in the beginning, I did not understand half of what was being discussed during the lectures. All the terminologies were new and did not really understand what was happening, but as it turns out this week was very informative and thanks to Electronic design week I was able to quickly grasp the information in the datasheet. The week was quite informative and I think I'm still at just at the threshold of electronics.