background image

Hardware Description

AVR STK500 User Guide

3-27

1925C–AVR–3/03

3.11.2

PROGRAM Push 
Button

Future versions of AVR Studio may upgrade the master microcontroller on STK500.
AVR Studio will then detect old software versions of STK500 and update the Flash pro-
gram memory of the master microcontroller. To do this, the user is required to push the
PROGRAM button when powering on STK500. AVR Studio issues instructions on how
to perform the upgrade during the upgrade process.

3.11.3

Main Power LED

The red power LED is directly connected to the STK500 main power supply. The power
LED is always lit when power is applied to STK500.

3.11.4

Target Power LED

The target power LED is connected to VCC lines (VTG) on the target AVR devices in the
sockets. The target power LED is lit when power is applied to the target AVR device.

3.11.5

Status LED

The PROGRAM LED is a 3-color LED. During programming, the LED is yellow. When
the target AVR device is successfully programmed, the LED will turn green. If program-
ming fails, the LED will turn red to indicate that programming failed. When programming
fails, check the troubleshooting guide in Section 7 on page 7-1. During start-up, the sta-
tus LED will shift from red, through yellow, to green to indicate that the master
microcontroller is ready.

Summary of Contents for AVR STK500

Page 1: ...STK500 User Guide ...

Page 2: ......

Page 3: ... of LEDs and Switches 3 3 3 4 Port Connectors 3 3 3 5 Description of User RS 232 Interface 3 5 3 6 Description of DataFlash Pins 3 6 3 7 Target Socket Section 3 8 3 7 1 ISP Programming 3 9 3 7 2 High voltage Programming 3 11 3 8 Jumper Settings 3 15 3 8 1 Target VCC Settings VTARGET 3 16 3 8 2 Analog Reference Voltage AREF 3 17 3 8 3 Reset Settings RESET 3 18 3 8 4 Clock Settings XTAL1 and OSCSEL ...

Page 4: ...5 1 5 3 STK500 User Interface 5 2 5 3 1 Program Settings 5 2 5 3 2 Fuses Settings 5 3 5 3 3 LockBits Settings 5 4 5 3 4 Advanced Settings 5 4 5 3 5 Board Settings 5 5 5 3 6 Auto Settings 5 7 5 3 7 History Window 5 8 5 4 Command Line Software 5 9 5 5 Parameters 5 9 Section 6 In System Programming of an External Target System 6 1 Section 7 Troubleshooting Guide 7 1 Section 8 Technical Support 8 1 Se...

Page 5: ...d Serial High voltage Programming of AVR Devices n Serial In System Programming ISP of AVR Devices n In System Programmer for Programming AVR Devices in External Target System n Reprogramming of AVR Devices n 8 Push Buttons for General Use n 8 LEDs for General Use n All AVR I O Ports Easily Accessible through Pin Header Connectors n Additional RS 232 Port for General Use n Expansion Connectors for...

Page 6: ... into the sockets of STK500 Support for new AVR devices may be added in new versions of AVR Studio The latest version of AVR Studio is always available from www atmel com n ATtiny11 n AT90S4433 n ATtiny12 n AT90S4434 n ATtiny15 n AT90S8515 n ATtiny22 n AT90S8535 n ATtiny28 n ATmega8 n AT90S1200 n ATmega16 n AT90S2313 n ATmega161 n AT90S2323 n ATmega163 n AT90S2333 n ATmega323 n AT90S2343 n ATmega1...

Page 7: ...amming 4 pcs 2 wire cable for UART and DataFlash connections n 9 pin RS 232 cable n DC power cable n Atmel CD ROM with datasheets and software n AT90S8515 8PC sample microcontroller 2 2 System Requirements The minimum hardware and software requirements are n 486 processor Pentium is recommended n 16 MB RAM n 12 MB free hard disk space AVR Studio n Windows 95 98 2000 ME and Windows NT 4 0 or higher...

