Parrot (Voice Recorder) with ATtiny817 Hardware User's
Guide
Introduction
This user guide describes an audio demo board based on the ATtiny817, a high-performance tinyAVR® 8bit microcontroller.
The Parrot field engagement board can be used as a voice recorder to record, play back, browse, and
erase voice data. This application helps the user to quickly evaluate the ADC and DAC features of the
microcontroller.
The firmware and accompanying application note ( AVR42777) is available on Atmel START http://
The Parrot field engagement board demonstrates the capabilities of the ATtiny817 with audio processing,
using its ADC and DAC peripherals. It is possible to record, playback, erase, rewind, and fast forward by
using the buttons.
Parrot Hardware
As shown in the figure above, once the “REC” (record) button is pressed, the electret microphone starts
to detect an analog sound signal. The sound signal will be processed in the front-end operation amplifier
and a low-pass filter will be applied to the signal. The signal will then be digitized by the ADC of the
ATtiny817 microcontroller. The converted sound data is stored in the external data Flash through the SPI
interface. When the button is pressed again, this recording process is stopped.
Once the “PLAY/STOP” button is pressed, the sound data stored in the data Flash is read and converted
to an analog signal through the DAC on the MCU. The analog signal is then sent through a low-pass filter
before it is sent to the amplifier with the set volume. This allows the user to listen to the previously
recorded sound. If the button is pressed again, the play process is stopped.
The board is supplied with +5V from the Micro-USB interface with ESD protection. The applied LDO can
source out 150mA @ 3.3V system power.
The device is a general low-cost electret microphone. See the table below for technical parameters.
It is highly recommended to keep the microphone at least 10cm away from the sound source to avoid
peak clipping or distortion of the signal.
Table 2-1. Microphone Parameters
ParametersValue
Manufacturer part numberBL-MP6022P-2C-44DB
Standard operation voltage (DC)2V
Active current<0.5mA
Sensitivity (1kHz, 0dB=1V/Pa)-44dB ±3dB
S/N ratio58dB
Parrot Hardware
2.2 Filter for ADC
As shown in the figure below, the power for the microphone is VCC_P3V3, which is filtered by a low-pass
filter to reduce noise from the power supply.
Typically, the original voice signal is quite weak, with measured amplitude around 10mV (less than
50mV). So the signal must be amplified and filtered accordingly. To make sure that the signal can be
amplified without being distorted, a voltage offset is required.
Figure 2-1. Microphone Circuit
Impedance< 2.2kΩ
Frequency (Hz)20-16,000
DirectivityOmnidirectional
As shown in the figure below, the original signal is processed in a 4-order Sallen-Key Butterworth lowpass filter. The filter is designed to have a gain of 50 and a cut-off frequency of 4kHz. The amplified signal
is connected to the MCU ADC input 11 (pin PB0_AIN11).
The real filter response vs. frequency curve based on measured data is shown in the figure below.
Figure 2-3. Gain vs. Frequency Curve for the Low-pass Filter of the MIC
2.3 Microcontroller
The ATtiny817 is a tinyAVR 8-bit microcontroller with up to 8KB Flash, 512 bytes of SRAM, and 128 bytes
of EEPROM in a 14-, 20-, and 24-pin package.
The microcontroller uses the latest technologies from Microchip Technology Inc. with a flexible and lowpower architecture including Event System and SleepWalking, accurate analog features, and advanced
peripherals.
The Analog-to-Digital Convert (ADC) peripheral features a 10-bit successive approximation ADC with
capability of a sampling rate of up to 150ksps. The ADC is connected to a 12-channel Analog Multiplexer,
which allows twelve single-ended voltage inputs. The single-ended voltage inputs refer to 0V (GND).
For more detail, refer to the latest data sheet of ATtiny817 available at http://www.microchip.com/
wwwproducts/en/attiny817.
Figure 2-4. ATtiny817 ADC Block Diagram
MUXPOS
CTRLA
EVCTRL
COMMAND
Start
Conversion
Parrot Hardware
WINLT
WINHT
AIN0
AIN1
AIN11
DAC
VREF
TEMP
2.3.2 DAC
The Digital-to-Analog Converter (DAC) converts a digital value to a voltage. ATtiny817 features an 8-bit
Resistor String type DAC, capable of converting 350,000 samples per second (350ksps), with the internal
Voltage Reference (VREF) as upper limit for conversion. The DAC has one continuous time output with
high drive capabilities, which is able to drive a 5kΩ or 50pF load. The DAC has one analog output pin
(DACOUT), namely the PA06, that must be configured before it can be used.
This filter is an 8-order Butterworth low-pass filter with 1V/V gain. The cut-off frequency is designed to be
4kHz with 0.5dB allowable pass band ripple.
Figure 2-6. 8-order Low-pass Chebyshev Filter
Parrot Hardware
As shown in the figure below, the curve is based on measured data of the filter on the board.
Figure 2-7. Gain vs. Frequency Curve for the 8-order Low-pass Filter
MCP6002-I/SN
C6
1uF
TP3
GND
10R
R14
47nF
C7
110k
R13
VCC_VBUS_P5V0
TP1
TP2
BTL AM P for Spea ker
SGND
8 ohm, 2W
Speaker 2831
1
2
SP1
3
2
8
1
4
5
6
7
U1
LM386M-1
3
2
8
1
4
5
6
7
U4
LM386M-1
GND
VCC_VBUS_P5V0
WH0141-1(14*1) B10K
13
2
VR1
POT_METER_3PS2B-PH-K-S
1
2
J1
HEADER-2
100k
R15
SGND
C38
4.7uF
VCC_VBUS_P5V0
GND
SGND
Parrot Hardware
2.5 Power Amplifier
Figure 2-8. Power Amplifier for the Speaker
As shown in the figure above, the LM386M-1 amplifier device is powered by USB +5V. The gain from the
power amplifier circuit is fixed to 20 V/V. The input of this circuit is the analog output of the 8-order low
power filter for the DAC.
In front of the power amplifier, one variable resistor (VR1) and a couple of relative resistors construct a
simple circuit for the users to adjust the loudspeaker volume.
This data Flash from Microchip is an 8Mb SPI serial Flash. It supports single voltage read and write
operations under 2.7-3.6V power supply.
Figure 2-11. External Data Flash
Parrot Hardware
Table 2-4. Pinout for the SPI Interface
SPI Signal NameMCU SPI PinData Flash Pin
SCKPA3pin #6
SSPA4pin #1
MISOPA2pin #2
MOSIPA1pin #5
2.8 UPDI Programming Interface
The ATtiny817 supports UPDI (Unified Program and Debug Interface), which is a Microchip proprietary
interface for external programming and on-chip debugging of a device.
Atmel-ICE supports the UPDI interface. The 2x3 connector for the interface is a 2.54mm pitch throughhole header.
The UPDI Interface is dedicated for the code debugging or reprogramming for the ATtiny817 device.
Atmel-ICE supports this operation.
Figure 3-1. Connection for the Reprogramming
Parrot Hardware
3.2 Firmware
The latest firmware is available through Atmel START: http://start.atmel.com/
Search AVR42777 Parrotʼ in the Examples browser. The project user guide instructions outline how to
download the .atzip package and import the project into Atmel Studio 7.0.
3.3 Programming
Atmel Studio can be used to program the device. Go to Tools → Device Programming → Memories.
EU Declaration of Conformity for Parrot Field Engagement Board
This declaration of conformity is issued by the manufacturer.
The development/evaluation tool is designed to be used for research and development in a laboratory
environment. This development/evaluation tool is not a Finished Appliance, nor is it intended for
incorporation into Finished Appliances that are made commercially available as single functional units to
end users under EU EMC Directive 2004/108/EC and as supported by the European Commission's Guide
for the EMC Directive 2004/108/EC (8th February 2010).
This development/evaluation tool complies with EU RoHS2 Directive 2011/65/EU.
This development/evaluation tool, when incorporating wireless and radio-telecom functionality, is in
compliance with the essential requirement and other relevant provisions of the R&TTE Directive
1999/5/EC and the FCC rules as stated in the declaration of conformity provided in the module datasheet
and the module product page available at www.microchip.com.
For information regarding the exclusive, limited warranties applicable to Microchip products, please see
Microchip’s standard terms and conditions of sale, which are printed on our sales documentation and
available at www.microchip.com.
Parrot Hardware
Signed for and on behalf of Microchip Technology Inc. at Chandler, Arizona, USA.
Microchip provides online support via our web site at http://www.microchip.com/. This web site is used as
a means to make files and information easily available to customers. Accessible by using your favorite
Internet browser, the web site contains the following information:
•Product Support – Data sheets and errata, application notes and sample programs, design
resources, user’s guides and hardware support documents, latest software releases and archived
software
•General Technical Support – Frequently Asked Questions (FAQ), technical support requests,
online discussion groups, Microchip consultant program member listing
•Business of Microchip – Product selector and ordering guides, latest Microchip press releases,
listing of seminars and events, listings of Microchip sales offices, distributors and factory
representatives
Customer Change Notification Service
Microchip’s customer notification service helps keep customers current on Microchip products.
Subscribers will receive e-mail notification whenever there are changes, updates, revisions or errata
related to a specified product family or development tool of interest.
To register, access the Microchip web site at http://www.microchip.com/. Under “Support”, click on
“Customer Change Notification” and follow the registration instructions.
Customer Support
Users of Microchip products can receive assistance through several channels:
•Distributor or Representative
•Local Sales Office
•Field Application Engineer (FAE)
•Technical Support
Customers should contact their distributor, representative or Field Application Engineer (FAE) for support.
Local sales offices are also available to help customers. A listing of sales offices and locations is included
in the back of this document.
Technical support is available through the web site at: http://www.microchip.com/support
Microchip Devices Code Protection Feature
Note the following details of the code protection feature on Microchip devices:
•Microchip products meet the specification contained in their particular Microchip Data Sheet.
•Microchip believes that its family of products is one of the most secure families of its kind on the
market today, when used in the intended manner and under normal conditions.
•There are dishonest and possibly illegal methods used to breach the code protection feature. All of
these methods, to our knowledge, require using the Microchip products in a manner outside the
operating specifications contained in Microchip’s Data Sheets. Most likely, the person doing so is
engaged in theft of intellectual property.
•Microchip is willing to work with the customer who is concerned about the integrity of their code.
•Neither Microchip nor any other semiconductor manufacturer can guarantee the security of their
code. Code protection does not mean that we are guaranteeing the product as “unbreakable.”
Code protection is constantly evolving. We at Microchip are committed to continuously improving the
code protection features of our products. Attempts to break Microchip’s code protection feature may be a
violation of the Digital Millennium Copyright Act. If such acts allow unauthorized access to your software
or other copyrighted work, you may have a right to sue for relief under that Act.
Legal Notice
Information contained in this publication regarding device applications and the like is provided only for
your convenience and may be superseded by updates. It is your responsibility to ensure that your
application meets with your specifications. MICROCHIP MAKES NO REPRESENTATIONS OR
WARRANTIES OF ANY KIND WHETHER EXPRESS OR IMPLIED, WRITTEN OR ORAL, STATUTORY
OR OTHERWISE, RELATED TO THE INFORMATION, INCLUDING BUT NOT LIMITED TO ITS
CONDITION, QUALITY, PERFORMANCE, MERCHANTABILITY OR FITNESS FOR PURPOSE.
Microchip disclaims all liability arising from this information and its use. Use of Microchip devices in life
support and/or safety applications is entirely at the buyer’s risk, and the buyer agrees to defend,
indemnify and hold harmless Microchip from any and all damages, claims, suits, or expenses resulting
from such use. No licenses are conveyed, implicitly or otherwise, under any Microchip intellectual
property rights unless otherwise stated.
Trademarks
The Microchip name and logo, the Microchip logo, AnyRate, AVR, AVR logo, AVR Freaks, BeaconThings,
BitCloud, CryptoMemory, CryptoRF, dsPIC, FlashFlex, flexPWR, Heldo, JukeBlox, KeeLoq, KeeLoq logo,
Kleer, LANCheck, LINK MD, maXStylus, maXTouch, MediaLB, megaAVR, MOST, MOST logo, MPLAB,
OptoLyzer, PIC, picoPower, PICSTART, PIC32 logo, Prochip Designer, QTouch, RightTouch, SAM-BA,
SpyNIC, SST, SST Logo, SuperFlash, tinyAVR, UNI/O, and XMEGA are registered trademarks of
Microchip Technology Incorporated in the U.S.A. and other countries.
ClockWorks, The Embedded Control Solutions Company, EtherSynch, Hyper Speed Control, HyperLight
Load, IntelliMOS, mTouch, Precision Edge, and Quiet-Wire are registered trademarks of Microchip
Technology Incorporated in the U.S.A.
Adjacent Key Suppression, AKS, Analog-for-the-Digital Age, Any Capacitor, AnyIn, AnyOut, BodyCom,
chipKIT, chipKIT logo, CodeGuard, CryptoAuthentication, CryptoCompanion, CryptoController,
dsPICDEM, dsPICDEM.net, Dynamic Average Matching, DAM, ECAN, EtherGREEN, In-Circuit Serial
Programming, ICSP, Inter-Chip Connectivity, JitterBlocker, KleerNet, KleerNet logo, Mindi, MiWi,
motorBench, MPASM, MPF, MPLAB Certified logo, MPLIB, MPLINK, MultiTRAK, NetDetach, Omniscient
Code Generation, PICDEM, PICDEM.net, PICkit, PICtail, PureSilicon, QMatrix, RightTouch logo, REAL
ICE, Ripple Blocker, SAM-ICE, Serial Quad I/O, SMART-I.S., SQI, SuperSwitcher, SuperSwitcher II, Total
Endurance, TSHARC, USBCheck, VariSense, ViewSpan, WiperLock, Wireless DNA, and ZENA are
trademarks of Microchip Technology Incorporated in the U.S.A. and other countries.
SQTP is a service mark of Microchip Technology Incorporated in the U.S.A.
Silicon Storage Technology is a registered trademark of Microchip Technology Inc. in other countries.
GestIC is a registered trademark of Microchip Technology Germany II GmbH & Co. KG, a subsidiary of
Microchip Technology Inc., in other countries.
All other trademarks mentioned herein are property of their respective companies.
Microchip received ISO/TS-16949:2009 certification for its worldwide headquarters, design and wafer
fabrication facilities in Chandler and Tempe, Arizona; Gresham, Oregon and design centers in California
and India. The Company’s quality system processes and procedures are for its PIC® MCUs and dsPIC
DSCs, KEELOQ® code hopping devices, Serial EEPROMs, microperipherals, nonvolatile memory and
analog products. In addition, Microchip’s quality system for the design and manufacture of development
systems is ISO 9001:2000 certified.