M. A. Parker c2015
Installing Atmel Studio (AS) and a programmer embody the first steps  on the path to using an individual Atmel AVR Microcontroller unit MCU  as opposed to the MCU-on-a-board such as Arduino . Here starts the journey, albeit rather short, through a series of ‘Startup’ Instructables  focusing on ‘getting started’ with the Atmel MCU. Along the way, the series (Startup 5) shows how to construct the ‘Lifeline’ to fix wrongly set fuse bits – a simplest of projects but useful to the expert and makes a nice gift. This initial Startup describes the setup of the Atmel Studio and Programmer and the construction of an adapter cable for connecting the programmer to an experimenter’s board. Startup 2 describes the construction of a ‘platform’ circuit on an experimenter’s breadboard used to set the internal fuse bits of the MCU. The circuit will be used for the remaining three Startup Instructables. Startups 3 and 4 use the platform to demonstrate ‘Blinky’, the blinking LED, and to describe the ‘secret’ life of the Atmel PORT, PIN and DDR registers and pull-up resistors.
**NOTE: For those wanting the PDF of this instructable, download the attached PDF using the below link rather than the one automatically generated by the website - that automation does not maintain the association of the captions with the pictures.
We began using the Atmel MCUs in the early 2000s in order to create Data Acquisition units for experiments with IC fabrication and for demonstrating a unique multichannel noise communicator. Similar to other people, we had to learn certain well published ‘secrets’ of the Atmel AVR Microcontroller including, at the most basic level, the Data Direction Register DDR, PORT versus PIN and the USART data format (inverted). Fortunately, a consulting firm supplying our MCU needs, also provided assistance for ‘getting started’ and pointers on the ‘secrets’. While planning to publish some MCU projects, it seemed reasonable to pass along the favor by providing some ‘Getting Started’ guides, although in considerably more detail, so that other interested people might benefit.
This Instructable provides an introduction to using a single Atmel MCU. Although we start with the ATTiny2313A , the discussion applies to the popular Atmel AVRs (8bit) such as the ATMega328p (of Arduino fame). With the single Atmel MCUs, the builder controls all the options and expends much less cash than for the larger and more expensive Arduinos . The 2313A have a price of about $1 each and the budding experimenter will be much less traumatized if a couple should go up in smoke. Future articles will center on other Atmel MCUs such as the ATMega328p and the SAM line. On the other hand, the remarkable Raspberry PIs  run Linux with plenty of USB peripherals but uses an event driven architecture that limits real time data acquisition.
The Atmel Studio 6.2 (AS6) software provides an Integrated Development Environment (IDE) which, among other features, (i) allows the user to type programming statements, (ii) compiles the programming statements into proper MCU syntax (i.e., hex code), (iii) transfers the MCU code to a programmer usually attached to a USB port, and (iv)saves/retrieves programs from disk. AS6 will function with any of the Atmel MCUs including AVR (i.e., 8 bit) and SAM (i.e., 32bit). The programmer generates the necessary signals onto the MCU’s Serial Peripheral Interface SPI pins that engage and synchronize the MCU’s internal ‘In-System Programmer ISP’ . In short, the programmer transfers the code to the MCU. Atmel Studio provides C and C++ compilers which convert programming statements into MCU syntax/Hex code.
This instructable includes notes on tools toward the end and some references for the programmer. However, the majority of the reference/tutorial links for electronic components and C/C++ will be found over the next several installations of the Startup series where they will be used.
Figure 2: Activate the Numbers option by using: Tools>Options>Text Editor> All Languages>General
Use the following items to download, install and initialize AS6 on a computer with a USB port compatible with the programmer chosen in Step 2.
Download Atmel Studio (free of charge) from 
You will be asked to register as a guest if you don’t already have an account. Atmel has recently opened service offices around the world rather than the central office. Atmel has also initiated new (free) memberships with ‘MyAtmel’ that is worth the effort to register for downloads and assistance.
Activate the line numbers for the coding page as follows [Figure 2]. The line numbers will be listed on the left side of the coding page so that each program line will have its own number. When the program is compiled, AS will present any syntactic errors in an ‘Error List’ along with the line number. Unfortunately, the AS menu item to enable the line numbers is always well hidden. Perform the following:
Select the Tools menu item in the AS6 top menu strip. Select Options at the bottom.
In the left hand tree, scroll down until ‘Text Editor’ becomes visible.
Left click the small “+” next to the title ‘Text Editor’.
Left click the small “+” next to “All Languages”
On the right hand side, place a check mark in the ‘Line numbers’ under the ‘Display heading’.