Embedded programming
Assignment 
Read a microcontroller data sheet.

Program your board to do something, with as many different programming languages and programming environments as possible.

Extra credit: experiment with other architectures
Data Sheet

This week’s assignment is to first read a microcontroller data sheet. The microcontroller I use on the hello echo board is an Attiny85 from Atmel. The datasheet can be download from: 

http://www.atmel.com/images/atmel-2586-avr-8-bit-microcontroller-attiny25-attiny45-attiny85_datasheet.pdf 

This a 234 page pdf document, so first time reading to understand such a lengthy document can be quite daunting. There is a shorter, 30 page datasheet-summary which is a good place to start, it can be downloaded from: 

http://www.atmel.com/Images/Atmel-2586-AVR-8-bit-Microcontroller-ATtiny25-ATtiny45-ATtiny85_Datasheet-Summary.pdf 

The most important picture in the data sheet is the Block Diagram which basically tell you what the microcontroller is about, and the most important part of the block diagram is the number of Input/Output pin available. This directly decides whether this particular microcontroller is suitable for the intended purpose.  

 My application basically requires the following: 
1. An output pin for a LED. 
2. An input pin for a push button. 
3. A output pin as Transmitting pin. 
4. A input pin as receiving pin. 

 All microcontroller also incurs the following operating overheads. 
1. A Vcc power input pin. 
2. A ground pin. 
3. 2 pins for external clock. 

 Since I am not using external clock. I only needs the following: 
An output pin for a LED. 
An input pin for a push button. 
A output pin as Transmitting pin. 
A input pin as receiving pin. 
A Vcc power input pin 
A ground pin 

 So the Attiny85 is suitable. It should be noted that although it is always convenient to selected a more powerful microcontroller with many more Input/Output pins. It is actually a waste of hardware resources, a no-no in industrial application as it means making the end product unnecessarily expansive and thus less competitive. 

 In reality, there are far more considerations required when selecting a microcontroller. Some of major ones are as follow: 
1. Speed (how fast to complete the task required). 
2. Memory (to run lengthy program). 
3. Power consumption (particular for mobile                            system on battery). 
4. Operating environment. 
5. Other specify features such as: 
      a) Analog to digital conversion. 
      b) Interrupts support. 
      c) Pulse width modulation. 
      d) Timer. 
      e) Counter. 
      f) External interface. 
 
On the commercial aspect. Consideration on availability is important and cost/features. 
More consideration if the microcontroller is going to be used in rugged environment such as military application.