Page 8: ...required The input circuit is a full bridge recti fier and the STK500 automatically handles both positive or negative center connectors If a positive center connector is used it can be impossible to turn the STK500 off since the power switch disconnects the GND terminal In this case GND can be supplied through the RS 232 cable shield if connected or through alternative GND connections Connect the ...

Page 9: ...nected 2 3 2 Programming the Target AVR Device The STK500 is controlled from AVR Studio version 3 2 and higher AVR Studio is an integrated development environment IDE for developing and debugging AVR applica tions AVR Studio provides a project management tool source file editor simulator in circuit emulator interface and programming interface for STK500 To program a hex file into the target AVR de...

Page 10: ...etting Started 2 4 AVR STK500 User Guide 1925C AVR 3 03 Figure 2 3 AVR Studio STK500 Programming Menu Complete descriptions of using the STK500 interface in AVR Studio are given in Section 5 on page 5 1 ...

Page 11: ...able should not be twisted A red wire on the cable indicates pin 1 Confirm that this is connected to pin 1 on each of the headers Figure 3 2 shows how the LED control is implemented This solution will give the same amount of light from the LED for all target voltages from 1 8V to 6 0V Power Switch Power Connector Power LED Parallel Programming Headers RS 232 Port for Programming Master MCU Status ...

Page 12: ...g a switch causes the corresponding SWx to be pulled low while releasing it will result in VTG on the appropriate switch header connector Valid target voltage range is 1 8V VTG 6 0V Figure 3 3 Implementation of Switches and Switch Headers Note In the AVR the user can enable internal pull ups on the input pins removing the need for an external pull up on the push button In the STK500 design we have...

Page 13: ...bles The headers are supplied with VTG target VCC and GND lines in addition to the signal lines 3 4 Port Connectors The pinout for the I O port headers is explained in Figure 3 5 The square marking indi cates pin 1 Figure 3 5 General Pinout of I O Port Headers The PORTE AUX header has some special signals and functions in addition to the PORTE pins The pinout of this header is shown in Figure 3 6 ...

Page 14: ...onnected this pin can be used for external crystal with the XT1 pin The headers for the LEDs and switches use the same pinout as the I O port headers The pinout of the switch header is explained in Figure 3 7 and the pinout for the LED header is explained in Figure 3 8 The square marking indicates pin 1 Figure 3 7 Pinout of the Switch Header Figure 3 8 Pinout of the LED Header Table 3 1 PORTE Conn...

Page 15: ...S 232 the UART pins of the AVR need to be physically connected to the RS 232 The 2 pin header marked RS232 SPARE can be used for connecting the RS 232 con verter to the UART pins on the target AVR microcontroller in the socket Use the 2 wire cable to connect the UART pins to the RS 232 The connection is shown in Figure 3 9 The block schematic of the RS 232 connection is shown in Figure 3 10 Figure...

Page 16: ...the I O pins on the target AVR microcontroller in the socket 2 wire cables are included with STK500 for connecting the DataFlash to the I O pins The supplied 10 wire cables can also be used if the DataFlash is connected to the hardware SPI inter face on PORTB of the AVR microcontroller The connection of the I O pins is shown in Figure 3 13 The block schematic of the DataFlash connection is shown i...

Page 17: ...AVR STK500 User Guide 3 7 1925C AVR 3 03 Figure 3 13 Connection of I O Pins to DataFlash for AT90S8515 Figure 3 14 Schematic of DataFlash Connections Voltage Converter VTG 5V AT45D021 DataFlash CS SI S0 SCK S0 SI SCK CS 5V ...

Page 18: ...otch on the short side of the part must match the notch on the socket If the device is inserted the wrong way it may damage the part and the starter kit The socket section is used for both running applications and target device programming Figure 3 15 The STK500 Programming Module The part inserted in the socket can be programmed in the system from AVR Studio with two different methods 1 AVR In Sy...

Page 19: ...wire cable is supplied for connecting the ISP signals to the target ISP header A color coding system and a number system are used to explain which target ISP header is used for each socket During ISP programming the 6 wire cable must always be connected to the header marked ISP6PIN When programming parts in the blue sockets connect the other end of the cable to the blue SPROG1 target ISP header Wh...

