![](/html/fd/fd5e/fd5ec8e666d03c2a43b6b142b5491a5bc5167c0d066220710d7e5f8e98c27bd4/bg1.png)
Parrot Hardware
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://
start.atmel.com/.
Features
• Voice Record and Playback
• Electret Microphone
• Volume Control
• 8Mb SPI Data Flash
• Single-Wire Programming via UPDI
© 2017 Microchip Technology Inc.
User Guide
DS40001916A-page 1
![](/html/fd/fd5e/fd5ec8e666d03c2a43b6b142b5491a5bc5167c0d066220710d7e5f8e98c27bd4/bg2.png)
Parrot Hardware
Table of Contents
Introduction......................................................................................................................1
Features.......................................................................................................................... 1
1. Block Diagram........................................................................................................... 3
2. Hardware Details....................................................................................................... 4
2.1. Microphone...................................................................................................................................4
2.2. Filter for ADC................................................................................................................................4
2.3. Microcontroller..............................................................................................................................5
2.3.1. ADC............................................................................................................................... 6
2.3.2. DAC............................................................................................................................... 6
2.4. Filter for DAC................................................................................................................................7
2.5. Power Amplifier............................................................................................................................ 8
2.6. User Interfaces............................................................................................................................. 9
2.6.1. Buttons...........................................................................................................................9
2.6.2. LEDs..............................................................................................................................9
2.7. External Data Flash....................................................................................................................10
2.8. UPDI Programming Interface..................................................................................................... 10
3. Firmware Programming........................................................................................... 12
3.1. Connection................................................................................................................................. 12
3.2. Firmware.................................................................................................................................... 12
3.3. Programming..............................................................................................................................12
4. Revision History.......................................................................................................14
5. Object of Declaration............................................................................................... 15
The Microchip Web Site................................................................................................ 16
Customer Change Notification Service..........................................................................16
Customer Support......................................................................................................... 16
Microchip Devices Code Protection Feature................................................................. 16
Legal Notice...................................................................................................................17
Trademarks................................................................................................................... 17
Quality Management System Certified by DNV.............................................................18
Worldwide Sales and Service........................................................................................19
© 2017 Microchip Technology Inc.
User Guide
DS40001916A-page 2
![](/html/fd/fd5e/fd5ec8e666d03c2a43b6b142b5491a5bc5167c0d066220710d7e5f8e98c27bd4/bg3.png)
1. Block Diagram
ATtiny817
DACADC
SPI
Data Flash
OP
AMP
Filter
Power
AMP
REC PLAY/STOP BACK FORWARD
GPIO x6
PWR REC
GPIO x2
5V
3.3V
Volume
Control
ERASE
LDO
3.3V
User
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.
Figure 1-1. Parrot Board
© 2017 Microchip Technology Inc.
User Guide
DS40001916A-page 3
![](/html/fd/fd5e/fd5ec8e666d03c2a43b6b142b5491a5bc5167c0d066220710d7e5f8e98c27bd4/bg4.png)
2. Hardware Details
1uF
C19
10k
R21
VCC_P3V3
SGND
TP5
BL-MP6022P-2C-44DB
1
2
G
GND
S
D
Microphone
MIC1
SGND
3.3nF
C20
SGND
C17
4.7uF
100k
R18
100nF
C15
2k
R19
SGND
39k
R20
24k
R26
VCC_P3V3
ADC_VF_HALF
18k
R40
1uF
C18
2.1 Microphone
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
Parameters Value
Manufacturer part number BL-MP6022P-2C-44DB
Standard operation voltage (DC) 2V
Active current <0.5mA
Sensitivity (1kHz, 0dB=1V/Pa) -44dB ±3dB
S/N ratio 58dB
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
Directivity Omnidirectional
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).
© 2017 Microchip Technology Inc.
User Guide
DS40001916A-page 4
![](/html/fd/fd5e/fd5ec8e666d03c2a43b6b142b5491a5bc5167c0d066220710d7e5f8e98c27bd4/bg5.png)
Mic. with P re-Amp lification an d filter
TP6
-
+
5
6
7
U5B
MCP6002-I/SN
10nF
C39
5.6k
R39
1.5nF
C24
100nF
C22
GND
VCC_P3V3
15k
R42
PB0_AIN11
-
+
3
2
1
84
U5A
MCP6002-I/SN
SGND
VCC_P3V3
15k
R24
2.4k
R25
SGND
GND
1uF
C23
0R
R44
10nF
C21
2.2nF
C16
11k
R23
6.8k
R22
SGNDSGND
2.4k
R43
1uF
C40
SGND GND
J6
18k
R40
0R
R41
Parrot Hardware
Figure 2-2. Amplifier and Filter Circuit
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.
© 2017 Microchip Technology Inc.
User Guide
DS40001916A-page 5
![](/html/fd/fd5e/fd5ec8e666d03c2a43b6b142b5491a5bc5167c0d066220710d7e5f8e98c27bd4/bg6.png)
2.3.1 ADC
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.
...
Internal ref
VDD
ADC
VREF
Reference sel.
Enable,
Resolution
CTRLC
prescaler
CTRLB
Number of
Accumulated
Samples
+
<
>
RES
accumulate
Threshold
(IRQ)
Result Ready
(IRQ)
© 2017 Microchip Technology Inc.
User Guide
DS40001916A-page 6