Hi everybody,
This is somewhat a tutorial, so here I wanna present you some information about ATmel's processors, and I will present those two chips that I am using.
Atmel is the company which produce AVR and ARM chips. These are the two CPU types that they are fabricating and each has different architecture but the program can be compiled with AVR Studio for both and as I understood, ARM support C# .NET application which can be coded in Visual C#.
ATmel produces different architecture type of micro controllers like the AVR 8-bit and 32-bit, 8051, AT91 etc.
ARM and AT91 Chips
ARM chips has a better technology and call it a mini computer... I saw somebody running Linux on them etc but I don't know much about them. So abut ARM chips that's all that I can say. They has a so called Q-Touch technology and it needs Q-touch library for the AVR Studio to be able to use these functions.
These chips brings new features and peripherals, and they have low power consumption for battery operation. They are used by mobile phone accessories, industrial control, POS terminals, etc etc
8051 Chips
These are small chips with 14, 16, 20, 28 pins used most in card readers, USB applications etc etc. Nice chips but I never used them.
AVR Chips
-
32 bit
The 32 bit family is built on high performance 32 bit architecture. These chips delivers high speed, low power consumption, low cost, single cycle SRAM etc.
Never used them in robotics, yet, so that's all I know....
- 8/16 bit Xmega
These chips delivers 16 bit performance for a cost of an 8 bit MCU. These has crypto engine, high speed ADC (analog - digital converter) and DAC (digital analog converter) etc. The nice part of them is that they are compatible with Tiny and Mega MCUs. Another nice part is that within Xmega family, it is 100% code compatible with other Xmega controller, so switching between them, they don't need the program to be recoded.
- 8-bit Tiny & Mega
These are my personal favourites. I've started developing with AT Tiny2313.
So for introduction I would say some words about these:
- Tiny
The intro level into robotics it is used ATTiny. You know simple applications, Learns PWM, digital I/O and such simple things. They are cheaps and comes in packages with 8 leads (ATTiny25, 45, 85), up to 20 leads (ATTiny2313, ATTiny2313V).
I forgot to mention that the smallest one has only 6 pins, and its name is ATTiny10.
AT Tiny25 has 2kb of flash, ATTiny 45 has 4kb of flash, etc so the names describes almost everything.
I usually use ATTiny2313 with simple pince, the simple Through hole packages. I got ATTiny2313-20PU. Difference between PI and PU is that PU are PB-free packaging alternative, european ROHS compliant. Thats all.
Difference between 2313 and 2313V... eh, 2313 work with a frequency up to 20 Mhz, 2313V work only at maximum 10Mhz. But the V works from 1.8 up to 5.5V, while the simple 2313 works from 2.7 up to 5.5V. Of course both are industrials so the temperature range of works is -40C and 85C.
They are different packages like the 20P3, 20S, 20M1.
Difference?
20P3 - 20 leads, PDIP (plastic dual inline package)
20S - 20 leads, SOIC (Small Outline Package)
20M1 - 20 pads, 4x4x0.8mm, QFNL (quad flat no-lead).
Some things useful in these MCUs:
- Small package
- Fast and code efficient
- picoPower technology
- High level of integration
- Integrated boost controller
- Communication
It can be used in electronic toys, remote controls, home automation, circuit breakers etc.
I used them in the miniPOV, and a personal project I made for my girlfriends birthday.
- Mega
I am new to them. I use Mega8-16PU, and I used them only in Oldsmobile but soon in TRACAR too.
These are nice chips. They replaces Tinys only when it is really needed. The price is almost triple (at least here) for Mega8 so now I thought that buying two Tiny2313 which communicates via TTL with each other it would be a better solution but As I designed the code for Oldsmobile, I saw that the program in Tiny occupies 400% in the tiny flash, and in mega it uses only 60% by the way... Lets see what these things are really are...
What this have and Tiny has too?
everything...
What this have and Tiny doesn't?
self-programming, 8kb and more of flash, ADC converters (tiny has too but not all), etc.
And for the packages, it comes as Through hole mounts (PDIP), surface mound devices (smd), quad flat no lead, etc.
Thats all about them....
AVR Studio
Oh yeah this is the program you need to write the code and even to program fusebits, flash, eeprom, but programming the chip needs a programmer.
AVR studio is a free program that can be downloaded from their site, and it work with the assembler language. This is a hard language, as called machine language, no that doesn't mean that you need to press 1 and 0 to get the code, this means that you need to use a really basic language, you declare the registers where data is stored, you don't have variables like uint8_t myvariable, you only have data registers like r16, you can not use x + y statement, but you can use r16 ADD r17 etc. It's not so hard but near C this is really hard.
To use the C language you need the so called AVR-GCC or what, ah by the way you need WinAVR installed, this is the compiler, pronounced "whenever", and if you install it you don't need anything else to do, run AVR Studio, select AVR Simulator 1 or 2, select the chip, and write the code. Easy huh?
Of course on the net you can find other compiler like CodeVisionAVR, mikroC for AVR, Bascom AVR etc etc but I used to know AVR Studio cause this is free...
Now that's all about this MCUs, Compilers, etc. Later I'll talk about the programmers ;)
bye,
Hesit8