Home
AVR STK500 User Guide
Contents
1. nn AR terne 8 1 Section 9 Example Applications ennemis uma 9 1 9 1 Using LEDs and Switches 9 1 Section 10 0 10 1 AIMEL AMEL 1 1 Starter Kit Features STK500 User Guide Section 1 Introduction Congratulations on your purchase of the STK500 AVR Flash MCU Starter Kit The STK500 is a complete starter kit and development system for the AVR Flash microcon troller from Atmel Corporation It is designed to give designers a quick start to develop code on the AVR and for prototyping and testing of new designs AVR Studio Compatible RS 232 Interface to PC for Programming and Control Regulated Power Supply for 10 15V DC Power Sockets for 8 pin 20 pin 28 pin and 40 pin AVR Devices Parallel and Serial High voltage Programming of AVR Devices Serial In System Programming ISP of AVR Devices In System Programmer for Programming AVR Devices in External Target System Reprogramming of AVR Devices 8 Push Buttons for General Use 8 LEDs for General Use All AVR I O Ports Easily Accessible through Pin Header Connectors Additional RS 232 Port for General Use Expansion Connectors for Plug in Modules and Prototyping Area On board 2 Mbit DataFlash for Nonvolatile Data Storage The STK500 is supported by AVR Studio version 3 2 or higher For up to date informa tion on this and other AVR tool products please read the document avrtools pdf The newest version of AVR Studio avrtools pdf and this user gui
2. 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 9 The AVR device is inserted with wrong orientation Check that the notch on the AVR socket matches the notch on the AVR device The target ISP header is not connected Connect the 6 pin flexible cable from ISP6PIN header to the correct SPROG target ISP header page 3 9 The jumpers settings are wrong Set jumper to default setup page 3 14 The memory lock bits are programmed Erase the memory before programming Troubleshooting Guide Table 7 1 Troubleshooting Guide Continued Problem The AVR device cannot be programmed continued Reason Reset disable fuse is set Solution Check reset disable fuse Programming too fast Check oscillator settings and make sure it is not set higher than actual clock External pullup resistor on reset line too low Ensure that external pullup resistor is gt 4 7 KQ AVR Studio does not detect STK500 Serial cable is not connected or power is off Connect serial cable to RS232 PROG and check power connections PC COM port is in use Disable other
3. 3 11 3 11 1 3 11 2 3 11 3 3 11 4 3 11 5 3 24 Miscellaneous RESET Push Button PROGRAM Push Button Main Power LED Target Power LED Status LED 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 Target Power LED RESET Push Button Main Power LED le e T lee ine lee B s e e Ne lee le e E es onl O ne H e le e je e O FH e ne LO T e lee ee lo ee EE e Ne O 3 le e je e Program Push Button Status LED The RESET push button resets the target AVR device when pushed The master MCU is not controlled by the RESET push button When the RESET jumper is not mounted the RESET push button is disabled Future versions of AVR Studio may upgrade the master MCU on STK500 AVR Studio will then detect old software versions of STK500 and update the Flash program m
4. AMEL 3 1 Description of User LEDs STK500 User Guide Section 3 Hardware Description Figure 3 1 STK500 Components Header for Expansion Boards Headers for I O Ports Sockets for Target AVR Options Setting Jumpers Target Reset Push Button Switches Power Switch Header for Switches E O a biie Connector em e AVR lt Power LED Parallel Programming Headers RS232 Interface Header RS 232 Port for Programming Master MCU 5 Status LED RS 232 Port Uv for Communication DataFlash Interface Header Socket for e Crystal Header for LEDs eo Program Button 10 pin ISP Header for External Target Only LEDs Target ISP Headers Expansion Boards 6 pin ISP Header The STK500 starter kit includes 8 yellow LEDs and 8 push button switches The LEDs and switches are connected to debug headers that are separated from the rest of the board They can be connected to the AVR devices with the supplied 10 wire cable to the pin header of the AVR I O ports Figure 3 4 shows how the LEDs and switches can be conn
5. Advanced Board Auto Device ar 9054433 x Erase Device Programming mode ISP Iv Erase Device Before Programming C Parallel High Voltage Serial Iv Verify Device After Programming m Flash se Curent Simuletor Emulater FLAGH MEME Input HEX File Tz Jes remet een ee EEPROM Y USE curent Simulator emulator EEPROM Memon Input HEX File D T Program Verity Read 5 1 Using AVR Studio 5 3 STK500 User Interface 5 3 1 Program Settings 5 3 1 1 Device 5 3 1 2 Programming Mode 5 3 1 3 Flash 5 2 The STK500 user interface includes powerful features for the STK500 development board The available settings are divided into six groups each selectable by clicking on the appropriate tab Since different devices have different features the available options and selections will depend on which device is selected Unavailable features are grayed out The program settings are divided into four different subgroups A device is selected by selecting the correct device from the pull down menu This group also includes a button that performs a chip erase on the selected device erasing both the Flash and EEPROM memories This group selects programming mode For devices only supporting High voltage Pro gramming the ISP option will be grayed out If both modes are available select a mode by clicking on the correct method Checking Erase Device Before Prog
6. then invert all EDS and add 1 If Port D 06 then swap nibbles of Ll 0 DS D changes visible Repeat loop forever STK500 User Guide AMEL EE STK500 User Guide Figure 10 1 STK500 Block Diagram RS232 SPARE RS232 CTRL POWER CONNECTOR Section 10 Appendix A SPARE 1 UART 7 gt RS232 SPARE Le CONTROL Le UART DATAFLASH ke gt DATAFLASH 1 1 TARGET Le SELF 1 LEDS LEDS PROG SYSTEM PROG DATA i 1 TARGET PUSH BUTTONS FaSWIICHES PROG CTRL i 1 SPROG1 BUTTON 1 SERIAL p ISP10PIN PORTA 1 ecl SPROG2 lt gt 1 PROGRAM INTERFACE i L gt ISP6PIN BUTTON I I PORTB SPROG3 4 94 CONTROL MCU TARGET HW CLOCK XTALT TaRGET 1 REVISION SYSTEM I SOCKET 1 SECTION PORT C 1 TARGET STATUS RESET RESET 4 LED SYSTEM PORT D 1 VTARGET TARGET 1 AUX INTERFACE ATEN PORT E AUX 1 POWER CONTROL SECTION 1 1 l CONNECTIONS POWER POWER EXPAND BUTTON SUPPLY TOCONIROL CONNECTORS i SECTION 1 1 CONTROL SECTION TARGET SECTION 10 1 Appendix A 10 2 AIMEL STK500 User Guide AMEL EE Atmel Headquarters Corporate Headquarters 2325 Orchard Parkway San Jose CA 95131 TEL 408 441 0311 FAX 408
7. 0 or higher m 115200 baud RS 232 port COM port m 10 15V DC power supply 500 mA min The STK500 starter kit is shipped with an AT90S8515 8PC microcontroller in the socket marked SCKT3000D3 The default jumper settings will allow the microcontroller to exe cute from the clock source and voltage regulator on the STK500 board The microcontroller is programmed with a test program that toggles the LEDs The test program in the AT90S8515 is simular to the example application code described in Sec tion 9 Connect the LEDs and switches and power up the STK500 to run the test program in the AT90S8515 Use the supplied 10 pin cables to connect the header marked PORTPB with the header marked LEDS and connect the header marked PORTD with the header marked SWITCHES The connections are shown in Figure 2 1 An external 10 15V DC power supply is required The input circuit is a full bridge recti fier and the STK500 automatically handles both positive or negative center connector If a positive center connector is used it can be impossible to turn the STK500 off since the 2 1 Getting Started 2 3 1 2 2 Connecting the Hardware 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 power cable between a power supply and the STK500 Apply 10 15V DC to the power connector The power switch turns the STK5
8. RST and the PORTE header and PB5 on the PORTB header AIMEL STK500 User Guide Table 3 2 AVR Sockets Hardware Description AVR Devices STK500 Socket Color Number Target ISP Header AT90S1200 AT90S2313 SCKT3300D3 Red 3 SPROG3 AT90S2323 SPROG1 Connect RST on AT90S2343 PORTE to PB5 on PORTB ATtiny12 0 Bue ly Connect XTI on PORTE to PB3 ATtiny22 XTAL1 on 2323 on PORTE ATtiny11 SCKT3400D1 Blue 1 High voltage Programming only ATtiny28 SCKT3500D None High voltage Programming only AT90S4414 AT90S8515 SCKT3000D3 Red 3 SPROG3 ATmega161 AT90S4434 AT90S8535 ATmega16 SCKT3100A3 Red 3 SPROG3 ATmega163 ATmega323 AT90S2333 AT90S4433 SCKT3200A2 Green 2 SPROG2 ATmega8 ATtiny15 SCKT3600A1 Blue 1 SPROG1 Connect RST on PORTE to PB5 on PORTB Socket is not in use in this version N A SCKT3700A1 Blue 1 of STK500 ATmega103 ATmega128 Use the STK501 Top Module Figure 3 16 shows an example of how AT90S2313 can be In System Programmed The 6 wire cable is connected from the ISP6PIN header to the red SPROGS target ISP header and the AT90S2313 part is inserted in the red socket marked SCKT3100D3 Figure 3 16 Example Connection for Programming AT90S2313 p AVR m STK500 User Guide SCKT3300D3 son lee 1 e e 6 ee SPROGj i 6 0 0 0 0 0 0 0 0 0 00 0 0 0 0000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ISP6PI
9. Simple batch files can be made for automatic programming Type STK500 for help The program returns ERRORCODE 0 if the operation was successful and ERROR CODE 1 if the operation failed Command Line Switches d device name m slp if infile ie infile of outfile oe outfile s O Sf addr Seaddr e p flelb r flelb v flelb value L value y f value E value F value G value q x value af start stop ae start stop c port ut value ua value wt wa b hls freq t g z hI Device name Must be applied when programming the device See list below Select programming mode serial s or parallel High voltage p Serial programming mode is the default and is used if this parameteris not applied Name of FLASH input file Required for programming or verification of the FLASH memory The file format is Intel Extended HEX AIMEL STK500 User Guide STK500 User Guide of oe o Sf Se af ae ut ua wt wa Using AVR Studio Name of EEPROM input file Required for programming or verification of the EEPROM memory The file format is Intel Extended HEX Name of flash output file Required for readout of the FLASH memory The file format is Intel Extended HEX Name of EEPROM output file Required for readout of the EEPROM memory The file format is Intel Extended HEX Read signature bytes Read oscillator call
10. VTarget is used and the external VTarget is turned off this will also be detected by the STK500 as a false short circuit The latter case can be avoided by low ering the internal VTarget below 0 3V The analog reference voltage AREF can supply the reference voltage to the On chip A D Converter on the AVR If the AREF jumper is mounted the On board analog refer 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 VTARGET at a higher voltage level than AREF This can be controlled easily by reading the VTG value from AVR Studio before setting AREF AIMEL 3 15 Hardware Description 3 8 3 Reset Settings RESET Figure 3 23 AREF Jumper Options VTARGET 55555 u AREF AIMEL 3 ee AVR H i III 100000 a C i 6 1 Manaan AREF 1 TS 1 A i i AMR f wow i On board AREF voltage disconnected The STK500 master MCU controls the analog reference voltage using the internal PWM The AVR s AREF signal is also accessible on the PORTE header this pin can also be used for external AREF signal Figure 3 24 shows the internal connect
11. programs that are using PC COM port Change 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 blinking quickly There is a short circuit on VTarget Resolve the short circuit An external VTarget is being used and has been turned off Set VTarget to a value below 0 3V in AVR Studio The LEDs don t work running from external VTarget STK500 must be powered for LEDs to work Supply poser to STK500 and turn it on AIMEL STK500 User Guide AMEL STK500 User Guide Section 8 Technical Support For technical support please contact avr 6 atmel com When requesting technical sup port for STK500 please include the following information m Version number of AVR Studio This can be found in the AVR Studio menu Help About PC processor type and speed PC operating system and version m What target AVR device is used complete part number m Programming voltage m Jumper settings m A detailed description of the problem 8 1 Technical Support 8 2 AIMEL STK50
12. the Prog Ctrl signals are routed to PORTD of the target device The Prog Data signals are routed to PORTB See paragraph 3 7 2 on page 3 10 for a complete description of High voltage Programming The pinouts of the Prog Ctrl and Prog Data headers are shown in Figure 3 36 and Figure 3 37 For more information about High voltage Programming of AVR devices see the programming section of each AVR datasheet Note Prog Ctrl and Data connectors are connected directly to the master MCU with out level converters This means that these signals are always 5V logic AIMEL STK500 User Guide STK500 User Guide Hardware Description Figure 3 36 Prog Ctrl Header Pinout NC CT1 RDY BSY OE CT2 CT3 WR BS1 CT4 CT5 XAO XA1 CT6 CT7 PAGEL GND NC The Prog Ctrl signals are normally used for the control signals when parallel High voltage Programming an AVR device Note All Prog Ctrl signals are based on 5V CMOS logic No voltage conversion to adapt to VTG is done on these signals Figure 3 37 Prog Data Header Pinout 12 DATAO DATA1 DATA2 DATA3 DATA4 DATA5 DATA6 DATA7 GND NC The Prog Data signals are used for the data bus when parallel High voltage Program ming an AVR device During ISP programming DATAS is used as MOSI DATA6 is used as MISO and DATA7 is used for SCK Note All Prog Data signals are based on 5V CMOS logic No voltage conversion to adapt to VTG is done on these signals AIMEL 3 23 Hardware Description
13. 0 User Guide AMEL EE 9 1 Using LEDs and Switches STK500 User Guide Section 9 Connect PORTB to LEDS and PORTD to SWITCHES LEDs will operate differently depending on what switch is pressed Tip Copy the code from this document into AVR Studio RAPE STPTK500 Tl include 8515def inc def Temp r16 def Delay r17 def Delay2 r18 Tnitialization RESET ser out Test input output LOOP out sbis inc sbis dec sbis ror 5 Temp DDRB Temp PORTB temp PIND 0x00 Temp PIND 0x01 Temp PIND 0x02 Temp Example Applications DS and SWITCH demonstration Temporary register De De lay variabl lay variabl Set PORTB to Update LEDS If If If le 1 le 2 output Port D pinO 0 then count LEDS one down Port D pin1 0 then count LEDS one up Port D pin2 0 then rotate LEDS one right Example Applications 9 2 sbis rol sbis com sbis neg sbis swap Now wait a while to DLY dec brne dec brne rjmp PIND 0x03 Temp PIND 0x04 Temp PIND 0x05 Temp PIND 0x06 Temp Delay c LY Delay2 LOOP AIMEL make LEI If Port D pin3 then rotate LEDS If Port D pin4 then invert all If Port D pind
14. 00 main power on and off The red LED is lit when power is on and the status LEDs will go from red via yellow to green The green LED indicates that the target Vcc is present The program now running in the AT90S8515 will respond to pressed switches by toggling the LEDs Figure 2 1 Default Setup of STK500 The starter kit can be configured for various clock and power sources A complete description of the jumper settings is explained in paragraph 3 8 on page 3 13 and on the reverse side of the starter kit Figure 2 2 Connection to STK500 10 15V DC To Computer RS 232 AIMEL STK500 User Guide 2 3 2 Programming the Target AVR Device STK500 User Guide Getting Started To program the AT90S8515 connect the supplied 6 wire cable between the ISP6PIN header and the SPROG3 target ISP header as shown in Figure 2 1 Section 3 7 1 on page 3 8 describes the programming cable connections Connect a serial cable to the connector marked RS232 CTRL on the evaluation board to a COM port on the PC as shown in Figure 2 2 Install AVR Studio software on the PC Instructions on how to install and use AVR Studio are given in Section 5 on page 5 1 When AVR Studio is started the program will automatically detect to which COM port the STK500 is connected 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 Stud
15. 1 Hardware Description 3 9 1 3 10 3 22 Signal Descriptions Prog Ctrl and Prog Data Headers Figure 3 35 Expansion Connector 1 Pinout GND 1 2 GND AUXI1 3 4 DATA7 5 6 DATA6 DATAS 7 8 DATA4 DATAS 9 10 DATA2 DATA1 11 12 DATAO SI 13 14 SO SCK 15 16 CS XTi 7 18 2 VTG 19 20 VTG GND 21 22 GND PB7 23 24 6 PB5 5 26 PB4 PB3 27 28 PB2 PB1 29 30 PBO PD7 31 32 6 PD5 33 34 4 PD3 35 36 2 PD1 37 38 PDO GND 39 40 GND The signals AUXI1 AUXIO AUXO1 and AUXOO are intended for future use Do not connect these signals to your application The DATA 7 0 and CT 7 1 signals are also found on the Prog Data and Prog Ctrl con nectors These signals and connectors are explained in Section 3 10 on page 3 22 The BSEL2 signal is the same as that found on the BSEL2 jumper This jumper is explained in paragraph 3 8 5 on page 3 20 The SI SO SCK and CS signals are connected to the DataFlash Use of the DataFlash is described in paragraph 3 6 on page 3 5 NC means that this pin is not connected The remaining signals are equal to those found on the PORT connectors explained in Section 3 4 on page 3 3 Note DATA CT and AUX signals are based on 5V CMOS logic No voltage conver sion to adapt to VTG is done on these signals 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
16. 487 2600 Europe Atmel SarL Route des Arsenaux 41 Casa Postale 80 CH 1705 Fribourg Switzerland TEL 41 26 426 5555 FAX 41 26 426 5500 Asia Atmel Asia Ltd Room 1219 Chinachem Golden Plaza 77 Mody Road Tsimhatsui East Kowloon Hong Kong TEL 852 2721 9778 FAX 852 2722 1369 Japan Atmel Japan K K 9F Tonetsu Shinkawa Bldg 1 24 8 Shinkawa Chuo ku Tokyo 104 0033 Japan TEL 81 3 3523 3551 FAX 81 3 3523 7581 Atmel Corporation 2001 Atmel Product Operations Atmel Colorado Springs 1150 E Cheyenne Min Blvd Colorado Springs CO 80906 TEL 719 576 3300 FAX 719 540 1759 Atmel Grenoble Avenue de Rochepleine BP 123 38521 Saint Egreve Cedex France TEL 33 4 7658 3000 FAX 33 4 7658 3480 Atmel Heilbronn Theresienstrasse 2 POB 3535 D 74025 Heilbronn Germany TEL 49 71 31 67 25 4 FAX 49 71 31 67 24 23 Atmel Nantes La Chantrerie BP 70602 44306 Nantes Cedex 3 France TEL 33 0 2 40 18 18 18 FAX 33 0 2 40 18 19 60 Atmel Rousset Zone Industrielle 13106 Rousset Cedex France TEL 33 4 4253 6000 FAX 33 4 4253 6001 Atmel Smart Card ICs Scottish Enterprise Technology Park East Kilbride Scotland G75 OQR TEL 44 1355 357 000 FAX 44 1355 242 743 e mail literature atmel com Web Site http www atmel com Atmel Corporation makes no warranty for the use of its products other than those expressly contained in the Company s standard warranty which is detailed in Atmel s
17. AVR STK500 User Guide AMEL T Table of Contents Section 1 1 1 1 Starter Kit Features ert levels eed ed ber Eee 1 1 1 2 Device Support sind tette edet rien dua Musset 1 2 Section 2 Getting Started es De 2 1 2 1 Unpacking the System usure 2 1 2 2 System Requirements enne nnns 2 1 2 3 QUICK 2 1 2 3 1 Connecting the Hardware 2 2 2 3 2 Programming the Target AVR Device ssseeee 2 3 Section 3 Hardware DescripliOns 55 2 4 50 9 89 cuia rias pen a adis poti edi a r dnd 3 1 3 1 Description of User LEDs 3 1 3 2 Description of User Switches 3 2 3 3 Connection of LEDs and Switches 3 3 3 4 Port Gonneclors ecc ter UI RR Sada RH RUBER es 3 3 3 5 Description of User RS 232 Interface ssssssssssssssse 3 4 3 6 Description of DataFlash Pins 3 5 3 Target Socket Section 3 7 3 7 1 ISP l tad ects ee tee etg eae tpe tee 3 8 3 7 2 High voltage Programming 3 10 3 9 Jumiper Settings ce ep ER DDR a ees 3 13 3 8 1 Target Voc Settings VTARGET sssssssee e 3 14 3 8 2 Analog Reference Voltage AREF sesssee 3 15 3 8 3 Reset Settings RESET ssssssssssssseeeeeee 3 16 3 8 4 Clock Settings XTAL1 and OSCSEL eee 3 18 3 9 5 uBSELE24 mper aua damn deste ed eria diee 3 20 3 8 6 IPJUMP cri erre ten net ae fae
18. Input HEX File C usens tk5005E amples E eprom hex E Program Verify Read AIMEL STK500 User Guide 5 3 1 4 EEPROM 5 3 2 Fuses Settings STK500 User Guide Using AVR Studio If the STK500 user interface is opened without a project loaded in AVR Studio the Use Current Simulator Emulator EEPROM Memory option will be grayed out When a project is open this option allows programming of the EEPROM memory content cur rently present in the EEPROM Memory view For more information about AVR Studio memory views please take a look in the AVR Studio Help file If no project is running or the source code is stored in a separate hex file select the Input HEX File option Browse to the correct file by pressing the m button or type the complete path and filename in the text field The selected file must be in Intel hex for mat or extended Intel hex format 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 to the device Checking one of these check boxes indicates that this fuse should be enabled pro grammed which means writing a 0 to the fuse location in the actual device Note that the selected fuse setting is not affected b
19. N AIMEL 3 9 Hardware Description 3 7 2 High voltage Programming It is not necessary to remove the 6 wire cable from its ISP position while running a pro gram in the AVR The port pins used for ISP programming can be used for other purposes in your program For High voltage Programming a 12V programming voltage is applied to the RESET pin of the AVR device All AVR devices can be programmed with High voltage Program ming and the target device can be programmed while it is mounted in its socket Two different methods are used for High voltage Programming 8 pin parts use a serial programming interface while other parts use a parallel programming interface The pro gramming signals are routed to the correct pins of the target device using the cables supplied with STK500 Table 3 3 summarizes the programming method and special considerations when using High 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 AT90S4414 SCKT3000D3 Red 3 Connect PROG CTRL header to AT90S8515 PORTD and PROG DATA to PORTB AT90S4434 as shown in Figure 3 17 on page AT90S8535 SCKT3100A3 Red 3 3 11 ATtiny28 SCKT3500D None ATmega161 SCKT3000D3 Red 3 Parallel programming as above ATmega16 mount BSEL2 jumper Se
20. SCK e MOSI RST le e GND ISP6PIN Figure 6 2 10 pin ISP Connector Pinout 1 2 MOSI NO NC RST SCK e e GND MISO GND ISP10PIN VTG GND GND Select the device to be programmed in the same way as programming a device on the STK500 The Vec of the target application is detected by STK500 and signals are con verted into voltage levels suitable for the target system Note f the other application has its own power supply to VTG the jumper VTARGET must be removed before connecting STK500 to the other application STK500 may be damaged if the VTARGET jumper is not removed 6 1 In System Programming of an External Target System STK500 User Guide AMEL EE STK500 User Guide Section 7 Troubleshooting Guide Table 7 1 Troubleshooting Guide Problem The red power LED is not on Reason The DC power cable is not connected Solution Connect the DC power cable to the DC jack page 2 2 Wrong power supply is used Check that the power supply is of DC type 10 15V min 500 mA page 2 2 The power switch is off Turn on the power switch The preprogrammed example code does not toggle the LEDs There is no AVR device in the socket Plug the AVR device into the right socket page 2 3 The LEDs are not connected to the I O ports Connect the LEDS header to the PORTD header and the SWITCHES header to the PORTB header page 3 3
21. STK500 User Guide AIMEL 3 11 Hardware Description 3 7 2 2 3 12 Serial High voltage Programming Hardware setup for parallel High voltage Programming Switch power off Place the device to program in its socket according to Table 3 3 on page 3 10 Connect the headers PROGDATA and PORTB with the 10 wire cable Connect the headers PROGCTRL and PORTD with the 10 wire cable Mount jumper OSCSEL on pins 1 and 2 to select software controlled clock Mount jumper XTAL1 to route the oscillator signal to the device Mount jumpers VTARGET and RESET 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 that VTarget is between 4 5 and 5 5V before programming See Section 5 3 5 1 For a complete description of jumper settings see Section 3 8 Jumper Settings 6 N 35 D Note Remove the hardware setup for High voltage Programming before starting a debug session The 8 pin AVRs have too few pins to use parallel communication during High voltage Programming They use serial communication instead This means that fewer signals have to be routed Hardware setup for serial High voltage Pr
22. Terms and Conditions located on the Company s web site The Company assumes no responsibility for any errors which may appear in this document reserves the right to change devices or specifications detailed herein at any time without notice and does not make any commitment to update the information contained herein No licenses to patents or other intellectual property of Atmel are granted by the Company in connection with the sale of Atmel products expressly or by implication Atmel s products are not authorized for use as critical components in life support devices or systems Atmel AVR AVR Studio and DataFlash are registered trademarks of Atmel Printed on recycled paper Pentium is a registered trademark of Intel Corporation Windows 95 98 2000 me and Windows NT are registered trademarks of Microsoft Corporation 1925B 12 01 2M Terms and product names in this document may be trademarks of others
23. al reset system it must allow the reset line to be controlled by the master MCU reset system during programming The RESET button is discon nected if the RESET jumper is not mounted Figure 3 25 explains the RESET jumper options Figure 3 25 RESET Jumper Options On board RESET Signal Connected default The STK500 master MCU controls the RESET signal to the target AVR The RESET signal is accessible on the PORTE AUX header this pin can also be used for external RESET signal Figure 3 26 shows the internal connection of the RESET signal Figure 3 26 Internal RESET Connection RESET CIRCUIT Master MCU RESET NET Jumper PE1 RST REF GND XT2 GND VTG PORTE AUX 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 When connected to an external system there is often an external pullup resistor con nected to the reset line A typical reset connection is shown in Figure 3 27 STK500 User Guide AIMEL 3 17 Hardware Description 3 8 4 Clock Settings XTAL1 and OSCSEL Figure 3 27 External Reset Connection R 4 7 kohm RESET C 10 nF al If the external pullup resistor is too low lt 4 7 kQ STK500 will not be able to pull the RESET line low STK500 includes several clock options for the target AVR Setting the
24. de can be found in the AVR section of the Atmel web site www atmel com 1 1 Introduction 1 2 Device Support 1 2 Table 1 1 STK500 The system software currently has support for the following devices in all speed grades ATtiny11 ATtiny12 m ATtiny15 m ATtiny22 m ATtiny28 m AT90S1200 3 3 3 3 4 3 m AT90S4434 m 5 m AT90S8535 ATmega8 ATmegai6 ATmegai61 ATmega163 ATmega323 ATmega103 1 ATmegat28 Note 1 In exterial target or in STK501 Devices does not fit 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 AIMEL II STK500 User Guide AMEL 2 1 Unpacking the System 2 2 System Requirements 2 3 Quick Start STK500 User Guide Section 2 Getting Started Kit contents STK500 Starter Kit evaluation board m Cables for STK500 2 pcs 10 wire cables for I O ports and parallel mode programming 1 pc 6 wire cable for In System Programming 4 pcs 2 wire cable for UART and DataFlash connections m 9 pin RS 232 cable m DC power cable m Atmel CD ROM with datasheets and software m AT90S8515 8PC sample microcontroller The minimum hardware and software requirements are m 486 processor Pentium is recommended m 16 MB RAM m 12 MB free hard disk space AVR Studio m Windows 95 98 2000 ME and Windows NT 4
25. e Section ATmega163 SCKT3100A3 Red 3 3 8 ATmega323 Parallel programming as above AT90S2333 p AT90S4433 SCKT3200A2 Green 2 4 PJUMP jumpers See Section Use the Parallel programming as above ATmega103 STK501 Top mount BSEL2 jumper See Section ATmega128 Module 3 8 Parallel programming as above Mount PJUMP jumpers and mount ATmega8 SCK T3200A2 Greene BSEL2 terminal to PC2 See Section 8 8 5 and Section 3 8 6 AT90S2323 AT90S2343 ATtiny11 SCKT3400D1 Blue 1 ATtiny12 Serial High voltage Programming ATtiny22 ATtiny15 SCKT3600A1 Blue 1 Socket not in use in this version of N A SCKT3700A1 Blue 1 STK500 AIMEL STK500 User Guide Hardware Description 3 7 2 1 ParallelHigh voltage To use High voltage Programming the programming signal must be routed to the AVR Programming 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 Figure 3 18 Jumper Settings for High voltage Programming Device dependent EB Jumpers O See Below 1 2 p mm
26. ected target Voc must be supplied from an external 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 ee ee ee ee enm 3 gt pe 9 m 4 gt a mi 3 c o Q x x D C m 4 e Le Q o D 8 D Q i a 5 On board VTARGET supply disconnected The STK500 master MCU controls the target voltage using the internal PWM Figure 3 22 shows the internal connection of the VTARGET signal AIMEL STK500 User Guide 3 8 2 Analog Reference Voltage AREF STK500 User Guide Hardware Description Figure 3 22 VTARGET Connection VTARGET e m Jumper 10 15V Voltage regulator VTG NET ZGreen LED Note The green LED will light when there is a voltage available on the VTG NET It s impossible to use the debug or programming area of STK500 without VTG The internal VTarget has a short circuit protection If VTarget is set to be higher than 0 3V and the Master MCU measures it to be below 0 3V for a duration of 80 ms the Master MCU will shut off the VTarget and the Internal AREF When this happens the status LED will blink quickly If an external
27. ected to the I O port headers The cables should be connected directly from the port header to the LED or switch header The cable 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 3 1 Hardware Description 3 2 3 2 Description of User Switches Figure 3 2 Implementation of LEDs and LED Headers 1 2 LEDO mre LED LED2 le e LED3 LED4 e e LEDS LED6 e e LED7 GND e e VTG LEDn Note The AVR can source or sink enough current to drive an LED directly In the STK500 design a transistor with two resistors is used to give the same amount of light from the LED whatever the target voltage VTG may be and to turn off the LEDs when VTG is missing The switches connected to the debug headers are implemented as shown in Figure 3 3 Pushing 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 VTG 10K swo ioe sw2 SW NL LER SW4 swe GND O KH 5 SWn me SW ee SW3 ee SW5 ce SW7 ee VIG Note n the AVR you can enable internal pull ups on the input pins re
28. ed For example if only Program FLASH is checked when the Start button is pressed the Flash memory will be programmed with the hex file specified in the Program settings All commands depend on and use the settings given in the STK500 user interface Figure 5 7 Auto STK500 lt Program Fuses LockBits Advanced Board Auto v Erase Device v Read signature v Program FLASH Verify FLASH Read FLASH v Program EEPROM M Verify EEPROM Read EEPROM Program fuses Read fuses F Program lock bits Read lock bits M Log to file C Overwrite Append Browse FLASH contents is equal to file Programming EEPROM using block mode 100 OK Reading EEPROM using block mode 100 OK EEPROM contents differs from file Leaving programming mode OK It is possible to log the command execution to a text file by checking the Log to file check box Click on the check boxes for the commands that you want the STK500 user interface to perform A typical sequence where the device is erased and then programmed is shown in Figure 5 7 The chip is erased both memories programmed and verified and finally fuses and lock bits are programmed Once configured the same programming sequence is executed every time the Start button is pressed This reduces both work and possibilities for errors due to operational errors By clicking on the Log to file check box all out
29. emory of the master MCU 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 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 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 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 MCU is ready AIMEL STK500 User Guide AMEL STK500 User Guide Section 4 Installing AVR Studio AVR Studio with its Integrated Development Environment IDE is the ideal software for all AVR development It has an editor an assembler and a debugger and is front end for all AVR emulators and the STK500 starter kit To install 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 AV Rstudio exe file and selec
30. ibration byte Write oscillator call byte to FLASH memory addr is byte address Write oscillator call byte to EEPROM memory addr is byte address Erase device If applied with another programming parameter the device will be erased before any other programming takes place Program device FLASH f EEPROM e or both b Corresponding input files are required Read out device FLASH f EEPROM e or both b Corresponding output files are required Verify device FLASH f EEPROM e or both b Can be used with p or stand alone Corresponding input files are required Set lock byte value is an 8 bit hex value Verify lock byte value is an 8 bit hex value to verify against Read back lock byte Set fuse bytes value is a 16 bit hex value describing the settings for the upper and lower fuse Set extended fuse byte value is an 8 bit hex value describing the extend fuse settings Verify fuse bytes value is a 16 bit hex value to verify against Verify extended fuse byte value is an 8 bit hex value describing the extend fuse settings Read back fuse bytes Fill unspecified locations with a value 0x00 Oxff The default is to not program locations not specified in the input files FLASH address range Specifies the address range of operations The default is the entire FLASH Byte addresses EEPROM address range Specifies the address range of operations The default is the ent
31. ies can be modified VTARGET AREF and oscillator frequency The interface is very flexible and it is possible to force the operating conditions beyond the recommended specifications for the device Doing this is not recommended and may damage the target device The recommended operating conditions for the part are stated in the device datasheet Figure 5 6 Board STK500 lt Program Fuses LockBits Advanced Board Auto Voltages VT arget i Read Voltages 0 0 1 00 Write Voltages Oscillator 2 69 MHz Read Osc Closest Attainable Value 3 69 MHz Write Osc m Revision STK500 ver 1 0 beta Getting revisions HW 0x01 SW Major 0x01 Sw Minor 0x00 OK Getting VTARGET 5 0 OK Getting AREF 5 0 OK Getting oscillator parameters P 0x01 N 0x00 OK VTARGET controls the operating voltage for the target board Through the use of the slide bar or the text box this voltage can be regulated between 0 and 6 0V in 0 1V incre ments Please refer to the device datasheet to find the specified voltage range for the selected device Both voltages are read by pressing the Read Voltages button and written by pressing the Write Voltages button The physical connection of the VTARGET voltage is shown in Figure 3 22 on page 3 15 AREF controls the analog reference voltage for the ADC converter This setting only apply to devices with AD conver
32. io 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 device select STK500 from the Tools menu in AVR Studio Select the AVR target device from the pull down menu on the Program tab and locate the intel hex file to download Press the Erase button followed by the Program button The status LED will now turn yellow while the part is programmed and when programming succeeds the LED will turn green If programming fails the LED will turn red after programming See the troubleshooting guide in Section 7 on page 7 1 Figure 2 3 AVR Studio STK500 Programming Menu STK500 x Program Fuses LockBits Advanced Board Auto r Device ar 9058515 hM Erase Device fr Programming mode ISP Erase Device Before Programming C Parallel High Voltage Serial Verify Device After Programming r Flash se Curent Simulator Emuletor FLASH Meman Input HEX File C user Stk500 E xamples Flash hex A Program Verify Read EEPROM Use Curent Simulator emulator EERR OHM Meman Input HEX File C usens tk5005E amples E eprom hex L Program Verify Read Complete descriptions of using the STK500 interface in AVR Studio are given in Section 5 on page 5 1 AIMEL 23 Getting Started 2 4 AIMEL STK500 User Guide
33. ion of the AREF signal Figure 3 24 Internal AREF Connection AREF nud Voltage AREF regulator Jumper 12 Master wr PEO 8 PE1 MCU PE e e RST e GND le e GND lee VTG PORTE AUX The AVR Studio controlled analog reference voltage can also be used as an input to the analog comparator or for ADC measurements on the AVR AVR s AREF signal can then be connected to VTG The internal AREF has a short circuit protection If an AREF value is set up to be higher than 0 3V and the Master MCU measures it to be below 0 3V for a duration of 80 ms the master MCU will shut off the AREF When this happens the status LED will blink slowly The AREF will also be shut down by the Master MCU if a short circuit is detected on VTarget in addition to shutting down VTarget In this case the status LED will blink quickly The RESET jumper controls the RESET signal to the STK500 When ISP programming the target device in the socket the master MCU programs the AVR device without inter fering with the application When the RESET jumper is mounted the master MCU controls the RESET signal of the AVR When the RESET jumper is not mounted the AIMEL STK500 User Guide Hardware Description RESET signal is disconnected This is useful for prototype applications with an external reset system The RESET jumper must always be mounted when High voltage Programming an AVR device When using an extern
34. ire EEPROM Byte addresses Select communication port com1 to com8 If this parameter is ommitted the program will scan the comm ports for the STK500 Set target voltage VTARGET in Volts value is a floating point value between 0 0 and 6 0 describing the new voltage Set adjustable voltage AREF in Volts value is a floating point value between 0 0 and 6 0 describing the new voltage Get current target voltage VTARGET Get current adjustable voltage AREF Get revisions hardware revision h and software revision s Set oscillator frequency freq is the frequency in Hz Get oscillator frequency Silent operation AIMEL 0 Using AVR Studio 2 No progress indicator For example if piping to a file for log purposes use this option to avoid the non ascii characters used for the indicator hl Help information overrides all other settings Figure 5 9 Sample Usage Program Flash Erase before Program Name of hex File stk500 dAT90S8515 ms e pf vf iftest hex Select Device Number Verify Device Serial Programming Mode 5 10 AIMEL STK500 User Guide AMEL STK500 User Guide Section 6 In System Programming of an External Target System The STK500 can be used as a programmer to program AVR devices in other applica tions There are two different ISP connector pinouts available a 6 pin and a 10 pin version Both are supported by STK500 Figure 6 1 6 pin ISP Connector Pinout 1 2 MISO m VTG
35. ives shortest start up time for the microcontroller For details of start up time see AIMEL STK500 User Guide Hardware Description the datasheet for the AVR microcontroller For an explanation of clock source fuses con figuration see Section 5 3 2 on page 5 3 Not all AVR devices have fuses for selection between using a crystal or oscillator 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 Jumper mounted on pins 1 and 2 On board software clock signal connected default Jumper mounted on pins 2 and 3 HHH On board crystal signal connected Jumper not mounted On board XTAL1 signal disconnected When programming AVR in High voltage Programming mode OSCSEL should be mounted on pins 1 and 2 to give the master MCU control of the target clock This is explained in detail in paragraph 3 7 2 on page 3 10 Note In a real application with only one AVR connected to the crystal there is no need for an external oscillator circuit The STK500 has eight different AVR sockets connected to the same clock system The long signal lines in this sys tem makes it difficult to drive a crystal with the On chip Oscillators on the AVR The oscillator on STK500 is designed to operate on all ta
36. jumpers XTAL1 and OSCSEL controls the clock selections OSCSEL determines 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 Jumper Options mms bum mum mom ee ke a eee eet x gt in um mime mita un mm mm em mdi un m i i On board XTAL1 Signal Disconnected When the XTAL1 jumper is not mounted an external clock source or crystal can be con nected to the PORTE header This is shown in Figure 3 30 When the XTAL1 jumper is mounted the STK500 internal clock system is used as main clock to the target AVR The internal clock system can either use a crystal in the on board crystal socket or a software generated clock from the master MCU The fre quency of the software generated clock can be set from 0 to 3 68 MHz The default value is 3 68 MHz Section 5 3 5 3 on page 5 6 explains how to set the clock frequency from AVR Studio When using the STK500 software generated clock system as main clock the target AVR microcontroller fuses should be configured for external clock as clock source This g
37. mode OK Entering programming mode OK Reading signature Ox1E 0x94 0x02 OK Leaving programming mode OK ha The oscillator calibration byte is written to the device during manufacturing and cannot be erased or altered by the user The calibration byte is a tuning value that should be written to the OSCCAL register in order to tune the internal RC oscillator By pressing the Read Cal Byte button the calibration value is read from the device and is shown in the Value text box Note that the calibration byte is not directly acces sible during program execution and must be written to a memory location during programming if it shall be used by the program If this option is grayed out the selected device does not have a tunable internal RC oscillator 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 byte is then written to the memory indicated by the Flash and Eeprom radio buttons AIMEL 5 5 STK500 User Guide Using AVR Studio 5 3 5 5 3 5 1 5 3 5 2 5 3 5 3 5 6 Board Settings VTARGET AREF Oscillator The Board tab allows the changing of operating conditions on the STK500 develop ment board The following propert
38. moving the need for an external pull up on the push button In the STK500 design we have added an external 10K pull up to give all users a logical 1 on SWn when the push button is not pressed The 150R resistor limits the current going into the AVR AIMEL tt tt STK500 User Guide Hardware Description 3 3 Connection of Figure 3 4 Connection of LEDs and Switches to I O Port Headers LEDs and Switches Any I O port of the AVR can be connected to the LEDs and switches using the 10 wire cables The headers are supplied with VTG target Voc 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 1 2 PxO Pxi Px2 ee Px3 Px4 ee Px5 Px6 ee Px7 GND ee VTG PORTx The PORTE AUX header has some special signals and functions in addition to the PORTE pins The pinout of this header shown in Figure 3 6 Figure 3 6 Pinout of Port E Header PEO m e PE1 PE2 e e RST REF e e GND XT ee XT2 GND e VTG PORTE AUX STK500 User Guide AIMEL 3 3 Hardware Description 3 5 3 4 Description of User RS 232 Interface The special functions of this port are PEO PE2 Table 3 1 Port E Connection ATmega161 AT90S4414 AT90S8515 PEO PEO ICP INT2 ICP PE1 PE1 ALE ALE PE2 PE2 OC1B OC1B REF Analog
39. ogramming is as follows 1 Switch power off Place the device to program in its socket according to Table 3 3 on page 3 10 Mount jumper OSCSEL on pins 1 and 2 to select software controlled clock Mount jumper XTAL1 to route the oscillator signal to the device Mount jumpers VTARGET and RESET 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 connect the PBO and PB2 pins pins 4 and 3 on the SPROG1 header to the DATAO and DATA2 pins pins 1 and 3 on the PROG DATA header 9 Use the last 2 wire cable to connect the PB1 pin pin 1 on the SPROG1 header to the DATA1 pin pin 2 on the PROG DATA header 10 Switch power on and you are ready to program All connections are shown in Figure 3 19 og PROIN AIMEL STK500 User Guide 3 8 Jumper Settings STK500 User Guide Hardware Description Figure 3 19 Connection for Serial High voltage Programming A master MCU and eight jumpers control the hardware settings of the starter kit During normal operation these jumpers should be mounted in the default position To configure the starter kit for advanced use the jumpers can be removed or set to new
40. on Connectors STK500 User Guide Hardware Description STK500 has two expansion connectors one on each side of the programming 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 Figure 3 35 Figure 3 33 Expansion Headers Expansion Header 0 Prog Ctrl me x lee e000000000000000000R 5 l0 000000000000000000 9 i ee t ee ne lee ee Be em TIE BRENNEN lee lee p cnin T 6 X ee jee jee me Be jee jee ne ee veccc00000000000000R lee 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 6 ee 4 Expansion Header 1 Prog Data Figure 3 34 Expansion Connector 0 Pinout GND 1 2 GND AUXIO 3 4 AUXOO CT7 5 6 CT6 CT5 7 8 CT4 CT3 9 10 CT2 CTI 11 12 BSEL2 NC 13 14 REF RST 15 16 PE2 PE1 17 18 PEO GND 19 20 GND VTG 21 22 VTG PC7 23 24 PC6 PC5 25 26 4 PC3 27 288 2 PC1 29 30 PCO PA7 31 32 PAG PA5 33 34 44 PAS 35 36 2 PA1 37 38 0 GND 39 40 GND AIMEL 3 2
41. ough a complete chip erase on the device is performed Figure 5 4 Lock Bits STK500 x Program Fuses LockBits Advanced Board Auto Mode 1 No memory lock features enabled Mode 2 Further programming disabled F Made 3 Further programming and verification disabled Setting device parameters parallel programming mode OK Entering programming mode OK Reading lock bits OxF9 OK Leaving programming mode OK 5 4 AIMEL STK500 User Guide 5 3 4 5 3 4 1 5 3 4 2 5 3 4 3 5 3 4 4 Advanced Settings Signature Bytes Oscillator Calibration Byte Reading Oscillator Calibration Byte Writing Oscillator Calibration Byte Using AVR Studio The Advanced tab is currently divided into two subgroups By pressing the Read Signature button the signature bytes are read from the target device The signature bytes act like an identifier for the part After reading the signature the software will check if it is the correct signature according to the choosen device Please refer to the AVR datasheets to read more about signature bytes Figure 5 5 Advanced Program Fuses LockBits Advanced Board Auto r Signature Bytes oxi E 0x94 0x02 Signature matches selected device r Oscillator Calibration byte Write Address Read Cal Byte C Flash Eeprom Write to Memory Value ox Setting device parameters serial programming
42. positions The jumper settings and usage are explained in the following section The default set ting of the jumpers are shown in Figure 3 20 Figure 3 20 Default Jumper Setting AMEL Hs AVR Bre 9 E 9 m 9 fo m v 5 c Uv AIMEL 3 13 Hardware Description 3 8 1 3 14 Target Vc Settings VTARGET 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 for High voltage Programming of ATmega8 ATmega16 ATmega161 ATmega163 ATmega128 and ATmega323 PJUMP Unmounted Used for High voltage Programming of AT90S2333 AT90S4433 and ATmega8 VTARGET controls the supply voltage to the target AVR microcontroller sockets It can either be controlled from AVR Studio or supplied from an external source If the VTAR GET jumper is mounted the On board supply voltage is connected The On board supply voltage can be adjusted to 0 6V from AVR Studio Always verify the respective datasheet for the AVR device operating voltage before adjusting VTARGET voltage Using the On board supply voltage approximately 0 5A can be delivered to the target section See Appendix A in Section 10 If the VTARGET jumper is disconn
43. put 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 be viewed and edited using a text editor AIMEL Using AVR Studio 5 3 7 5 4 5 5 5 8 History Window Command Line Software Parameters The History window is located at the bottom of the STK500 view In this window the dia log between AVR Studio and STK500 is shown For every new command performed the old dialog is replaced with the new one Figure 5 8 History Window STK500 Program Fuses LockBits Advanced Board Auto Device 9058515 h Erase Device r Programming mode S v Erase Device Before Programming Parallel High Voltage Serial M Verify Device After Programming r Flash C se curent Simulator Emuletor FLASH Memory Input HEX File Juser Stk500 T est programs flashcontents hex a EEPROM C se Curent Simulator Emuletor EEPROM Mema Input HEX File Program Verif Read Erasing device OK Programming FLASH using block mode 100 OK Reading FLASH using block mode 100 OK FLASH contents is equal to file OK Leaving programming mode OK 4 The DOS command line version of the 57 4500 software is useful for programming STK500 from external editors or for use in production programmers
44. ramming 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 If the STK500 user interface is opened without a project loaded in AVR Studio the Use Current Simulator Emulator FLASH Memory option will be grayed out When a project is open this option allows programming of the Flash memory content currently present in the Flash Memory view of AVR Studio For more information about AVR Studio mem ory views please take a look in the AVR Studio Help file If no project is running or the source code is stored in a separate hex file select the Input HEX File option Browse to the correct file by pressing the M button or type the complete path and filename in the text field The selected file must be in Intel hex for mat or extended Intel hex format Figure 5 2 Program STK500 Program Fuses LockBits Advanced Board Auto Device ar 9058515 Erase Device r Programming mode ISP v Erase Device Before Programming C Parallel High Voltage Serial v Verify Device After Programming r Flash Use Curent Simulator emulator FLASH Menon Input HEX File C user Stk500 E xamples Flash hex s Program Verify Read m EEPROM se Curent Simulator Emuletor EEPROM Mema
45. ramming interface is placed on different pins from part to part three programming headers are used to route the programming signals to the correct pins A 6 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 When programming parts in the green socket use the green SPROG2 target ISP header And when programming parts in the red sockets use the red SPROGS target ISP header Table 3 2 shows which Socket suits which AVR device and which SPROG target ISP header to use for ISP programming The 6 wire cables should be connected directly from the ISP6PIN header to the correct SPROG target ISP header The cable should not be twisted A colored wire on the cable indicates pin 1 Confirm that this is connected to pin 1 on each of the headers When programming 8 pin devices note the following Pin 1 is used both as RESET and as PB5 on some devices ATtiny11 ATtiny12 and ATtiny15 Pin 1 on the 8 pin sockets SCKT3400D1 and SCKT3400D1 are connected to PB5 The RESET signal used during ISP programming is therefore not connected to pin 1 on these sockets This signal must be connected by placing a wire between
46. reference voltage This pin is connected to the AREF pin on devices having a separate analog reference pin XTAL 1 pin The internal main clock signal to all sockets If the XTAL1 jumper is disconnected this pin can be used as external clock signal XT2 XTAL 2 pin If the XTAL1 jumper is disconnected 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 1 2 swo me SW SW2 lee SW3 SW4 le e SW5 SW6 8 e SW7 GND e VTG SWITCHES Figure 3 8 Pinout of the LED Header LEDO LED1 LED2 LED3 LED4 LED5 LED6 LED7 GND VTG LEDS The STK500 includes two RS 232 ports One RS 232 port is used for communication with AVR Studio The other RS 232 can be used for communication between the target AVR microcontroller in the socket and a PC serial port connected to the RS 232 To use the RS 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
47. rget voltages from 1 8 to 6 0V STK500 User Guide AIMEL 3 19 Hardware Description 3 8 5 3 8 6 3 20 BSEL2 Jumper PJUMP Jumpers Figure 3 30 XTAL1 and OSCSEL Connections Oscillator 5V VTG OSCSEL IVLSAHO XTAL1 NET Jumper Jumper 12 PEO 8 1 PE2 e e RST ee GND e X12 GND e e VTG PORTE Voltage converter AVR MASTER Studio MCU The BSEL2 jumper connects the Byte Select 2 signal for High voltage Programming of ATmega8 ATmega16 ATmega161 ATmega163 ATmega128 and ATmega323 The BSEL2 jumper should only be mounted when High voltage Programming ATmega16 ATmegat61 ATmega163 ATmega128 or ATmega323 When using ATmega8 con nect the right BSEL2 pin to PC2 in the target area See Figure 3 31 For descriptions of the Byte Select 2 signal see the programming section of the corresponding parts datasheet Figure 3 31 BSEL2 Connection for ATmega8 The PJUMP jumpers route the programming pin of 79052333 479054433 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 Programming of other parts and ISP programming these jumpers should not be mounted Figure 3 32 PJUMP Jumpers Placement Correct Jumper Placement Not Correct AIMEL STK500 User Guide 3 9 Expansi
48. rogramming The part inserted in the socket can be programmed in the system from AVR Studio with two different methods 1 AVR In System Programming ISP running at the parts normal supply voltage 2 High voltage Programming where the supply voltage is always 5 volts Four general nets VTARGET RESET XTAL1 and AREF can be connected to the Socket section The following sections describe how to use both programming methods For instructions on using the AVR Studio programming software see Section 5 Using AVR Studio on page 5 1 In System Programming uses the AVR internal SPI Serial Peripheral Interface to download code into the Flash and EEPROM memory of the AVR ISP programming requires only Vcc GND RESET and three signal lines for programming All AVR devices except AT90C8534 ATtiny11 and ATtiny28 can be ISP programmed The AVR can be programmed at the normal operating voltage normally 2 7 6 0V No high volt age signals are required The ISP programmer can program both the internal Flash and EEPROM It also programs fuse bits for selecting clock options start up time and inter nal Brown out Detector BOD for most devices High voltage programming can also program devices that are not supported by ISP pro gramming Some devices require High voltage Programming for programming certain fuse bits See the High voltage Programming section on page 3 10 for instructions on how to use High voltage Programming Because the prog
49. schematic of the RS 232 connection is shown in Figure 3 10 AIMEL STK500 User Guide 3 6 Description of DataFlash Pins STK500 User Guide Hardware Description Figure 3 9 Connection of I O Pins to UART VIG 5V 5V I 2 Voltage MAX202CSE Tine converter An AT45D021 2 Mbit DataFlash is included on the STK500 for nonvolatile data storage A DataFlash is a high density Flash memory with SPI serial interface A detailed datasheet of the DataFlash can be obtained from the Flash memory section of the Atmel CD ROM or from the Atmel Web site The DataFlash can be connected to the I O pins of the microcontroller sockets The 4 pin header marked DATAFLASH can be used for connecting the SPI interface of the DataFlash to 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 in Figure 3 14 for connection of the DataFlash to the AVR hardware SPI interface The SPI interface pinout is shown in Figure 3 11 and Figure 3 12 ATMEL Hardware Description Figure 3 11 PORTB SPI Pinout 40 pin Parts 1 2 PBO PB1 PB2 PB3 SS PB4 PB5 MOSI MISO PB6 PB7 SCK GND VTG Figure 3 12 PORTB SPI Pino
50. t 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 guide you through the setup process Note AVR Studio version 3 2 or higher is required for STK500 support 4 1 Installing AVR Studio 4 2 AIMEL STK500 User Guide AMEL Section 5 Using AVR Studio In this section the supporting software for STK500 will be presented and an in depth 5 1 Windows Software description of the available programming options is given The software used for communicating with the STK500 development board is included 5 2 Starting the Windows Software 5 2 1 Starting STK500 STK500 User Guide 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 Pressing the AVR button on the AVR Studio toolbar will start the STK500 user inter face as shown in Figure 5 1 Figure 5 1 AVR Studio with STK500 User Interface AVR Studio 5 x File Project View Tools Help its Eres e fen 7 STK500 Program Fuses LockBits
51. ter 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 Both VTARGET and AREF are read by pressing the Read Voltages button and written by pressing the Write Voltages button It is not possible to set AREF to a higher voltage than VTARGET because this will per manently damage the AVR The physical connection of the AREF voltage is shown in Figure 3 24 on page 3 16 The STK500 development board uses a programmable oscillator circuit that offers a wide range of frequencies for the target device AIMEL STK500 User Guide 5 3 6 Auto Settings 5 3 6 1 Setting Up the System for Auto programming 5 3 6 2 Logging the Auto programming to a File STK500 User Guide Using AVR Studio Since it is not possible to generate an unlimited number of frequencies the STK500 user interface will calculate the value closest to the value written to the oscillator text box The calculated value is then presented in the oscillator text box overwriting the previously written number 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 check
52. ter eoru 3 20 3 9 Expansion Connectors enne 3 21 3 9 1 Signal Descriptions 3 22 3 10 Prog Ctrl and Prog 3 22 3 11 Miscellaneous anale Dade ee o sede ibo Lon ded us quada 3 24 3 11 1 RESET Push Button ris im nantes tnt tn tt te 3 24 3 11 2 PROGRAM Push Button sssssssssssseeeeen nennen 3 24 AIMEL Table of Contents 3 11 3 Main Power LED cete ode dob ee cede ee dva 3 24 3 11 4 Target Power LED ueteri HE entes 3 24 3115 Status BED uii Eo RU RI d etd 3 24 Section 4 Installing AVIS SIUGID 23er m SRE RAT rec nea nie 4 1 Section 5 Using AVR SUIGIO diit ri etd ca ens deli c e Ri PEOR TER NR RAE Qe EE UA D M Fe 5 1 5 1 Windows Software ssssssssssssssssseseeeeene eene nnn 5 1 5 2 Starting the Windows Software 5 1 5 2 1 Starting STK500 nde eee idc Ee bte eee du 5 1 5 3 STK500 5 2 5 3 1 Program 5 2 5 3 2 FOSIS OGM Senna eid ipea e ebat ie Ua Dot Uode Pc 5 3 5 3 3 LockBits Settings n LAT es 5 4 5 3 4 Advanced Settings 5 5 5 3 5 Board Setlings io teen 5 6 5 3 6 Auto Settings tede e en a ie canned Edo ee ee peius 5 7 53 7 History MIndOW sites at te E RE Et nea 5 8 5 4 Command Line Software 4 enne 5 8 55 5 8 Section 6 In System Programming of an External Target System 6 1 Section 7 Troubleshooting Guide AN aded el od eue 7 1 Section 8 Technical
53. ut 28 pin Analog Parts 1 2 PBO M e 1 SS PB2 e PB3 MOSI MISO PB4 eg e PB5 SCK PB6 le e PB7 GND e e VTG Figure 3 13 Connection of I O Pins to DataFlash for AT90S8515 3 6 AIMEL STK500 User Guide Hardware Description Figure 3 14 Schematic of DataFlash Connections VTG 5V 5V Voltage AT45D021 converter DataFlash The programming module consists of the eight sockets in the white area in the middle of 3 7 Target Socket Section STK500 User Guide the starter kit In these sockets the target AVR devices can be inserted for programming and used in the application Note Only one AVR device should be inserted in the sockets at a time The AVR Flash memory is guaranteed to be correct after 1 000 programming opera tions the typical lifetime of the Flash memory is much longer Note When inserting a device in the socket notice the orientation of the device The notch 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 6 0 00 00 00 00 0 660 6 0 0 0 0 0 0 0 0 0 6 0 0 0 6 6 AIMEL 3s Hardware Description 3 7 1 3 8 ISP P
54. y erasing the device with a chip erase cycle i e pressing Chip Erase button in the Program settings Detailed information on what fuses are available in the different programming modes and their functions can be found in the appropriate device datasheet Figure 5 3 Fuses STK500 X Program Fuses LockBits Advanced Board Auto Serial program downloading SPI enabled Short start up time selected Setting device parameters parallel programming mode OK Entering programming mode OK Reading fuses OxFFDF OK Leaving programming mode OK AIMEL 5 3 Using AVR Studio 5 3 3 LockBits Settings Similar to the Fuses tab the LockBits tab shows which lock modes are applicable to the selected device All lock bits are accessible in both ISP and High voltage Program ming A lock mode may consist of a combination of setting multiple Lock bits This is handled by the STK500 user interface and the correct lock bits are programmed auto matically for the selected lock mode Once a Lock mode protection level is enabled it is not possible to lower the protection level by selecting a lower degree of protection 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 th
Download Pdf Manuals
Related Search
Related Contents
TV-DARTS - 商品・サービスについて Q&Aをさがす Garmin gtn 625 GPS Receiver User Manual M201 Rotary Gas Meter Tester MAVIG X 線防護板 Manual Organismos Ing. Propios - Sistema de Acceso Único a TLA EQ1 manual - fra www.interstage.dk カタログPDF Copyright © All rights reserved.
Failed to retrieve file