DOC PREVIEW
SJSU ME 106 - Introduction to the Atmel ATmega16 Microcontroller

This preview shows page 1-2-3-4 out of 13 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 13 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 13 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 13 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 13 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 13 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

STK 500 Interface BoardIntroduction to the ATmega16 Atmel - 1Introduction to the Atmel ATmega16 MicrocontrollerLearning Objectives:At the end of this lab you should be able to:- Identify the Atmel ATmega16 microcontroller, STK500 Development Board, and associated hardware.- Create a new project in AVR Studio, and populate the project with pre-existing code.- Use AVR Studio to compile code in ANSI C.- Use AVR Studio to program the ATmega16 microcontroller.Components:Qty. Item1 Atmel ATmega16 microcontroller mounted to an STK500 development board1 Serial programming cable1 12 VDC power supply1 6-pin ribbon cable1 2-wire female-female jumper2 10-wire female-female jumperIntroductionA microcontroller often serves as the “brain” of a mechatronic system. Like a mini, self-contained computer, it can be programmed to interact with both the hardware of the system and the user. Even the most basic microcontroller can perform simple math operations, control digital outputs, and monitor digital inputs. As the computer industry has evolved, so has the technology associated with microcontrollers. Newer microcontrollers are much faster, have more memory, and have a host of input and output features that dwarf the ability of earlier models. Most modern controllers have analog-to-digital converters, high-speed timers and counters, interrupt capabilities, outputs that can be pulse-width modulated, serial communication ports, etc. The microcontroller and the development board used in this lab were donated by Atmel for your use. In industry, you can expect to pay anywhere from $50 to $400 for just a development board and up to $1000 for a professional compiler and programming interface! SO BE CAREFUL AND RESPECTFUL of the microcontrollers and development boards! Like any electronic device, they are delicate and may be easily damaged! BE ESPECIALLY CAREFUL of static charges! Before you touch the STK500 board (or any other circuit board with integrated circuits, for that matter), make sure that you have dissipated any static charge that has accumulated on your body. The best way to do this is by using an ESD wrist strap that has been connected to a good earth ground and by placing your circuit board on a grounded ESD mat. If you don’t have these ESD supplies, touch a well-grounded metal surface before you handle the circuit board.The bottom line is: USE COMMON SENSE, and FOLLOW THE INSTRUCTIONS in the lab assignments. You will build upon your experience from each lab, and you are therefore encouraged to learn as much as you can from each experiment and its examples.The ATmega16 MicrocontrollerThe ATmega16 microcontroller used in this lab is a 40-pin wide DIP (Dual In Line) package chip. This chip was selected because it is robust, and the DIP package interfaces with prototyping supplies like solderless bread boards and solder-type perf-boards. This same microcontroller is available in a -San José State University Dept. of Mechanical and Aerospace Engineering rev. 3.4 06SEP2010Introduction to the ATmega16 Atmel - 2surface mount package, about the size of a dime. Surface mount devices are more useful for circuit boards built for mass production. Figure 1 below shows the ‘pin-out’ diagram of the ATmega16. Thisdiagram is very useful, because it tells you where power and ground should be connected, which pinstie to which functional hardware, etc.Figure 1. ATmega16 Pin-out diagram. Notice that some of the pins have alternate functions (shown in parentheses).Throughout the semester, you will need to know things about the ATmega16 (or other components) that are not covered in the lab instructions. Therefore it is important that you become familiar with documentation available from various sources. Your first task is to locate the ATmega16 manual, and save it for yourself for future reference . It can be found in a pdf format on Atmel’s website (www.atmel.com), AVRFreaks (http://www.avrfreaks.net/), or by searching the web. From the manual, you can find information about the ATmega16’s features and how to use them. How many channels of 10-bit A/D converters are there? How many bytes of in-system reprogrammable flash are there?STK 500 Interface BoardThe hardware that you will use consists of the STK500 development board. The SKT500 can actually be used with any of the microcontrollers in the AVR family (see the STK500 user guide). It allows a user to work with many different Atmel microcontrollers and easily gain access to their I/O pins. The STK500 has two serial port connectors (one for programming the devices and one as a spare RS232 port), a power supply switch and connector, eight LEDs and eight switches for general -San José State University Dept. of Mechanical and Aerospace Engineering rev. 3.4 06SEP2010Introduction to the ATmega16 Atmel - 3use, and various jumpers for configuring the board. Figure 2 shows a top view of the STK500 interface board and the location of some of the hardware elements that you will use.Figure 2. STK500 development board. This is a ‘universal’ development board for AVR microcontrollers. Note the location of the features as indicated by the arrows.Before you go further in the procedure, double-check the default jumper settings on the STK500 as shown in Figure 3. Figure 3. Default jumper settings on the STK500. A jumper consists of two female sockets tied together internally with a metal conductor and surrounded by a plastic housing. Typically, when the pins are connected, the jumper is considered to be in the ON position. When setting a jumper in the OFF position, place the jumper on only one of the two pins. This way the jumper does not get lost and is available in case you need to change its setting. The jumper for OSCSEL is set so that it connects the two right-most pins of the three. Thus set, it selects the on-board clock signal.You will be using the ISP programming mode for communicating with and downloading your programs to the microcontroller. As a result, you need to connect the 6-pin ISP ribbon cable from the-San José State University Dept. of Mechanical and Aerospace Engineering rev. 3.4 06SEP2010Jumper SettingVTARGET ONAREF ONRESET ONXTAL1 ONOSCSEL On-board clockBSEL2 OFFJumper Setting DefinitionON OFFIntroduction to the ATmega16 Atmel - 4ISP6PIN header on the STK500 to the 6-pin SPROG3 header outlined in red above it. Figure 4 shows this connection on the STK500. BE SURE to line up the red, pin1 stripe on the ribbon cable to pin 1 on each


View Full Document

SJSU ME 106 - Introduction to the Atmel ATmega16 Microcontroller

Download Introduction to the Atmel ATmega16 Microcontroller
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Introduction to the Atmel ATmega16 Microcontroller and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Introduction to the Atmel ATmega16 Microcontroller 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?