Page 20: ...OG3 AT90S2323 AT90S2343 ATtiny12 ATtiny22 SCKT3400D1 Blue 1 SPROG1 Connect RST on PORTE to PB5 on PORTB Connect XTI on PORTE to PB3 XTAL1 on 2323 on PORTB ATtiny11 SCKT3400D1 Blue 1 High voltage Programming only ATtiny28 SCKT3500D None High voltage Programming only AT90S4414 AT90S8515 ATmega161 SCKT3000D3 Red 3 SPROG3 AT90S4434 AT90S8535 ATmega16 ATmega163 ATmega323 SCKT3100A3 Red 3 SPROG3 AT90S23...

Page 21: ...h voltage Programming Table 3 3 High voltage Programming Settings AVR Devices STK500 Socket Color Number High voltage Programming Method AT90S1200 AT90S2313 SCKT3300D3 Red 3 Parallel High voltage Programming Connect PROG CTRL header to PORTD and PROG DATA to PORTB as shown in Figure 3 17 on page 3 12 AT90S4414 AT90S8515 SCKT3000D3 Red 3 AT90S4434 AT90S8535 SCKT3100A3 Red 3 ATtiny28 SCKT3500D None ...

Page 22: ... I O pins The two 10 wire cables supplied with the STK500 can be used to connect the PROG DATA header to the PORTB header and the PROG CTRL header to the PORTD header as shown in Figure 3 17 Figure 3 17 Connection for Parallel High voltage Programming Some of the jumper settings on STK500 must be changed when using High voltage Pro gramming Figure 3 18 explains these jumper settings ...

Page 23: ...umpers VTARGET and RESET 8 When programming AT90S2333 AT90S4433 or ATmega8 mount both PJUMP jumpers The 2 wire cables can be used instead of jumpers 9 When programming ATmega16 ATmega163 ATmega161 ATmega128 or ATmega323 mount the BSEL2 jumper When programming ATmega8 connect BSEL2 terminal to PC2 A 2 wire cable can be used instead of jumpers 10 Disconnect target system 11 Switch power on 12 Ensure...

Page 24: ...mpers VTARGET and RESET 6 Use one 2 wire cable to connect the PB3 pin pin 4 on the PORTB header to the XT1 pin pin 7 on the PORTE AUX header This will connect the clock system to the AVR device 7 Use another 2 wire cable to connect the PB5 pin pin 6 on the PORTB header to the RST pin pin 4 on the PORTE AUX header This will connect the reset sys tem to the AVR device 8 Use a third 2 wire cable to c...

Page 25: ...ec tion The default setting of the jumpers are shown in Figure 3 20 Figure 3 20 Default Jumper Setting Table 3 4 Description of Jumpers Jumper Description of Default Setting VTARGET On board VTARGET supply connected AREF On board Analog Voltage Reference connected RESET On board Reset System connected XTAL1 On board Clock System connected OSCSEL On board Oscillator selected BSEL2 Unmounted Used fo...

Page 26: ...al source at one of the VTG pins on the PORT headers Figure 3 21 explains VTARGET jumper options When using an external source for VTARGET the user must control that VTARGET is at a higher voltage level than AREF analog reference voltage Always connect com mon ground GND when using an external VTARGET voltage Figure 3 21 VTARGET Jumper Options The STK500 master microcontroller controls the target ...

Page 27: ...er ence voltage is connected to the AVR s AREF The on board analog reference voltage can be adjusted from AVR Studio to 0 6 0V but not above VTARGET When the AREF jumper is disconnected AREF voltage must be supplied from an exter nal source at the AREF pin on the PORTE AUX header Figure 3 6 Figure 3 23 explains AREF jumper options When using an external source for AREF the user must control VTARGE...

Page 28: ...nk quickly 3 8 3 Reset Settings RESET The RESET jumper controls the RESET signal to the STK500 When ISP programming the target device in the socket the master microcontroller programs the AVR device without interfering with the application When the RESET jumper is mounted the master microcontroller controls the RESET signal of the AVR When the RESET jumper is not mounted the RESET signal is discon...

