Upload
maninderjit-singh
View
219
Download
0
Embed Size (px)
Citation preview
8/13/2019 AVR Butterfly
1/42
AVR Butterfly Evaluation Kit........................................................................................
User Guide
8/13/2019 AVR Butterfly
2/42
8/13/2019 AVR Butterfly
3/42
Table of Contents
iii AVR Butterfly User Guide
4271CAVR04/05
Section 1
Introduction ........................................................................................... 1-5
1.1 Resources Available on the AVR Butterfly Kit ..........................................1-6
Section 2
How to Operate the Pre-programmed Application................................ 1-7
2.1 Included Firmware ....................................................................................1-7
2.2 Joystick Input ............................................................................................1-8
2.3 Menu System ............................................................................................1-9
2.4 Bootloader...............................................................................................1-11
Section 3
Using the AVR Butterfly ......................................................................1-15
3.1 Connectors..............................................................................................1-15
3.2 Programming the AVR Butterfly..............................................................1-15
3.3 JTAG.......................................................................................................1-19
3.4 LCD Display ............................................................................................1-20
3.5 Joystick ...................................................................................................1-20
3.6 Sensors...................................................................................................1-21
3.7 Connect to PC.........................................................................................1-23
3.8 USI ..........................................................................................................1-24
3.9 External DataFlash .................................................................................1-25
3.10 Piezo element .........................................................................................1-26
3.11 Battery.....................................................................................................1-26
Section 4
Troubleshooting Guide ....................................................................... 1-27
Section 5
Technical Specifications .....................................................................1-29
Section 6
Technical Support...............................................................................1-31
Section 7
Schematics ......................................................................................... 1-33
7.1 Bill of Materials........................................................................................1-40
8/13/2019 AVR Butterfly
4/42
-iv AVR Butterfly User Guide
4271CAVR04/05
8/13/2019 AVR Butterfly
5/42
AVR Butterfly User Guide -5
4271CAVR04/0
Section 1Introduction
The AVR Butterfly evaluation kit is designed to demonstrate the benefits and key features of the AVR microcontrollers. It is a stand alone microprocessor module that can beused in numerous applications:
! The AVR architecture in general and the ATmega169 in particular
! Low power design
! The MLF package type
! 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 inother products.
Figure 1-1. AVR Butterfly
8/13/2019 AVR Butterfly
6/42
-6 AVR Butterfly User Guide
4271CAVR04/05
1.1 ResourcesAvailable on theAVR Butterfly Kit
The following resources are available on the Butterfly kit.
! ATmega169 (MLF-package)
! LCD-on-glass display with 120 segments, for demonstrating the ATmega169 LCD
controller.
! Joystick, 4-directions with centre push, as user input
! Piezo element, to play sounds
! 32kHz Xtal for the RTC
! 4 Mbit DataFlash, for data storage
! RS-232 level-converter, for communicating with off-board units
! Negative Temperature Coefficient (NTC) thermistor, to measure temperature
! Light Dependent Resistor (LDR), to measure light intenisty
! 3V button cell battery (600mAh) to provide operating power
! JTAG emulation, for debugging
! USI-interface, for additional communication interface
! Supported by AVR Studio 4.
! Pre-programmed with a demonstration application, including bootloader
! 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 dovoltage readings from 0 to 5 volts. The kit can be reprogrammed a number of differentways 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 ATmega169, see the datasheet at www.atmel.com.
8/13/2019 AVR Butterfly
7/42
AVR Butterfly User Guide -7
4271CAVR04/0
Section 2How 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 AVRButterfly web-site, http://www.atmel.com/products/AVR/butterfly.
2.1 IncludedFirmware
These modules are preprogrammed with the AVR Butterfly:
! 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. (Someexamples: 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 integrated level-converter and the Self-programming feature.
8/13/2019 AVR Butterfly
8/42
-8 AVR Butterfly User Guide
4271CAVR04/05
2.2 Joystick Input To operate the AVR Butterfly a joystick is used as user input. It operates in five directions, including center-push, see Figure 2-1.
Figure 2-1. Joystick Input
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.
2.2.1 Entering Your NameUsing the Joystick:
1. Press the joystick up (SCROLL UP) to wake the AVR Butterfly. If AVR BUT-TERFLY is notscrolling over the display, press the joystick to the left (EXIT
SUB-MENU) until it does.
2. Press the 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 a
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 theright (ENTER SUB-MENU) once more.
4. When ENTER NAME is displayed press center push (ENTER). If this is thefirst 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 anew 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. Ifthe name is more than 6 characters long it will scroll over the display, otherwise itwill be displayed static.
8/13/2019 AVR Butterfly
9/42
AVR Butterfly User Guide -9
4271CAVR04/0
2.2.2 Entering Your Name
Using a Terminal:
1. Connect a serial cable from the PC to the AVR Butterfly as described in Section
3.7Connect 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.
2. Go through point 1, 2 and 3 above.
3. When the ENTER NAME is displayed press the joystick down(SCROLL
DOWN), and DOWNLOAD NAME will be displayed
4. Press center push(ENTER) to activate the UART, and the text WAITING FOR
INPUT ON RS232 will be displayed.5. 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 shouldnow be displayed in the AVR Butterfly display.
Note: The Auto Power Off feature is default enabled. It will turn off the LCD afterdefault 30 minutes. This timeout can be changed or turned off. To wake theAVR Butterfly from SLEEP, press the joystick in the UP-position.
2.3 Menu System A menu system is established to be able to shift between the different modules in appli-cation in a efficient way.
8/13/2019 AVR Butterfly
10/42
-10 AVR Butterfly User Guide
4271CAVR04/05
Figure 2-2. Application Menu
8/13/2019 AVR Butterfly
11/42
AVR Butterfly User Guide -11
4271CAVR04/0
Figure 2-2shows 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 Toshift between the alternatives in the menu, press the joystick UP or DOWN. To enter a
sub-menu, press the joystick to the RIGHT. To exit a sub-menu, press the joystick to theLEFT. To enter/adjust a value, press ENTER. E.g. when Adjust clock appears in the
LCD, press ENTER to enter the adjust function.
2.4 Bootloader The AVR Butterfly comes with a bootloader which uses the self-programming feature inthe ATmega169. The bootloader combined with the integrated RS-232 level-convertermakes 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 loadmode for more efficient data downloading. AVR Prog, which is included in AVR Studio4is 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.7Connect toPC.
Figure 2-3. AVR Prog in AVRStudio4
2.4.1 Upgrade theATmega169
A jump to the boot section can be done from the application, Options>Bootloader>Jump to Bootloader, see Figure 2-2, or just reset the ATmega169 by shortcu
pin 5 and 6 on J403 the ISP connector, (after a reset the ATmega169 will start in theboot section). See Figure 3-3for 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 OK, this is done automaticallyAfter upgrading the application, press the Exit-button in AVR Prog in order to leave
programming mode in the ATmega169 bootloader.
8/13/2019 AVR Butterfly
12/42
-12 AVR Butterfly User Guide
4271CAVR04/05
Figure 2-4. AVR Prog
2.4.2 Jump to the
Application SectorFrom the Boot Section a jump to the application is done by pressing the joystick in theUP-position.
2.4.3 Fuses and Lock Bits For the firmware to operate correctly these fuses and lock bits on the ATmega169 are
the only ones to be programmed:
Extended Fuse Byte (0xFF)
None
Fuse High Byte (0x98)
JTAGEN (JTAG Interface Enabled)
SPIEN (Serial Programming Enable)
BOOTSZ1 (1024 words Boot Size)
BOOTSZ0
BOOTRST (Boot Reset vector Enabled)
8/13/2019 AVR Butterfly
13/42
AVR Butterfly User Guide -13
4271CAVR04/0
Fuse Low Byte (0xE2)
SUT0 (65 ms Start-up Time)
CKSEL3 (Internal RC Oscillator)
CKSEL2
CKSEL0
Lock Bit Byte (0xEF)
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
8/13/2019 AVR Butterfly
14/42
-14 AVR Butterfly User Guide
4271CAVR04/05
8/13/2019 AVR Butterfly
15/42
AVR Butterfly User Guide -15
4271CAVR04/0
Section 3Using the AVR Butterfly
This section describes in detail how to use the AVR Butterfly evaluation kit.
3.1 Connectors Some of the I/O-pins on the ATmega169 are available on the connectors of the AVRButterfly. These connectors are for communication, programming and input to the ADCof the ATmega169.
Figure 3-1. Connectors
3.2 Programming theAVR Butterfly
In addition to using the pre-programmed bootloader with AVR Studio, the ATmega169
on the AVR Butterfly can be programmed using SPI, High-voltage Parallel Programming
and the JTAG interface.
3.2.1 In-SystemProgramming
8/13/2019 AVR Butterfly
16/42
-16 AVR Butterfly User Guide
4271CAVR04/05
Figure 3-2. In-System Programming
To program the ATmega169 using ISP Programming mode, connect a 6-wire cablebetween the ISP6PIN connector on the STK500 board and J403 the ISP connector on
the AVR Butterfly as shown in Figure 3-2. This device can be programmed using theSerial 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. Makesure that pin 1 on the STK500 match with pin 1 on the AVR Butterfly. See Figure 3-3fo
the pinout of the ISP Connector.
Figure 3-3. ISP Connector, J403
Notes: 1. More information about the STK500 can be found in the STK500 UserGuide, which is available at the Atmel web site, www.atmel.com. SeeSTK500 User Guide for information on how to use the STK500 front-endsoftware 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.
1 2
PB3 VCC_EXT
PB1 PB2
RST GND
ISP
8/13/2019 AVR Butterfly
17/42
AVR Butterfly User Guide -17
4271CAVR04/0
3.2.2 High-voltage Parallel
Programming
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-voltageParallel Programming is only meant to be used in the worst case scenario, where both
SPI and the JTAG interface are disabled.
To make the parallel programming work, R203 must be placed where the R204 shouldbe, 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
Connect RESET, BSEL2 and XTAL1 from the STK500 to respectively pin 6, pin 8 andpin 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 onthe AVR Butterfly.
8/13/2019 AVR Butterfly
18/42
-18 AVR Butterfly User Guide
4271CAVR04/05
Figure 3-6. PORTB and PORTD
See the Schematic and the Assembly Drawing in the 7 Complete Schematicsfor furthe
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-7shows the pinout for the I/O port headers PORT B and PORT D.
Figure 3-7. PORT B and PORT D
Note: When the AVR Butterfly is configured in High-voltage Parallel Programmingmode, the JTAG interface will not work, neither will the external crystal, causingthe pre-programmed application that comes with the AVR Butterfly to not oper-ate correctly.
VCC_EXT
PD6 PD7
PD0 PD1
PD2 PD3
PD4 PD5
GND
PORTD
1 2
VCC_EXT
PB6 PB7
PB0 PB1
PB2 PB3
PB4 PB5
GND
PORTB
1 2
8/13/2019 AVR Butterfly
19/42
AVR Butterfly User Guide -19
4271CAVR04/0
Note: 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 the STK500 UserGuide for information on how to use the STK500 front-end software in High-voltage Programming mode.
3.3 JTAG Figure 3-8shows 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-9and is compliant with the pin out of the JTAG ICEavailable 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(VCC) 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 serve as the BS2 andXTAL1 pin during High-voltage Parallel Programming. For more details see 3.2.2 Highvoltage Parallel Programming.
Figure 3-9. JTAG Connector
Note: It is highly recommended to apply external power (3,1 4,5V), when using theJTAG to save the battery. See Figure 3-10for how to connect external power.
JTAG
1 2
TCK GND
TDO
TMS
VCC
RST
NC(VCC) NC(BS2)
GND(XTAL1)TDI
8/13/2019 AVR Butterfly
20/42
-20 AVR Butterfly User Guide
4271CAVR04/05
Make sure to disable the OCD-fuse after a debugging session, due to powerconsumption. The OCD-fuse will be disabled if pressing on the Stop Debug-ging button in AvrStudio4, beforedisconnecting the JTAG ICE probe from theAVR Butterfly.
Figure 3-10. External Power
External power can be applied at pin 9 and 10 at both PORTB and PORTD, see Figure3-7for 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 fromwww.atmel.com
3.4 LCD Display The LCD display on the AVR Butterfly is the same as used on the STK502 availablefrom Atmel. The connections between the ATmega169 and the LCD are also the same
See the STK502 User Guide at www.atmel.comfor more information about the LCD display, and the LCD bit-mapping.
For more information on how to write software for the LCD-display see application noteAVR064: STK502 A Temperature Monitoring System with LCD Output and applica-
tion note AVR065: LCD Driver for the STK502 LCD.Note: Touching the LCD-pins will affect the segments on the LCD.
3.5 Joystick 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 thainternal pull-up must be enabled on the ATmega169 to detect the input from the joystick.
8/13/2019 AVR Butterfly
21/42
AVR Butterfly User Guide -21
4271CAVR04/0
Figure 3-11. Joystick Schematic
3.6 Sensors The AVR Butterfly has two on-board sensors which makes it possible to measure bothtemperature 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 The temperature sensor can be found at the back side of the AVR Butterfly. See Figure3-12.
8/13/2019 AVR Butterfly
22/42
-22 AVR Butterfly User Guide
4271CAVR04/05
Figure 3-12. Temperature Sensor
An NTC (Negative Temperature Coefficient)-thermistor is used to measure the temperature. An NTC-thermistor is characterised by the fact that when the temperature goesdown 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 becalculated. Equation for calculating the temperature in Celsius is shown in Figure 3-13.
Figure 3-13. Temperature Equation
! = 4250
ADC = Value in the ATmega169 ADC Data Register ADCL and ADCH
Tzero = 273"K
Tamb = 298"K (273"+ 25")
The temperature in Fahrenheit can be found from Figure 3-14
Figure 3-14. Fahrenheit VS Celsius
The AVR Butterfly is capable of measuring the temperature from 10C/+14F to
+60C/140C with an accuracy of 1C.
Temperature !
ADC
1024 ADC# $------------------------------------% &
' ( !Tamb--------------+ln% &
' (--------------------------------------------------------------------------- Tzero=
F 32# $1.8
---------------------% &' ( C=
8/13/2019 AVR Butterfly
23/42
AVR Butterfly User Guide -23
4271CAVR04/0
3.6.2 Light Sensor 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 voltagedivider and reading the voltage over the LDR through the ADC-channels on theATmega169, the light can be calculated.
3.6.3 Voltage Reader The AVR Butterfly is capable of reading voltages from 0V to 5V. The input must be connected 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 ATmega169, the applied voltagecan be calculated. The accuracy is about 0,1V.
Figure 3-16. Voltage Readings
Note: Do not apply voltages above maximum 10V
3.7 Connect to PC The AVR Butterfly has an on-board level-converter for the RS-232 interface. This meansthat no external hardware is required to reprogram the AVR Butterfly using the self pro
gramming feature in the ATmega169. Figure 3-17shows how to connect a serial-cableto the AVR Butterfly. The integrated RS232 level converter operates down to 2.0V sup-
ply voltage.
8/13/2019 AVR Butterfly
24/42
-24 AVR Butterfly User Guide
4271CAVR04/05
Table 3-1. UART
Figure 3-17. UART Connector
3.8 USI The AVR Butterfly has connections for the USI-interface. Figure 3-18shows the pin-oufor 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
AVR Butterfly UART COM2
Pin 1 (RXD) Pin 3
Pin 2 (TXD) Pin 2
Pin 3 (GND) Pin 5
8/13/2019 AVR Butterfly
25/42
AVR Butterfly User Guide -25
4271CAVR04/0
Table 3-2. USI
3.9 ExternalDataFlash
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 canbe 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 ATmega169 on the AVR Butterfly, it can also be accessed externallythrough the ISP connector.Note: If 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 theinterface.
Figure 3-19. DataFlash
Figure 3-20. DataFlash Schematic
AVR Butterfly USI
Pin 1 (USCK/SCL)
Pin 2 (DI/SDA)
Pin 3 (DO)
Pin 4 (GND)
8/13/2019 AVR Butterfly
26/42
-26 AVR Butterfly User Guide
4271CAVR04/05
3.10 Piezo element A piezo element is used to be able to play sounds on the AVR Butterfly. The piezo isconnected to PORTB5 on the ATmega169. And using the PWM, one can get the different frequencies required to play tunes.
Figure 3-21. Piezo Element
3.11 Battery Model: CR2450
Nominal Voltage: 3.0 Volts
Nominal Capacity: 550 mAh (@0.2 mA Discharge Current, +23C)
Standard Discharge Current 0.2 mAh
Maximum recommended current under continuous discharge: 3 mA
Maximum recommended current under pulse discharge: 15 mANote: DO NOT recharge, short-circuit, disassemble, deform, heat or place the battery
near a direct flame. This battery containsflammable materials such as lithiumand organic solvent and performing any of the above actions could cause it toignite explode or become damaged.
The battery is protected by a schottky diode, this will prevent recharging of the battery i
external power is applied to PORTB or PORTD on the AVR Butterfly.
8/13/2019 AVR Butterfly
27/42
AVR Butterfly User Guide -27
4271CAVR04/0
Section 4Troubleshooting Guide
Notes: 1. See the Application Note AVR065 LCD driver for the STK502 LCD on howto control the LCD-display, or the Application Note AVR064 STK502 Atemperature monitoring system with LCD output Or program the applica-tion that comes with the AVR Butterfly
Table 4-1. Troubleshooting Guide
Problem Reason Solution
Nothing is displayed on the LCD.The LCD is not enabled in the AVR device. Check the LCD initialization.
(1)
The update frequency is not correct.Verify that the clock prescaling correspond
with the clock-source. (1)
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 toSection 3.2.2High-voltageParallel Programmingfor 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.
8/13/2019 AVR Butterfly
28/42
-28 AVR Butterfly User Guide
4271CAVR04/05
8/13/2019 AVR Butterfly
29/42
AVR Butterfly User Guide -29
4271CAVR04/0
Section 5Technical Specifications
System Unit
Physical Dimension ................................45 x 67 x 14 mm
Weight.................................28 g
Operation Conditions
Temperature.............................0C - 50C
If using external power...........................3,1V - 4,5V
Temperature measurement accuracy.........................1C
Voltage reading accuracy...........................0,1V
8/13/2019 AVR Butterfly
30/42
-30 AVR Butterfly User Guide
4271CAVR04/05
8/13/2019 AVR Butterfly
31/42
AVR Butterfly User Guide -31
4271CAVR04/0
Section 6Technical Support
For Technical support, please contact [email protected]. When requesting technical sup
port, please include the following information:
! Which target AVR device is used (complete part number)
! Target voltage and speed
! Clock source and fuse setting of the AVR
! Programming method
! Hardware revisions of the AVR tools, found on the PCB
! Version number of AVR Studio (This can be found in the AVR Studio help menu).
! PC operating system and version/build
! PC processor type and speed
! A detailed description of the problem
8/13/2019 AVR Butterfly
32/42
-32 AVR Butterfly User Guide
4271CAVR04/05
8/13/2019 AVR Butterfly
33/42
AVR Butterfly User Guide -33
4271CAVR04/0
Section 7Schematics
On the following pages the complete schematics and assembly drawing of the AVR But-
terfly revision A are shown.
8/13/2019 AVR Butterfly
34/42
-34 AVR Butterfly User Guide
4271CAVR04/05
Figure 7-1. Schematics, 1 of 4
1
2
3
4
5
6
7
8
ABCD
8
7
6
5
4
3
2
1
D C B A
A0301.
3.
1000.A
MCU.Sc
h
1
4
30-Apr-
2003
09:
34:
10
AVR
Butter
fly
ATMEL
Norway
Vestre
Rosten
79,
7075
TILLER
NORWAY
PAGE:
of
TITLE:
Document
num
ber:
Rev
is
ion:A
Date:
COM
[3..
0]
COM
[3..
0]
PF
[7..
4]
PF
[7..
4]
TOSC
1
TOSC
2
PB
[7..
0]
PB
[7..
0]
PE
0
PE
1
PE
2
PE
3
PE
4
PE
5
PE
6
PE
7
RESET
PB
0
PB
1
PB
2
PB
3
PB
4
PB
5
PB
6
PB
7
VCC
GND
COM0
COM1
COM2
COM
3
LCD
27
LCD
28
LCD
29
LCD
4
LCD
10
LCD
7
LCD
23
LCD
22
LCD
8
LCD
5
LCD
26
LCD
25
VCC
GND
LCD15
LCD16
LCD18
LCD13
LCD11
LCD12
LCD14
LCD9
PF0
PF1
PF4
PF5
PF6
PF7
GND
RESET
1 2
C102
100N_
16V_
X7R
GND
12
C105
1U_
16V_
X7R
GND
LCDCAP
PF
0
LCD
6
LCD
20
LCD
21
LCD17LCD19
LCD
[32
..
3]
PF
1
AVR_
RxD
AVR_
TxD
VCC
RST_
FLASH
VCP
PE
2
(temperature
sensor
)
(vo
ltage
rea
der
)
PE
[6..
4]
VCP
PE
3
1 2
C104
100N_
16V_
X7R
1 2
C100
100N_
16V_
X7R
2
1
L100
BLM-
21A
102S
1 2
C101
100N_
16V_
X7R
GND
LCD
[32..
3]
PE
[6..
4]
1 2
C103
100N_
16V_
X7R
GND
VCC
1 2R
100
10K
1 2
C106
10N_
50V_
X7R
GND
Sensor_
2
PD7(SEG15) 32
PD6(SEG16) 31
PD5(SEG17) 30
PD4(SEG18) 29
PD3(SEG19) 28
PD2(SEG20) 27
PD1(INT0/SEG21) 26
PD0(ICP/SEG22) 25
LCDCAP
1
PE
0(RXD
)
2
PE
1(TXD
)
3
PE
2(AIN
0/XCK
)
4
PE
3(AIN
1)
5
PE
4(SCL
/USCK
)
6
PE
5(SDA
/DI
)
7
PE
6(DO
)
8
XTAL1(TOSC1) 24
XTAL2(TOSC2) 23
GND 22
VCC 21
RESET 20
PG4(T0/SEG23)
19PG3(T1/SEG24) 18
PB7(OC2) 17
PB
6(OC
1B
)
16
PB
5(OC
1A
)
15
PB
4(OC
0)
14
PB
3(MISO
)
13
PB
2(MOSI
)
12
PB
1(SCK
)
11
PB
0(SS
)
10
PE
7
9
(SEG
14)PG
0
33
(SEG
3)PA
7
44
(SEG
4)PG
2
43
(SEG
5)PC
7
42
(SEG
6)PC
6
41
(SEG
7)PC
5
40
(SEG
8)PC
4
39
(SEG
9)PC
3
38
(SEG
10)PC
2
37
(SEG
11)PC
1
36
(SEG
12)PC
0
35
(SEG
13)PG
1
34
(SEG
2)PA
6
45
(SEG
1)PA
5
46
(SEG
0)PA
4
47
(COM
3)PA
3
48
AVCC64
AGND63
AREF
62
(ADC0)PF061
(ADC1)PF160
(ADC2)PF259
(ADC3)PF358
(TCK/ADC4)PF457
(TMS/ADC5)PF556
(TDO/ADC6)PF655
(TDI/ADC7)PF754
GND53
VCC52
(COM0)PA051
(COM1)PA150
(COM2)PA249
U100
ATMEGA
169V-
1MC
8/13/2019 AVR Butterfly
35/42
AVR Butterfly User Guide -35
4271CAVR04/0
Figure 7-2. Schematics, 2 of 4
1
2
3
4
5
6
7
8
ABCD
8
7
6
5
4
3
2
1
D C B A
A0301
.3
.1000
.A
Per
ipherals.
Sch
2
4
5-
Mar-
2003
11:01:58
AVR
Butterfly
ATMEL
Norway
Vestre
Rosten
79
,
7075
TILLER
NORWAY
PAGE:
of
TITLE:
Document
number:
Rev
is
ion:
A
Date:
BP3
1
BP4
2
1K/1L/1M/6
3
2K/2J/2L/2M
4
3K/3J/3L/3M
5
3A/3B/3C/3D
6
4K/4J/4L/4M
7
4A/4B/4C/4D
8
5K/5J/5L/5M
9
5A/5B/5C/5D
10
9/6F/6E/6P
11
S9/6H/6G/6N
12
6K/6J/6L/6M
13
6A/6B/6C/6D
14
10/7F/7E/7P
15
S10/7H/7G/7N
16
7K/7J/7L/7M
17
7A/7B/7C/7D
18
S5/COL2/S8/8
19
5/5H/5G/5N
20
S4/5F/5E/5P
21
4/4H/4G/4N
22
S3/4F/4E/4P
23
3/COL1/S7/7
24
S2/3H/3G/3N
25
2/3F/3E/3P
26
2A/2B/2C/2D
27
S1/2H/2G/2N
28
1/2F/2E/2P
29
X1/1B/1C/S6
30
1A/1J/1N/1D
31
1F/1G/1E/X2
32
BP1
33
BP2
34
LCD
displ
ay
U200
H4042-DL
LCD[32
..
3]
COM[3
..
0]
COM
[3..
0]
LCD
[32..
3]
LCD
4
LCD
5
LCD
6
LCD
7
LCD
8
LCD
9
LCD
10
LCD
11
LCD
12
LCD
13
LCD
14
LCD
15
LCD
16
LCD
17
LCD
18
LCD
19
LCD
20
LCD
21
LCD
22
LCD
23
LCD
25
LCD
26
LCD
27
LCD
28
LCD
29
LCD
24
COM
0
COM
1
COM
2
COM
3
1
2
R200
0R
1 2
34
XC
201
IQD
32.
768KHZ
TOSC1
TOSC2
3 2
1
Q200
BC
847B
NOT
MOUNTED
GND
PB[7
..
0]
PB
5
VCC
SI
1
SCK
2
RESET
3
CS
4
SO
8
GND
7
VCC
6
WP
5
U201
AT
45DB
041B-SC-
2.
5
PB[7
..
0]
1 2R
207
100K
1 2R
206
100K
VCC
PB
2
PB
1
PB
0
PB
3
A
1
B
4
C
3
D
6
Center
2
Common
5
SW
200
SKRHABE
010
PB[7
..
0]
RST
_FL
ASH
GND
VCC
1 2
R211
NCP
18WF
104J
03RB
GND
1 2R
208
100K
PF0
1 2R
212
1M
5
GND
PF1
Lig
ht
Depen
dent
Res
istor
GND
VCP
VCP
Sensor
_2
PB
7
PB
6
PB
4
PE2
PE3
PE
2
PE
3
V_
in
GND
PB
[7..
0]
PB
[7..
0]
1 2R
204
0RNOT
MOUNTED
P_
XTAL1
P_
XTAL
1
V_
in
1 2
C200
100N_
16V_
X7R
GND
VCC
1 2R
205
100K
VCC
4
way
joyst
ic
k
wit
h
press
funct
ion
Piezo
element
Negat
i
ve
Temperature
Coe
ffic
ient
(NTC
)
res
istor.
Vo
ltage
rea
ding
Data
flas
h
1
2
R203
0R
GND
12
D200
BZX
399-C
1V
8
1 2R
213
NSL
19M
51
1
2
R202
0R
1 2R
201
0R
Connects
COL
1
to
COL
2
on
the
LCD
1 2R
210
3K
3
1 2R
209
300K
XC
200
KMT-
1603
8/13/2019 AVR Butterfly
36/42
-36 AVR Butterfly User Guide
4271CAVR04/05
Figure 7-3. Schematics, 3 of 4
1
2
3
4
5
6
7
8
ABCD
8
7
6
5
4
3
2
1
D C B A
A0301
.3
.1000
.A
RS232
.Sch
3
4
28-Jan-
2003
12:
34:
59
AVR
Butterfly
ATMEL
Norway
Vestre
Rosten
79
,
7075
TILLER
NORWAY
PAGE:
of
TITLE:
Document
number:
Revision:
A
Date:
6 1
2
Q300A
BC847BPN
34
5
Q300B
BC847BPN
1
2
R306
4,7K
12R307
4,7K
1 2R308
4,7K
12R304
4,7K
1
2
R305
4,7K
1
2
4
3
D300
BAT74
AVR_TxD
AVR_RxD
VCC
VCC
GND
GND
GND
1
2
R302
0R
1
2
R303
0R
1 2
C300
1U
_16V
_X7R
1 2
R300
VC080514A300
1 2
R301
VC080514A300
RXD
TXD
8/13/2019 AVR Butterfly
37/42
AVR Butterfly User Guide -37
4271CAVR04/0
Figure 7-4. Schematics, 4 of 4
1
2
3
4
5
6
7
8
ABCD
8
7
6
5
4
3
2
1
D C B A
A0301
.3
.1000
.A
Connectors
.Sc
h
4
4
19
-Fe
b-
2003
08
:18
:49
AVR
Butter
fly
ATMEL
Norway
Vestre
Rosten
79
,
7075
TILLER
NORWAY
PA
GE:
of
TITLE:
Document
num
ber:
Rev
is
ion:
A
Date:
PF4
PF5
PF6
PF7
GND
VCC
RESET
JTAG
1
2
3
4
5
6
7
8
9
10
J402
NOT
MOUNTED
1 2
C403
100N_
16V_
X7R
GND
MISO
1
SCK
3
RESET
5
GND
6
VCC
2
MOSI
4
J403
ISP_
CONNECTOR
NOT
MOUNTED
GND
1 2
C401
100N_
16V_
X7
R
GND
GND
PORTB
1
2
3
4
5
6
7
8
9
10
J400
NOT
MOUNTED
GND
PORTD
1
2
3
4
5
6
7
8
9
10
J401
NOT
MOUNTED
PB0
PB1
PB2
PB3
PB4
PB5
PB6
PB7
LCD15
LCD16
LCD18
LCD13
LCD11
LCD12
LCD14
LCD9
1 2 3
J406
PH_
2,54_
3
X
1
NOT
MOUN
TED
PB[7
..0]
PB1
PB2
PB3
PB[7..0]
LCD[32..3]
PF[7
..4]
GND
RXD
TXD
1
2
R403
0RNOT
MOU
NTED
1 2R404
0R
COM[3..0]
GND
P_
XTAL1
1 2R402
0RNOT
MOUNTED
These
two
pins
are
for
parallel
programm
ing
Disable
the
Vsupply
to
the
JTAG
VCC
VCC_
EXT
VCC_
EXT
VCC_
EXT
VCC_
EXT
VCC
VCC_
EXT
VCC
1 2
J407
PH_
2,54_
2
X
1
NOT
MOUN
TED
V_
in
GND
1 2 3 4
J405
PH_
2,54_
4
X
1
NOT
MOUN
TED
PE[6..4]
PE4
PE5
PE6
GND
(voltage
reader)
RESE
T
(BS2)
COM0
PF[7..4]
PB[7..0]
PB[7..0]
LCD[32..3]
PE[6..4]
P_
XTAL1
COM[3..0]
V_
in
1 2
C402
100N_
16V_
X7R
GND
VCC_
EXT
1 2
C400
100N_
16V_
X7R
GND
VCC_
EXT
1 2
J404
KEY-3
008-TR
GND
Battery-
cl
ip
12R400
33R
NOT
MOUNTED
3
1
2
D400
BAT54C
USI
UART
pins
Voltage
reader
1 2
BT400
CR-2450
Co
in
Cell
Battery
1
2
R401
0R
8/13/2019 AVR Butterfly
38/42
-38 AVR Butterfly User Guide
4271CAVR04/05
Figure 7-5. Assembly Drawing, Top Side
8/13/2019 AVR Butterfly
39/42
AVR Butterfly User Guide -39
4271CAVR04/0
Figure 7-6. Assembly Drawing, Back Side
8/13/2019 AVR Butterfly
40/42
-40 AVR Butterfly User Guide
4271CAVR04/05
7.1 Bill of Materials
Table 7-1. Bill Of Material_
Used Part Type Designator Value Manufacturer Design specific
8 0R R200 R201 0R
R202 R203
R302 R303
R401 R404
3 0R R204 R402 0R NOT MOUNTED
R403
1 1M5 R212 1M5 *
2 1U_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 *
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 BC847B Q200 PHILIPS NOT MOUNTED
1 BC847BPN Q300 PHILIPS *
1 BLM-21A102S L100 MUR *
1 BZX399-C1V8 D200 PHILIPS *
1 CR-2450 BT400 3V MAXELL *
1 H4042-DL U200 *
1 IQD32.768KHZ XC201 32,768kHz IQD Crystals *
1 ISP_CONNECTOR J403 SCOTT ELECT. NOT MOUNTED
1 KEY-3008-TR J404 KEYSTONE *
8/13/2019 AVR Butterfly
41/42
AVR Butterfly User Guide -41
4271CAVR04/0
1 NCP18WF104J03RB R211 100K MURATA *
1 NSL 19M51 R213 SILONEX *
1 PH_2,54_2 X 1 J407 SCOTT ELECT. NOT MOUNTED
1 PH_2,54_3 X 1 J406 SCOTT ELECT. NOT MOUNTED
1 PH_2,54_4 X 1 J405 SCOTT ELECT. NOT MOUNTED
3 PH_2,54_5 X 2 J400 J401 SCOTT ELECT. NOT MOUNTED
J402
1 SKRHABE010 SW200 ALPS *
1 KMT-1603 XC200 KINGSTATE *
2 VC080514A300 R300 R301 *
1 U562246 M500
Table 7-1. Bill Of Material_(Continued)
Used Part Type Designator Value Manufacturer Design specific
8/13/2019 AVR Butterfly
42/42
Atmel Corporation 2005 .All rights reserved. Atmel, logo and combinations thereof, AVR, and AVR Studio are registered trademarks
and Everywhere You AreSM are the trademarks of Atmel Corporation or its subsidiaries Microsoft Windows Windows NT and Windows XP
Disclaimer: The information in this document is provided in connection with Atmel products. No license, express or implied, by estoppel or otherwise, to anyintellectual property right is granted by this document or in connection with the sale of Atmel products. EXCEPT AS SET FORTH IN ATMELS TERMS AND CONDITIONS OF SALE LOCATED ON ATMELS WEB SITE, ATMEL ASSUMES NO LIABILITY WHATSOEVER AND DISCLAIMS ANY EXPRESS, IMPLIED OR STATUTORYWARRANTY RELATING TO ITS PRODUCTS INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULARPURPOSE, 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 OUTOF THE USE OR INABILITY TO USE THIS DOCUMENT, EVEN IF ATMEL HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. Atmel makes norepresentations or warranties with respect to the accuracy or completeness of the contents of this document and reserves the right to make changes to specificationsand product descriptions at any time without notice. Atmel does not make any commitment to update the information contained herein. Atmels products are nointended, authorized, or warranted for use as components in applications intended to support or sustain life.
Atmel Corporation Atmel Operations
2325 Orchard Parkway
San Jose, CA 95131, USA
Tel: 1(408) 441-0311
Fax: 1(408) 487-2600
Regional Headquarters
EuropeAtmel Sarl
Route des Arsenaux 41
Case Postale 80
CH-1705 Fribourg
Switzerland
Tel: (41) 26-426-5555
Fax: (41) 26-426-5500
AsiaRoom 1219
Chinachem Golden Plaza
77 Mody Road Tsimshatsui
East Kowloon
Hong Kong
Tel: (852) 2721-9778
Fax: (852) 2722-1369
Japan9F, Tonetsu Shinkawa Bldg.
1-24-8 Shinkawa
Chuo-ku, Tokyo 104-0033
JapanTel: (81) 3-3523-3551
Fax: (81) 3-3523-7581
Memory
2325 Orchard ParkwaySan Jose, CA 95131, USA
Tel: 1(408) 441-0311
Fax: 1(408) 436-4314
Microcontrollers2325 Orchard Parkway
San Jose, CA 95131, USA
Tel: 1(408) 441-0311
Fax: 1(408) 436-4314
La Chantrerie
BP 70602
44306 Nantes Cedex 3, France
Tel: (33) 2-40-18-18-18Fax: (33) 2-40-18-19-60
ASIC/ASSP/Smart CardsZone Industrielle
13106 Rousset Cedex, France
Tel: (33) 4-42-53-60-00
Fax: (33) 4-42-53-60-01
1150 East Cheyenne Mtn. Blvd.
Colorado Springs, CO 80906, USA
Tel: 1(719) 576-3300
Fax: 1(719) 540-1759
Scottish Enterprise Technology ParkMaxwell Building
East Kilbride G75 0QR, Scotland
Tel: (44) 1355-803-000
Fax: (44) 1355-242-743
RF/Automotive
Theresienstrasse 2Postfach 3535
74025 Heilbronn, Germany
Tel: (49) 71-31-67-0
Fax: (49) 71-31-67-2340
1150 East Cheyenne Mtn. Blvd.
Colorado Springs, CO 80906, USA
Tel: 1(719) 576-3300
Fax: 1(719) 540-1759
Biometrics/Imaging/Hi-Rel MPU/High Speed Converters/RF Datacom
Avenue de Rochepleine
BP 12338521 Saint-Egreve Cedex, France
Tel: (33) 4-76-58-30-00
Fax: (33) 4-76-58-34-80
Literature Requestswww.atmel.com/literature