Home

AVR Butterfly Evaluation Kit - User Guide

image

Contents

1. _ IL 8 ano 888 RERRRRER BS rara 113484 AST amp 5015 HLX A9T NOOT ZOTO szotvtz w a 22A la lu d B BS ano A9T NOOT 290 A91 NOOT pL z xosueg j 8 L 9 s Figure 7 1 Schematics 1 of 4 AVR Butterfly User Guide AIMEL 4271C AVR 04 05 34 Figure 7 2 Schematics 2 of 4 9 5 E z Ripreians WAN zooor E 7000 7 060 qumu 3ueunooq ano gt ho da aiios INET X00 0029 7 SLOL 6L exjseA t sason T t T GaINAOA gt TUR SENNA amp SLVBOR 0029 22A
2. 064 STK502 A temperature monitoring system with LCD output Or program the applica tion that comes with the AVR Butterfly 27 4271C AVR 04 05 4271C AVR 04 05 AMEL AVR Butterfly User Guide Section 5 Technical Specifications System Unit Physical Dimension E 45 x 67 x 14 mm 28 9 Operation Conditions Em 0 C 50 If using external 3 1V 4 5V Temperature measurement emen 1 Voltage reading 0 1V 29 4271C AVR 04 05 sensores 4271C AVR 04 05 AMEL AVR Butterfly User Guide Section 6 Technical Support For Technical support please contact avr atmel com When requesting technical sup port please include the following information B Which target AVR device is used complete part number B Target voltage and speed B Clock source and fuse setting of the AVR B Programming method B Hardware revisions of the AVR tools found on the PCB B Version number of AVR Studio This can be found in the AVR Studio help menu B PC operating system and version build PC processor type and speed A detailed description of the problem 31 4271C AVR 04 05 4271C AVR 04 05 AMEL Section 7 Schematics On the following pages the complete schematics and assembly drawing of the AVR Bu
3. 169 on the AVR Butterfly it can also be accessed externally through the ISP connector Note f the DataFlash is to be accessed externally the ATmega169 on the AVR But terfly must be set to disable its own SPI interface to avoid contention on the interface Figure 3 19 DataFlash Figure 3 20 DataFlash Schematic PDIT 0 AVR Butterfly User Guide C C200 100N 16V X7R AT45DB041B SC 2 5 GND AIMEL 4271 04 05 3 10 Piezo element 3 11 Battery 26 4271C AVR 04 05 A piezo element is used to be able to play sounds on the AVR Butterfly The piezo is connected to 5 on the ATmega169 And using the PWM can get the differ ent frequencies required to play tunes Figure 3 21 Piezo Element 2450 Nominal Voltage 3 0 Volts Nominal Capacity 550 mAh 90 2 mA Discharge Current 23 Standard Discharge Current 0 2 mAh Maximum recommended current under continuous discharge 3 mA Maximum recommended current under pulse discharge 15 mA Note NOT recharge short circuit disassemble deform heat or place the battery near a direct flame This battery containsflammable materials such as lithium and organic solvent and performing any of the above actions could cause it to ignite explode or become damaged The battery is protected by a schottky diode this will prevent recharging of the battery if external power is applied t
4. 50 Selftest Plugin Manager Workspace Show Key assignments Lcd STKSOD AYRISP ITAG ICE A jump to the boot section can be done from the application Options gt Boot loader gt Jump to Bootloader see Figure 2 2 or just reset the ATmega169 by shortcut pin 5 and 6 on J403 the ISP connector after a reset the ATmega169 will start in the boot section See Figure 3 3 for the pinout of the ISP connector Nothing will be dis played on the LCD while in boot section Press and hold the joystick in the ENTER modus while starting AVR Prog When AVR Prog starts release the joystick Find the hex file you want to program with the Browse button and press Program See that Erasing Device Programing and Verifying goes this is done automatically After upgrading the application press the Exit button in AVR Prog in order to leave programming mode in the ATmega169 bootloader AMEL 4 4271 04 05 Figure 2 4 AVR Prog 2 4 2 Jump to the 2 4 3 Fuses and Lock Bits For the firmware to operate correctly these fuses and lock bits on the ATmega169 22 Hex file C user AVR Butterfly hex Browse Exit Erasing Device Programming Verifying OK Flash Verify Read EEPROM Program Verify Read Advanced Device ATmegal6 BOOT From the Boot Section a jump to the application is done by pre
5. 1 IQD32 768KHZ XC201 32 768kHz IQD Crystals si 1 ISP CONNECTOR J403 SCOTT ELECT NOT MOUNTED 1 KEY 3008 TR J404 KEYSTONE 40 AIMEL AVR Butterfly User Guide 4271C AVR 04 05 Table 7 1 Bill Of Material Continued Used Part Type Designator Value Manufacturer Design specific 1 NCP18WF104JO3RB R211 100K MURATA 5 1 NSL 19M51 R213 SILONEX 3 1 PH 2 54 2X1 J407 SCOTT ELECT NOT MOUNTED 1 PH 2 54 3X1 J406 SCOTT ELECT NOT MOUNTED 1 2 54 4X1 J405 SCOTT ELECT NOT MOUNTED 3 PH 2 54 5X2 J400 J401 SCOTT ELECT NOT MOUNTED J402 1 SKRHABE010 200 ALPS 1 1603 200 KINGSTATE 2 VC080514A300 R300 R301 1 0562246 500 AVR Butterfly User Guide AMEL 41 4271C AVR 04 05 Atmel Corporation Atmel Operations 2325 Orchard Parkway Memory RF Automotive San Jose CA 95131 USA 2325 Orchard Parkway Theresienstrasse 2 Tel 1 408 441 0311 San Jose CA 95131 USA Postfach 3535 Fax 1 408 487 2600 Tel 1 408 441 0311 74025 Heilbronn Germany Fax 1 408 436 4314 Tel 49 71 31 67 0 49 71 31 67 2340 Regional Headquarters Microcontrollers Europe 2325 Orchard Parkway 1150 East Cheyenne Mtn Blvd Atmel Sarl San Jose CA 95131 USA Colorado Springs CO 80906 USA Route des Arsenaux 41 Tel 1 408 441 0311 Tel 1 719 576 3300 Case Postale 80 Fax 1 408 436 4314 Fax 1 719 540 1759 CH 1705 Fribour Switzerland La Chantrerie Biometrics Imaging
6. d CaLNNOW LON eseur LON 6 Lad 0905 10658 8 L GEINDOH 90771809 fr EN 9 oa ar z T Lawn cor qoi bo T CaLNNOW LON 909r NLC eui ilaa gt eua 7 78188 25A GGINDOR I X v vS Z v GEINDOH LON 481 AST moor sasay gt Ison xos 20A CHINA d z ano HLX AST NOOT 6d 1 8 L VIOT 2079 9 6 Z SIGOT Tore 20A Em umi KE 2 i AH3 _ 2 ls HINNO ano 0 04 T N Xl axon NOOT 194 8 ra 0072 sad 9 5 pud lis Y E Te 0097 IxT oon 22 s 4 E s E 37 AMEL AVR Butterfly User Guide 4271C AVR 04 05 Figure 7 5 Assembly Drawing Top Side J3dIS 01 093 J3dIS 01 A 55 ganas T pls O c c a SoH gH Can EJ Lue BSTHW XAY TEWL
7. telaor 35 EL A AVR Butterfly User Guide 4271C AVR 04 05 Figure 7 3 Schematics 3 of 4 E a IHE 4 N ii ale 413 ABBE g 8 ne s a z 78 24 bo ale B 2 401 6 4 8 5 4271C AVR 04 05 Figure 7 4 Schematics 4 of 4 8 4 5 z UAW TILIL fuors racy f zequnu aueunsoa 69 81 80 007 qea 6T METIZE 104 464 91389A y GEINDOR IX YvS tHd Er AMT NOOT 5075 SEA aapear e Love lt
8. PB6 PB7 PD6 PD7 GND VCC_EXT GND VCC_EXT PORTB PORTD Note When the AVR Butterfly is configured in High voltage Parallel Programming mode the JTAG interface will not work neither will the external crystal causing the pre programmed application that comes with the AVR Butterfly to not oper ate correctly AMEL AVR Butterfly User Guide Note More information about the STK500 be found the STK500 User Guide which is available at the Atmel web site www atmel com See the STK500 User Guide for information on how to use the STK500 front end software in High volt age Programming mode 3 3 JTAG Figure 3 8 shows how to connect the JTAG ICE probe to the AVR Butterfly Figure 3 8 JTAG connector Note The JTAG connector must be mounted on the back side of the AVR Butterfly The JTAG connector is used for the ATmega169 built in JTAG interface The pinout of the connector is shown in Figure 3 9 and is compliant with the pin out of the JTAG ICE available from Atmel Connecting a JTAG ICE to this connector allows On chip Debug ging of the ATmega169 More information about the JTAG ICE and the On chip Debugging can be found in the AVR JTAG ICE User Guide which is available at the Atmel web site www atmel com Note Pin 7 NC VCO is the Vsupply pin for the JTAG This pin is not connected because the JTAG would draw power from the battery on the AVR Butterfly Pin 8 NC BS2 and the pin 10 GND XTAL1 can be modified s
9. Butterfly has an on board level converter for the RS 232 interface This means that no external hardware is required to reprogram the AVR Butterfly using the self pro gramming feature in the ATmega169 Figure 3 17 shows how to connect a serial cable to the AVR Butterfly The integrated RS232 level converter operates down to 2 0V sup ply voltage AMEL 4271 04 05 Table 3 1 AVR Butterfly UART COM2 Pin 1 RXD Pin 3 Pin 2 TXD Pin 2 Pin 3 GND Pin 5 Figure 3 17 UART Connector 3 8 USI The AVR Butterfly has connections for the USI interface Figure 3 18 shows the pin out for the USI Through the USI interface other modules can be connected and the AVR Butterfly can serve as a top module card Figure 3 18 USI Connector ie e 9 es MEL AVR Butterfly User Guide 24 4271 04 05 3 9 External DataFlash Table 3 2 USI AVR Butterfly USI Pin 1 USCK SCL Pin 2 DI SDA Pin 3 DO Pin 4 GND An external dataflash is provided with the AVR Butterfly This is the 4 megabit serial DataFlash from Atmel type AT45DB041B More information about the DataFlash can be found in the datasheet available at the Atmel web site http www atmel com products DataFlash The DataFlash is connected to the SPI interface This means that in addition to commu nicate with the
10. Hi Rel MPU Tel 41 26 426 5555 BP 70602 High Speed Converters RF Datacom Fax 41 26 426 5500 44306 Nantes Cedex 3 France Avenue de Rochepleine Tel 33 2 40 18 18 18 BP 123 Asia Fax 33 2 40 18 19 60 38521 Saint Egreve Cedex France Room 1219 Tel 33 4 76 58 30 00 Chinachem Golden Plaza ASICIASSP Smart Cards Fax 33 4 76 58 34 80 77 Mody Road Tsimshatsui Zone Industrielle East Kowloon 13106 Rousset Cedex France Hong Kong Tel 33 4 42 53 60 00 Tel 852 2721 9778 Fax 33 4 42 53 60 01 Fax 852 2722 1369 1150 East Cheyenne Mtn Blvd Japan Colorado Springs CO 80906 USA 9F Tonetsu Shinkawa Bldg Tel 1 719 576 3300 1 24 8 Shinkawa Fax 1 719 540 1759 Chuo ku Tokyo 104 0033 Scottish Enterprise Technology Park Tel 81 3 3523 3551 Maxwell Building Fax 81 3 3523 7581 East Kilbride G75 OQR Scotland Tel 44 1355 803 000 Fax 44 1355 242 743 Literature Requests www atmel com literature Disclaimer The information in this document is provided in connection with Atmel products No license express or implied by estoppel or otherwise to any intellectual property right is granted by this document or in connection with the sale of Atmel products EXCEPT AS SET FORTH ATMEL S TERMS AND CONDI TIONS OF SALE LOCATED ON ATMEL WEB SITE ATMEL ASSUMES NO LIABILITY WHATSOEVER AND DISCLAIMS ANY EXPRESS IMPLIED OR STATUTORY WARRANTY RELATING TO ITS PRODUCTS INCLUDING BUT NOT LIMITED TO THE IMPLI
11. System Programming AVR Butterfly User Guide 15 4271C AVR 04 05 Figure 3 2 In System Programming To program the ATmega169 using ISP Programming mode connect a 6 wire cable between the ISP6PIN connector on the STK500 board and 403 the ISP connector on the AVR Butterfly as shown in Figure 3 2 This device can be programmed using the Serial Programming mode in the AVR Studio4 STK500 software Instead of soldering in a ISP header one can make contact just by pressing the header to the footprint Make sure that pin 1 on the STK500 match with pin 1 on the AVR Butterfly See Figure 3 3 for the pinout of the ISP Connector Figure 3 3 SP Connector J403 12 VCC EXT PB1 PB2 RST GND ISP Notes 1 More information about the STK500 can be found in the STK500 User Guide which is available at the Atmel web site www atmel com See STK500 User Guide for information on how to use the STK500 front end software for ISP Programming 2 Do not use the AVRISP for In System Programming unless if the kit is pow ered from an external power source senescere 4271C AVR 04 05 3 2 2 High voltage Parallel Programming AVR Butterfly User Guide It is possible to program the ATmega169 through the High voltage Parallel Program ming interface However this requires to move two resistors on the PCB High voltage Parallel Programming is only meant to be used in the worst case scenario where both SPI and the JTAG interface a
12. orasung ssexd uana orasAor p lt ema a lt VN Lamm zm C ly 2 SUI 00295 quepueded 3osuog 6024 a sw Beato P 802i z aa WP Ta EA m y asa 5 2 0 m so m HOOT D 5 soz 8 8 9024 E 22A ag eui uo 2100 04 4 0004 8 85 2100 65 NS 9s Bs S as 35 4s vS ay 2 4y t8 L L8 T109 NE DE HE ZS ac ut ae t az oz at vt NL 9Z Bt 18 az st at 1 X SE SE NL DL BL 0TS 9 29 9 9 W9 19 79 x9 N9 99 89 68 49 39 49 6 as os as s WS 1S PS XS ay 2y 89 Y Wy 19 09 39 Ge 2t at ve 1 0021 gt
13. segments for demonstrating the ATmega169 LCD controller B Joystick 4 directions with centre push as user input Piezo element to play sounds 32kHz Xtal for the RTC B 4 Mbit DataFlash for data storage B RS 232 level converter for communicating with off board units B Negative Temperature Coefficient NTC thermistor to measure temperature E Light Dependent Resistor LDR to measure light intenisty E 3V button cell battery 600mAh to provide operating power JTAG emulation for debugging B USl interface for additional communication interface B Supported by AVR Studio 4 B Pre programmed with a demonstration application including bootloader B No external hardware is required to reprogram the AVR Butterfly The ATmega169 in the kit controls the external peripherals and can also be used to do voltage readings from 0 to 5 volts The kit can be reprogrammed a number of different ways including serial programming through the JTAG port Most users will prefer to use the preloaded bootloader with AVR Studio to download new code For more information about the ATmega1689 see the datasheet at www atmel com A MEL AVR Butterfly User Guide AMEL Section 2 How to Operate the Pre programmed Application The AVR Butterfly comes with a preprogrammed application This section will go through the basics of this application The firmware can be downloaded from the AVR Butterfly web site http www atmel com products AVR but
14. A Temperature Monitoring System with LCD Output applica tion note 065 LCD Driver for the STK502 LCD Note Touching the LCD pins will affect the segments on the LCD The AVR Butterfly has a miniature joystick for input from user It operates in five direc tions including centre push The common line of all directions is GND This means that internal pull up must be enabled on the ATmega169 to detect the input from the joystick A MEL AVR Butterfly User Guide Figure 3 11 Joystick Schematic SW200 SKRHABEOIO 4 way joystick with press function 3 6 Sensors The AVR Butterfly has two on board sensors which makes it possible to measure both temperature and light In addition is has a voltage divider that is used to measure volt ages from 0 to 5V 3 6 1 Temperature Sensor temperature sensor can be found at the back side of the AVR Butterfly See Figure 3 12 AVR Butterfly User Guide AIMEL 21 4271C AVR 04 05 22 4271 04 05 Figure 3 12 Temperature Sensor Fa wer An NTC Negative Temperature Coefficient thermistor is used to measure the tempera ture An NTC thermistor is characterised by the fact that when the temperature goes down the resistance goes up Using a voltage divider and reading the voltage over the thermistor through the ADC channels on the ATmega169 the temperature in can be calculated Equation for calculating the temperature in Celsi
15. AVR Butterfly Evaluation Kit User Guide AMEL Table of Contents 4271C AVR 04 05 Section 1 1 5 1 1 Resources Available on the AVR Butterfly 1 6 Section 2 How to Operate the Pre programmed Application 1 7 2 1 Included Firmware RR ERR FRI 1 7 2 2 Joystlck rc tette Een bk 1 8 2 3 Menu 1 nenne nennen 1 9 2 4 rub Pr eR Pax ese aai 1 11 Section 3 Using the AVR 1 111 48 1 15 31 ctor Y rni va Yr re 1 15 3 2 Programming the AVR Butterfly 1 15 3 35 een 1 19 3 4 LCD Display m 1 20 BiB SOYSUCK 4 1 20 3 6 SensO S cce a Ra e ER or uA c o a o 1 21 3 7 Connect to nennen nennen nennen nennen nnns 1 23 38 Cea 1 24 3 9 External 0 22000 1 25 310 ERES ts 1 26 Battery 1 26 Section 4 Troubleshooting 6 sn REU
16. ED WARRANTY OF MERCHANTABILITY FITNESS FOR A PARTICULAR PURPOSE OR NON INFRINGEMENT IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT INDIRECT CONSEQUENTIAL PUNITIVE SPECIAL OR INCIDEN TAL DAMAGES INCLUDING WITHOUT LIMITATION DAMAGES FOR LOSS OF PROFITS BUSINESS INTERRUPTION OR LOSS OF INFORMATION ARISING OUT OF THE USE OR INABILITY TO USE THIS DOCUMENT EVEN IF ATMEL HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES Atmel makes no representations or warranties with respect to the accuracy or completeness of the contents of this document and reserves the right to make changes to specifications and product descriptions at any time without notice Atmel does not make any commitment to update the information contained herein Atmel s products are not intended authorized or warranted for use as components in applications intended to support or sustain life Atmel Corporation 2005 All rights reserved Atmel logo and combinations thereof AVR and AVR Studio are registered trademarks and Everywhere You Are are the trademarks of Atmel Corporation or its subsidiaries Microsoft Windows Windows NT and Windows are the registered trademarks of Microsoft Corporation Other terms and product names may be trademarks of others Printed on recycled paper 4271C AVR 04 05
17. S 1 27 Section 5 Technical Specifications eessseeeeeneeeeennene 1 29 Section 6 Technical SUDDOFD 1 31 Section 7 EEEE A E REEERE 1 33 Materials RO RE R EXER 1 40 4 MEL AVR Butterfly User Guide 4271C AVR 04 05 AMEL Section 1 Introduction The AVR Butterfly evaluation kit is designed to demonstrate the benefits and key fea tures of the AVR microcontrollers It is a stand alone microprocessor module that can be used in numerous applications B The AVR architecture in general and the 169 in particular B Low power design B The MLF package type B Peripherals LCD controller Memories Flash EEPROM SRAM external DataFlash Communication interfaces UART SPI USI Programming methods Selfprogramming Bootloader SPI Parallel JTAG Analog to Digital Converter ADC Timers Counters Real Time Clock RTC Pulse Width Modulation PWM It also serve as a development kit for the ATmega169 and can be used as a module in other products Figure 1 1 AVR Butterfly OF AVR Butterfly AVR Butterfly User Guide 5 4271C AVR 04 05 1 1 Resources Available on the AVR Butterfly Kit 6 4271C AVR 04 05 The following resources are available on the Butterfly kit B ATmega169 MLF package B LCD on glass display with 120
18. V A MEL AVR Butterfly User Guide 4271C AVR 04 05 38 Figure 7 6 Assembly Drawing Back Side e R3U1 R c c R3U00 30 01 03 cc Q R30 0 3 pei R212 Ja e R325R3U6 R307R304R302 ATMEL AVR Butterfly Rev A XC200B 1 1 200 08 XC2 A 209 05020 AVR Butterfly User Guide AMEL ASSEMBLY DRAWING BOTTOM SIDE VIEWED FROM BOTTOM SIDE 39 4271 04 05 7 1 of Materials Table 7 1 Bill Of Material Used Part Type Designator Value Manufacturer Design specific 8 OR R200 R201 OR R202 R203 R302 R303 R401 R404 3 OR R204 R402 OR NOT MOUNTED R403 1 1M5 R212 1M5 d 2 10 16V X7R C105 C300 1u MURATA 1 3K3 R210 3k3 5 4 7K R304 R305 4k7 R306 R307 R308 1 10K R100 10k 1 10N 50V X7R C106 10n j 1 33R R400 33R NOT MOUNTED 4 100K R205 R206 100k R207 R208 10 100N 16V X7R C100 C101 100n C102 C103 C104 C200 C400 C401 C402 C403 1 300K R209 300K 1 AT45DB041B SC 2 5 U201 4Mb ATMEL 1 ATMEGA169V 1MC U100 ATMEL 1 AVR BUTTERFLY A0301 3 1000 A PCB500 1 BAT54C D400 PHILIPS 1 BAT74 D300 PHILIPS 1 847 200 PHILIPS NOT MOUNTED 1 BC847BPN Q300 PHILIPS 1 2141025 1100 MUR d 1 BZX399 C1V8 D200 PHILIPS 7 1 2450 400 3V MAXELL 1 H4042 DL 0200
19. d in Section 3 7 Connect to PC Open a terminal on your PC e g HyperTerminal and con figure the terminal to 19200 Baudrate 8 Databits none Parity and one stop bit Go through point 1 2 and 3 above When the ENTER is displayed press the joystick down SCROLL DOWN and DOWNLOAD will be displayed Press center push ENTER to activate the UART and the text WAITING FOR INPUT ON RS232 will be displayed Type your name in the terminal window on the PC up to 25 characters and save the name by pressing enter on your PC keyboard The name you typed should now be displayed in the AVR Butterfly display Note The Auto Power Off feature is default enabled It will turn off the LCD after default 30 minutes This timeout can be changed or turned off To wake the AVR Butterfly from SLEEP press the joystick in the UP position A menu system is established to be able to shift between the different modules in appli cation in a efficient way AMEL 4271C AVR 04 05 Figure 2 2 Application Menu AVR Change clock format Clock 12 35 45 Adjust clock 03 04 25 Adjust date Change date format Turkey march Adjust volume by pressing joystick Sirene1 UP D OWN while playing Sirene2 Whistle ane rnm Download name 424 C 9 75 F Shift between Celsius and Fahrenheit by pressing the joystick UP DOWN Light AD 28 Adju
20. erve as the BS2 and XTAL1 pin during High voltage Parallel Programming For more details see 3 2 2 High voltage Parallel Programming Figure 3 9 JTAG Connector 12 TCK GND TDO TMS RST NC VCC NC BS2 TDI GND XTAL1 JTAG Note Itis highly recommended to apply external power 3 1 4 5V when using the JTAG to save the battery See Figure 3 10 for how to connect external power AVR Butterfly User Guide AIMEL 19 4271 04 05 3 4 LCD Display 3 5 Joystick 20 4271C AVR 04 05 Make sure to disable the OCD fuse after a debugging session due to power consumption The OCD fuse will be disabled if pressing on the Stop Debug ging button in AvrStudio4 before disconnecting the JTAG ICE probe from the Butterfly Figure 3 10 External Power External power can be applied at pin 9 and 10 at both PORTB and PORTD see Figure 3 7 for the pinout If the JTAG are not in use the four JTAG pins can be used as input for the ADC chan nels ADC 4 7 See the ATmega169 datasheet for more information available from www atmel com The LCD display on the AVR Butterfly is the same as used on the STK502 available from Atmel The connections between the ATmega169 and the LCD are also the same See the STK502 User Guide at www atmel com for more information about the LCD dis play and the LCD bit mapping For more information on how to write software for the LCD display see application note AVRO64 STK502
21. notscrolling over the display press the joystick to the left EXIT SUB MENU until it does 2 Pressthe joystick down SCROLL DOWN three times so the string NAME is displayed 3 Press the joystick to the right ENTER SUB MENU If this is the first time name is entered the string ENTER NAME will be displayed otherwise the name already entered will be displayed and you have to press the joystick to the right ENTER SUB MENU once more 4 When ENTER is displayed press center push If this is the first time you enter a name the character A should be blinking in the right side in the display otherwise the last character of the already entered name will blink 5 Press the joystick up SCROLL UP or down SCROLL DOWN to get to the wanted character Press the joystick to the right ENTER SUB MENU to add a new character or press the joystick to the left EXIT SUB MENU to remove a character 6 When you have got all the characters up to maximum 25 press center push ENTER to save this name The name will now be displayed in the display If the name is more than 6 characters long it will scroll over the display otherwise it will be displayed static A MEL AVR Butterfly User Guide 2 2 2 Entering Your Using a Terminal 2 3 Menu System AVR Butterfly User Guide 1 Connect a serial cable from the PC to the AVR Butterfly as describe
22. o PORTB or PORTD on the AVR Butterfly AMEL AVR Butterfly User Guide AMEL Table 4 1 Troubleshooting Guide Problem Section 4 Troubleshooting Guide Reason Solution Nothing is displayed on the LCD The LCD is not enabled in the AVR device Check the LCD initialization The update frequency is not correct Verify that the clock prescaling correspond with the clock source Some segments on the LCD seems to disappear Your fingers are touching the LCD pins or PORTD Hold the AVR Butterfly on the edge of the PCB without touching the LCD pins Serial Programming does not work ISP cable not connected properly to the ISP footprint Connect the ISP cable according to Figure 3 2 STK500 target voltage error Please refer to the ATmega169 datasheet for the Serial Programming Voltage limits Adjust the target voltage on the STK500 board accordingly Parallel programming does not work Cables not connected properly Please refer to Section 3 2 2 High voltage Parallel Programming for correct parallel programming set up STK500 target voltage error Please refer to the ATmega169 datasheet for the Parallel Programming Voltage limits Adjust the target voltage on the STK500 board accordingly Notes 1 AVR Butterfly User Guide See the Application Note AVRO65 LCD driver for the STK502 LCD on how to control the LCD display or the Application Note
23. re disabled To make the parallel programming work R203 must be placed where the R204 should be and R404 must be placed where the R403 should be according to Figure 3 4 See the Assembly Drawing in the 7 Complete Schematics Figure 3 4 Ohm Resistors g UN wu lt Ol or 600006000000000 fire opi io los taa coco Connect RESET BSEL2 and XTAL1 from the STK500 to respectively pin 6 pin 8 and pin 10 on the JTAG J402 connector on the AVR Butterfly See Figure 3 5 The JTAG connector must be mounted on the back side of the AVR Butterfly Figure 3 5 Reset BSEL2 and XTAL1 cables Connect PROG DATA and PROG CTRL from the STK500 to respectively PORTB and PORTD on the AVR Butterfly Make sure that pin 1 on the STK500 connects to pin 1 on the AVR Butterfly AMEL 4271 04 05 18 4271 04 05 Figure 3 6 PORTB and PORTD See the Schematic and the Assembly Drawing in the 7 Complete Schematics for further details The device can now be programmed using the High voltage Programming mode in AVR Studio STK500 software During programming there will be some noise from the piezo element and some flicker ing on the LCD this because PORTB and PORTD are connected to theses modules Figure 3 7 shows the pinout for the port headers PORT B and PORT D Figure 3 7 PORT B and PORT D 12 12 PBO PB1 PDO PD1 PB2 PB3 PD2 4 5 PD4 PD5
24. ssing the joystick in the Application Sector UP position the only ones to be programmed Extended Fuse Byte OxFF None Fuse High Byte 0x98 12 4271C AVR 04 05 AMEL JTAGEN JTAG Interface Enabled SPIEN Serial Programming Enable BOOTSZ1 1024 words Boot Size BOOTRST Boot Reset vector Enabled AVR Butterfly User Guide Fuse Low Byte 0xE2 SUTO 65 ms Start up Time CKSELS Internal RC Oscillator CKSEL2 CKSELO Lock Bit Byte OxEF BLB11 SPM is not allowed to write to the Boot Loader section Note For all fuses and lock bits 1 means unprogrammed and 0 means pro grammed Using the AVR Butterfly AVR Butterfly User Guide AIMEL 13 4271C AVR 04 05 4271C AVR 04 05 ATMEL Section 3 Using the AVR Butterfly This section describes in detail how to use the AVR Butterfly evaluation kit 3 1 Connectors Some of the on the ATmega169 are available on the connectors of the AVR Butterfly These connectors are for communication programming and input to the ADC of the ATmega169 Figure 3 1 Connectors AVR Butterfly 4407 J406 UART 4405 USD J400 J401 4403 4402 PORTD ISP JTAG ADC 3 2 Programmingthe In addition to using the pre programmed bootloader with AVR Studio the ATmega169 AVR Butterfly on the AVR Butterfly can be programmed using SPI High voltage Parallel Programming and the JTAG interface 3 2 1 In
25. st contrast Bootloader Jump to Bootloader Poner Save Mode Press ENTER sleep Auto Power Save 5 80 minutes OFF 4271C AVR 04 05 AVR Butterfly User Guide 2 4 2 4 1 Upgrade the ATmega169 AVR Butterfly User Guide Figure 2 2 shows the menu system of the application that comes with the AVR Butterfly The column to the left displays the main menu AVR Butterfly Time Music etc To shift between the alternatives in the menu press the joystick UP or DOWN To enter sub menu press the joystick to the RIGHT To exit a sub menu press the joystick to the LEFT To enter adjust a value press ENTER E g when Adjust clock appears in the LCD press ENTER to enter the adjust function The AVR Butterfly comes with a bootloader which uses the self programming feature in the ATmega169 The bootloader combined with the integrated RS 232 level converter makes it possible to upgrade the application without any external hardware It is based on the Application Note AVR109 Self Programming AVR but uses the new buffer load mode for more efficient data downloading AVR Prog which is included in AVR Studio4 is used as PC frontend The data is transmitted through the RS 232 interface Connect a serial cable from the PC to the AVR Butterfly as described in Section 3 7 Connect to Figure 2 3 AVR Prog AVRStudio4 AVRStudio File Project View Osha Trace disabled
26. t terfly revision A are shown AVR Butterfly User Guide 33 4271C AVR 04 05 qos WAY XILIL ausun2oq 0 7 60 tooz zdv oc 19380 ae WXTILL SLOL 61 TIRIN jano 3 A9T NOOT LX AOS TOTO 9015 mem asm 2080 TOSOL CTE 0018 o Ino Ino gt OWI AG9TVDSHIV SREROBEEERSSR 255 588 8 HERERO ES 88828884933 258 age 8888 88 SS T 020 paa 6 xs Tea 524 1925 0 HSVI LSU 99a 9935 8 943 104 5985 Sud toa voxs 4250 7155 9 vad 1 2928 sox onty lt swa toas axa taa e gt 21957 2p 3383 coca
27. terfly 2 1 Included These modules are preprogrammed with the AVR Butterfly Firmware B Bootloader code Application code State machine Features included Name tag Clock date Temperature measurements Light measurements Voltage readings Play tunes melodies Auto power save Adjust LCD contrast More functions can be added later on Calculator Reminder function Alarm daily alarms kitchen timers etc Play melodies and displaying the text Karaoke function With the 4Mbit dataflash one can store large amount of data Some examples AVR Info Bank Basic of all AVR parts your local bus table melodies etc Note The application can be upgraded without any external hardware due to the inte grated level converter and the Self programming feature AVR Butterfly User Guide 7 4271C AVR 04 05 2 2 Joystick Input 2 2 1 Entering Your Name Using the Joystick 8 4271C AVR 04 05 To operate the AVR Butterfly a joystick is used as user input It operates in five direc tions including center push see Figure 2 1 Figure 2 1 Joystick Input SCROLL UP EXIT ENTER SUB MENU SUB MENU SCROLL DOWN Using the joystick one can move around in the menu shown in Figure 2 2 and edit val ues entering name etc Here are examples on how to enter your name 1 Press the joystick up SCROLL UP to wake the AVR Butterfly If AVR BUT TERFLY is
28. us is shown in Figure 3 13 Figure 3 13 Temperature Equation Temperature 1024 ADC Tam 4250 ADC Value in the ATmega169 ADC Data Register ADCL and ADCH Tero 273 Tamb 298 273 25 temperature in Fahrenheit found from Figure 3 14 Figure 3 14 Fahrenheit VS Celsius The AVR Butterfly is capable of measuring the temperature from 10 14 to 60 140 with an accuracy of 1 A MEL AVR Butterfly User Guide 3 6 2 Light Sensor 3 6 3 Voltage Reader 3 7 Connect to PC AVR Butterfly User Guide The light sensor is located at the front of the AVR Butterfly over the LCD See Figure 3 15 Figure 3 15 Light Sensor An LDR Light Dependent Resistor is used to measure the light An LDR is character ised by the fact that when the light decreases the resistance goes up Using a voltage divider and reading the voltage over the LDR through the ADC channels on the 169 the light can be calculated The AVR Butterfly is capable of reading voltages from to 5V The input must be con nected to the pins shown in Figure 3 16 Using a voltage divider and reading the voltage over the resistors through the ADC channels on the 169 the applied voltage can be calculated The accuracy is about 0 1V Figure 3 16 Voltage Readings Note Do not apply voltages above maximum 10V The AVR

Download Pdf Manuals

image

Related Search

Related Contents

GX532  Modelo GSM200  Samsung Galaxy Note 3 Käyttöopas  Inter-Tech WN-30 Perseus  BREVILLE SG2000 Instructions for Use  Service manual Logamax plus GB162-80/100 - DE  JVC VN-H257U User's Manual  TH-P50/46/42V2(かんたんガイド) (10.09 MB/PDF)  

Copyright © All rights reserved.
Failed to retrieve file