Page 29: ...n of the RESET signal Figure 3 26 Internal RESET Connection Note During High voltage Programming STK500 applies 12V to the AVR s RESET line Thus an external reset circuit not capable of handling this must be discon nected before High voltage Programming the AVR AREF RESET XTAL1 Jumper Mounted AREF RESET XTAL1 Jumper not Mounted On board RESET Signal Disconnected On board RESET Signal Connected def...

Page 30: ...termines what signal to route to the XTAL1 pin of the AVR When the XTAL1 jumper is connected the STK500 internal clock system is used as main clock to the target AVR When XTAL1 jumper is not mounted the internal clock system is disconnected This allows external clock signals or crystals to be used as tar get clock source for the AVR Figure 3 28 illustrates the XTAL1 jumper option Figure 3 28 XTAL1...

Page 31: ...illator as clock source The internal clock system is selected with the OSCSEL jumper Figure 3 29 shows the jumper options for OSCSEL The on board oscillator will work with ceramic resonators or crystals between 2 20 MHz AT cut fundamental and parallel resonant crystals Figure 3 29 OSCSEL Jumper Options When programming AVR in High voltage Programming mode OSCSEL should be mounted on pins 1 and 2 t...

Page 32: ...ogramming section of the corresponding parts datasheet Figure 3 31 BSEL2 Connection for ATmega8 3 8 6 PJUMP Jumpers The PJUMP jumpers route the programming pin of AT90S2333 AT90S4433 and ATmega8 to the programming lines when using High voltage Programming The PJUMP jumpers should only be mounted when using High voltage Programming on AT90S2333 AT90S4433 or ATmega8 During debugging High voltage Pro...

Page 33: ... module All AVR I O ports programming signals and control signals are routed to the expansion connectors The expansion connectors allow easy prototyping of applications with STK500 The pinout of the expansion connectors is shown in Figure 3 34 and Fig ure 3 35 Figure 3 33 Expansion Headers Expansion Header 0 Expansion Header 1 Prog Ctrl Prog Data Pin 1 Pin 1 ...

Page 34: ...40 GND AUXI0 CT7 CT5 CT3 CT1 NC RST PE1 GND VTG PC7 PC5 PC3 PC1 PA7 PA5 PA3 PA1 GND GND AUXO0 CT6 CT4 CT2 BSEL2 REF PE2 PE0 GND VTG PC6 PC4 PC2 PC0 PA6 PA4 PA2 PA0 GND 1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 GND AUXI1 DATA7 DATA5 DATA3 DATA1 SI SCK XT1 VTG GND PB7 PB5 PB3 PB1 PD7 PD5 PD3 PD1 GND GND AUXO1 DATA6 DATA4 DATA2 DATA...

Page 35: ...aders The Prog Ctrl and Prog Data headers are used for High voltage Programming of the tar get AVR device The placement of the headers is shown in Figure 3 33 During parallel High voltage Programming the Prog Ctrl signals are routed to PORTD of the target device The Prog Data signals are routed to PORTB See Section 3 7 2 on page 3 11 for a complete description of High voltage Programming The pinou...

Page 36: ...Miscellaneous STK500 has 2 push buttons and 3 LEDs for special functions and status indication The following section explains these features Figure 3 38 shows the placement of these functions Figure 3 38 Special Functions and Status Indication LEDs 3 11 1 RESET Push Button The RESET push button resets the target AVR device when pushed The master micro controller is not controlled by the RESET push...

Page 37: ...the STK500 main power supply The power LED is always lit when power is applied to STK500 3 11 4 Target Power LED The target power LED is connected to VCC lines VTG on the target AVR devices in the sockets The target power LED is lit when power is applied to the target AVR device 3 11 5 Status LED The PROGRAM LED is a 3 color LED During programming the LED is yellow When the target AVR device is su...

Page 38: ...Hardware Description 3 28 AVR STK500 User Guide 1925C AVR 3 03 ...

