Flying Electron Inc. Logo Flying Electron Inc.
My Account  Cart Contents  Checkout  
  Top » Catalog » Shipping & Returns My Account  |  Cart Contents  |  Checkout   
Categories
Home
Software (1)
NanoComputer (6)
Cables (3)
Crimps, Connectors, and Wire (16)
Development PCBs (9)
Spare Parts
Application Notes



Shopping Cart more
0 items
Bestsellers
01.RS232 Level Shifter Adapter Board [FE_RS232 rev. a]
02.Wiring Harness Connector 2 Position Single Row
03.Wiring Harness Connector 6 Position Single Row
04.* Wire Assembly, Crimps on Both Ends (10 Pack)
05.Atmel AtMega 168 Development Board [FE_M168 rev. b]
06.Extra Long 12" 6 Pin ISP Programming Cable
What's New? more
NanoComputer  USB Cable A to mini B (Accessory)
NanoComputer USB Cable A to mini B (Accessory)
$3.99
Quick Find
 
Use keywords to find the product you are looking for.
Advanced Search
Information
Shipping & Returns
Privacy Notice
Conditions of Use
Contact Us
Flying Electron Application Note 1000
In System Programming (ISP) using the Atmel STK500
Background
In this application note, we will be demonstrating how to perform an In System Program (ISP) operation to program new firmware into an AVR microcontroller using the Atmel STK500 programmer. The example will use the Atmel STK500 programmer connected to a Flying Electron FE_M168 development board which uses an Atmel AtMega168 AVR microcontroller. This application note can also be used as a reference for programming other development boards which use an AVR microcontroller and support ISP programming.
Parts Needed
  1. Flying Electron FE_M168
  2. Atmel STK500
  3. Serial Cable
         
Flying Electron FE_M168
Click to Enlarge
    
Atmel STK500
Click to Enlarge
    
Software Needed
  1. Atmel AVR Studio 4 (See Application Note 0200 for detailed installation instructions)
Hardware Setup
Note: Please use the figure below labeled "Flying Electron FE_M168 ISP Programming with Atmel STK500" as a reference when following the hardware setup steps.
  1. Turn the STK500 POWER SWITCH to OFF
  2. Plug the STK500's Power Adapter into the STK500 POWER JACK
  3. Plug the serial cable into the STK500 RS232 CTRL Serial Port
  4. Plug the other end of the serial cable into PC's Serial Port
  5. Remove the STK500 VTARGET JUMPER
     
  6. Unplug the FE_M168's Power Adapter from the FE_M168 POWER JACK
  7. Disconnect any accessories connected to FE_M168 PORTB unless accessories are specified to be safe for ISP Programming.
    Note: If in doubt, disconnect all accessories connected to FE_M168 PORTB.
     
  8. Use a 6 conductor ISP cable to connect STK500 ISP6PIN HEADER and FE_M168 ISP HEADER.
    Note: The red stripe of the ISP cable should be facing pin 1 of both headers. See the diagram below for correct red stripe orientation.
     
  9. Plug the FE_M168's Power Adapter into the FE_M168 POWER JACK
  10. Turn the STK500 POWER SWITCH to ON



ISP Programming Procedure Interactive Tutorial
The interactive tutorial below will graphically demonstrate how to use the Atmel AVR Studio 4 application to perform an ISP programming procedure on an AVR microcontroller. The tutorial uses a Flying Electron FE_M168 development board as the target to be programmed, but the tutorial is applicable to all AVR microcontrollers. The example firmware being programmed into the AVR microcontroller is from the Flying Electron Application Note 1003 (LED Simple Example). Please see the Flying Electron Application Note 1003 for hardware setup information if you are interested in seeing the programmed example firmware run on real hardware. Click on the image of the interactive tutorial to start the tutorial.

Flying Electron Application Note 1000
Interactive Tutorial
Click to Start the Interactive Tutorial
ISP Programming Procedure Quick Reference
Below is a quick reference for the steps taken in the interactive tutorial for performaing an ISP programming operating using Atmel AVR Studio 4.
  1. Launch AVR Studio 4.
    The Welcome to AVR Studio 4 dialog will appear.
    Click the Cancel button on the Welcome to AVR Studio 4 dialog.
     
  2. The AVR Studio 4 application window will appear.
    Click the Con button on the main application toolbar.
    The Select AVR Programmer dialog will appear.
    Select the STK500 or AVRISP option for the Platform.
    Select the Auto option for the Port.
    Click the Connect... button.
     
  3. The STK500 dialog will appear.
    Click on the Program tab if the Program tab is not already shown.
    Select the ATmega168 option in the Device dropdown if not already selected.
     
  4. Click on the Advanced tab.
    Click on the Read Button to read the Signature Bytes of the AVR microcontroller.
    Confirm that the Signature Bytes returned match the selected device.
     
  5. Click on the Fuses tab
    Check or uncheck fuse options to set the desired fuses.
    CAUTION: DOUBLE CHECK YOUR FUSE SETTINGS BEFORE CLICKING THE PROGRAM BUTTON!
    SETTING THE WRONG FUSES CAN DISABLE ISP PROGRAMMING CAPABILITIES WHICH MAY REQUIRE A HIGH VOLTAGE PARALLEL PROGRAMMING OPERATION TO RESTORE ISP PROGRAMMING CAPABILITIES.
    Click on the Program button to program the fuse options.
     
  6. Click on the Program tab
    Click on the browse "..." button in the Flash section of the Program tab to bring up the browse dialog.
    Select the .HEX file containing the data to program into the AVR using the browse dialog.
    Click on the Program" button.
    AVR ISP Programming is now complete.
This is the end of this Application Note.
For other Application Notes, please see the Application Note Index.

Questions, Comments, Suggestions? We want to here them!
Email sales@flyingelectron.com

Copyright © 2012 Flying Electron Inc.
Powered by osCommerce