@ Class 8 – Embedded Programming

Assignements:
- Read a microcontroller data sheet
- Program your board to do something, with as many different programming languages and
- Programming environments as possible

Datasheets

The word Datasheet itself has a super technical feeling. Many around me, not coming from Engineering background, I have seen to be calling it 'manual'. A takeaway for me, when it comes to datasheets is - it has a set of information, scattered around the document, which collectively one might be able to gather together, to build a system. The system becomes a function of how well we understand the datasheet and how well the datasheet was written.

I have also concluded by now, that Datasheets are not to be read at once. It is a long term reading-understanding exercise, which is need based. By that I mean, it will mostly not make sense to keep reading the datasheet from start to end. There might be situations, where one will not read a specific part or parts of a given datahsheet for a long time!

Take aways from reading of a datasheet...

Summary and Full Atmell provides its datasheets is a specific way. There are Summary Datasheets and Full Datasheets. e.g. ATmega48PA has both Summary and Full Datasheets on Atmel's Website.

Atmel maintains a nomenclature for that. The corresponding datasheets for AT90USB162 have been named as 7707s.pdf and doc7707.pdf Note difference - the summary datasheet has a 's' and the full datasheet does not.

While a full datasheet becomes neccessary some or the other point in time, in places like Pabal, where we have a low connectivity, the summary datasheet helps to a great extent, as it downloads quickly and provides a minimal information, so that one can choose the desired Microcontroller, based on features in the Summary Datasheet.
Features, Functionalities and An Indirect Reward I studied the datasheet of AT90USB162, for this assignment. Apart from the main features (such as memory, pin count, interfaces etc) the main feature of this device is its H/W USB interface.

Great thing about datasheets is they are not only the documents telling us what to do with a device and how, but also they are great source of understanding the real time applications of small modules we keep learning all the while. Let me explain this by example -

A PLL (Phase Lock Loop) has a been common subject of discussions all time. AT90USB and other USB based Microcontrollers use PLLs to generate internal 48MHz clock for Full Speed compliance. This was the place when I realised what a PLL is used for!

In continuatuion - The USB Full Speed clock is generated inside the MCU, using a 16 MHz Clock at the maximum! I keep realising that it is not only a tcechnical information that one gets to read. Many ideas about ckt. functionalities and moreover questions like "How this can be implemented" keep coming across when one reads a Datasheet... This seems a good way to learn various implementations.
A few specific Features
Ports for Input and Output functionalities
1) -

a> It is important that each pin of a Port can be used individually and all the pins of the same port can be used all togehter. Atmel MCUs can do this. A scenario could be driving one LED at a time, out of 8 connectd over Port B of AT90USB162. And suddenly at a time turning each of them ON or OFF, all in the same state. Treating each LED individually and all together is very much feasible.
b> Atmel has a very natural scheme to define the functionality of a port pin. There are 3 Registers per port that need to be utilised in this case. Data Direction Register, PORT Regiter and PIN Register. The Data Direction Register is used to indicate whether a pin of given port is Input ot Output.

DDxn = 1 implies Pin 'n' of Port 'x' is output pin
DDxn = 0 implies Pin 'n' of Port 'x' is input pin


--- Being written currently (May 24, 2014 0808 (IST)) ---