Page 39: ... AVR Studio insert the supplied Atmel CD ROM databook in the computer and navigate to Products AVR 8 bit RISC Software Right click with the mouse on the AVRstudio exe file and select save link as Select an empty directory and save the file Execute the AVRstudio exe file this is a self extracting file that will extract all required files to the current directory Execute the Setup exe file this will...

Page 40: ...Installing AVR Studio 4 2 AVR STK500 User Guide 1925C AVR 3 03 ...

Page 41: ...elopment board is included in AVR Studio version 3 2 and higher For information on how to install this software please see Section 4 on page 4 1 Once installed AVR Studio can be started by double clicking on the AVR Studio icon If default install options are used the program is located in the Windows Start menu Programs Atmel AVR Tools folder 5 2 1 Starting STK500 Pressing the AVR button on the AV...

Page 42: ...rayed out If both modes are available select a mode by clicking on the correct method Checking Erase Device Before Programming will force STK500 to perform a chip erase before programming code to the program memory Flash Checking Verify Device After Programming will force STK500 to perform a verification of the memory after programming it both Flash and EEPROM 5 3 1 3 Flash If the STK500 user inte...

Page 43: ...ust be in Intel hex for mat or extended Intel hex format 5 3 2 Fuses Settings In the Fuses tab an overview of accessible fuses are presented Some fuses are only available during High voltage Programming These will be displayed but not accessible if operating in ISP programming mode Press the Read button to read the current value of the fuses and the Write button to write the current fuse setting t...

Page 44: ...ion or by setting a different Lock mode The only way to remove a programmed Lock bit is to perform a complete chip erase erasing both program and data memories One excep tion exists If the target device has a programmed EESAVE fuse the contents of the EEPROM will be saved even though a complete chip erase on the device is performed Figure 5 4 LockBits 5 3 4 Advanced Settings The Advanced tab is cu...

Page 45: ...e does not have a tunable internal RC oscillator 5 3 4 4 Writing Oscillator Calibration Byte Since the calibration byte is not directly accessible during program execution the user should write the calibration byte into a known location in Flash or EEPROM memory Do this by writing the desired memory address in the Write Address text box and then press the Write to Memory button The calibration byt...

Page 46: ...he VTARGET voltage is shown in Figure 3 22 on page 3 16 5 3 5 2 AREF AREF controls the analog reference voltage for the ADC converter This setting only apply to devices with AD converter Through the use of the slide bar or the text box this voltage can be regulated between 0 and 6 0V in 0 1V increments Please refer to the device datasheet to find the valid voltage range for the selected device Bot...

Page 47: ...ritten number 5 3 6 Auto Settings When programming multiple devices with the same code the Auto tab offers a power ful method of automatically going through a user defined sequence of commands The commands are listed in the order they are executed if selected To enable a command the appropriate check box should be checked For example if only Program FLASH is checked when the Start button is presse...

Page 48: ...d This reduces both work and possibilities for errors due to operational errors 5 3 6 2 Logging the Auto programming to a File By clicking on the Log to file check box all output from the commands are written to a text file Select or create the file by pressing the Browse button and navigate to the location where the file is placed or should be created The output is directed to this file and can b...

Page 49: ...ing or verification of the FLASH memory The file format is Intel Extended HEX ie Name of EEPROM input file Required for programming or verification of the EEPROM memory The file format is Intel Extended HEX of Name of flash output file Required for readout of the FLASH memory The file format is Intel Extended HEX oe Name of EEPROM output file Required for readout of the EEPROM memory The file form...

Page 50: ...dresses c Select communication port com1 to com8 If this parameter is omitted the program will scan the comm ports for the STK500 ut Set target voltage VTARGET in Volts value is a floating point value between 0 0 and 6 0 describing the new voltage ua Set adjustable voltage AREF in Volts value is a floating point value between 0 0 and 6 0 describing the new voltage wt Get current target voltage VTA...

Page 51: ...6 2 10 pin ISP Connector Pinout Select the device to be programmed in the same way as programming a device on the STK500 The VCC of the target application is detected by STK500 and signals are con verted into voltage levels suitable for the target system Note If the other application has its own power supply to VTG the jumper VTARGET must be removed before connecting STK500 to the other applicatio...

Page 52: ...In System Programming of an External Target System 6 2 AVR STK500 User Guide 1925C AVR 3 03 ...

Page 53: ...der to the PORTD header and the SWITCHES header to the PORTB header page 3 3 The Flash memory is erased Connect STK500 to a PC and reprogram the AVR device page 2 3 The AVR device cannot be programmed The PC serial cable is not connected Connect the serial cable to the PC COM port and the RS232 PROG port The AVR device is inserted in wrong socket Check that the correct socket is used page 3 10 The...

Page 54: ... PC COM port AVR Studio does not detect COM port Disable COM port auto detection in AVR Studio file menu Force COM port to correct COM port STK500 cannot be switched off Positive center power connector is used Use negative center power connector Turn off STK500 by removing power connector The status LED is blinking slowly There is a short circuit on AREF Resolve the short circuit The status LED is...

Page 55: ...ical sup port for STK500 please include the following information n Version number of AVR Studio This can be found in the AVR Studio menu Help About n PC processor type and speed n PC operating system and version n What target AVR device is used complete part number n Programming voltage n Jumper settings n A detailed description of the problem ...

Page 56: ...Technical Support 8 2 AVR STK500 User Guide 1925C AVR 3 03 ...

Page 57: ...Tip Copy the code from this document into AVR Studio STK500 LEDS and SWITCH demonstration include 8515def inc def Temp r16 Temporary register def Delay r17 Delay variable 1 def Delay2 r18 Delay variable 2 Initialization RESET ser Temp out DDRB Temp Set PORTB to output Test input output LOOP out PORTB temp Update LEDS sbis PIND 0x00 If Port D pin0 0 inc Temp then count LEDS one down sbis PIND 0x01 ...

Page 58: ...x03 If Port D pin3 0 rol Temp then rotate LEDS one left sbis PIND 0x04 If Port D pin4 0 com Temp then invert all LEDS sbis PIND 0x05 If Port D pin5 0 neg Temp then invert all LEDS and add 1 sbis PIND 0x06 If Port D pin6 0 swap Temp then swap nibbles of LEDS Now wait a while to make LED changes visible DLY dec Delay brne DLY dec Delay2 brne DLY rjmp LOOP Repeat loop forever ...

Page 59: ...TERFACE DATAFLASH TARGET PUSH BUTTONS TARGET LEDS SPARE UART POWER BUTTON CONTROL UART SELF PROG SYSTEM RESET BUTTON PROGRAM BUTTON STATUS LED AUX INTERFACE HW REVISION AREF VTARGET RESET XTAL1 CONTROL SECTION TARGET SECTION PORT A PORT B PORT C PORT D PORT E AUX SWITCHES LEDS RS232 SPARE DATAFLASH RS232 SPARE RS232 CTRL POWER CONNECTOR POWER TO CONTROL SECTION CONNECTIONS TO CONTROL SECTION SPROG...

Page 60: ...Appendix A 10 2 AVR STK500 User Guide 1925C AVR 3 03 ...

Page 61: ...033 Japan Tel 81 3 3523 3551 Fax 81 3 3523 7581 Memory 2325 Orchard Parkway San Jose CA 95131 Tel 1 408 441 0311 Fax 1 408 436 4314 Microcontrollers 2325 Orchard Parkway San Jose CA 95131 Tel 1 408 441 0311 Fax 1 408 436 4314 La Chantrerie BP 70602 44306 Nantes Cedex 3 France Tel 33 2 40 18 18 18 Fax 33 2 40 18 19 60 ASIC ASSP Smart Cards Zone Industrielle 13106 Rousset Cedex France Tel 33 4 42 53...

Page 62: ...Mouser Electronics Authorized Distributor Click to View Pricing Inventory Delivery Lifecycle Information Microchip 24AA16 ST ...

Reviews: