-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MPAE-8587: Initial example code and readme added
- Loading branch information
Showing
31 changed files
with
13,136 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,46 @@ | ||
<!-- Please do not change this logo with link --> | ||
[![MCHP](images/microchip.png)](https://www.microchip.com) | ||
|
||
# Update the title for avr128db48-low-bom-mic-interface-using-opamp-mplab-mcc here | ||
# Low-BOM Microphone Interface Using the Analog Signal Conditioning (OPAMP) Peripheral | ||
<p align="left"> | ||
<img width=800px height=auto src="images/setup.png"> | ||
</p> | ||
|
||
<!-- This is where the introduction to the example goes, including mentioning the peripherals used --> | ||
A new feature introduced in the AVR® DB family of microcontrollers (MCUs) is the Analog Signal Conditioning (OPAMP) peripheral. In this example, the OPAMP peripheral is used to amplify a weak signal up to the 100-millivolt range so that it can be detected by an analog comparator in the MCU or converted to a digital signal by the MCU’s analog-to-digital converter (ADC). | ||
Up to three internal op amps are available for configuration in the AVR DB. The configuration for this example can be seen in the figure above. Including the MCU the setup uses an external electret microphone, a resistor, and a capacitor. For more information about setup and code, see the [application note](https://microchip.com/DS00003631). | ||
|
||
## Related Documentation | ||
|
||
<!-- Any information about an application note or tech brief can be linked here. Use unbreakable links! | ||
In addition a link to the device family landing page and relevant peripheral pages as well: | ||
- [AN3381 - Brushless DC Fan Speed Control Using Temperature Input and Tachometer Feedback](https://microchip.com/00003381/) | ||
- [PIC18F-Q10 Family Product Page](https://www.microchip.com/design-centers/8-bit/pic-mcus/device-selection/pic18f-q10-product-family) --> | ||
* [AN3631 - Low-BOM Microphone Interface Using the Analog Signal Conditioning (OPAMP) Peripheral](https://microchip.com/DS00003631) | ||
* [AVR128DB48 Curiosity Nano User Guide](https://www.microchip.com/DS50003037) | ||
* [AVR128DB48 Device Page](https://www.microchip.com/wwwproducts/en/AVR128DB48) | ||
|
||
## Software Used | ||
|
||
<!-- All software used in this example must be listed here. Use unbreakable links! | ||
- MPLAB® X IDE 5.30 or newer [(microchip.com/mplab/mplab-x-ide)](http://www.microchip.com/mplab/mplab-x-ide) | ||
- MPLAB® XC8 2.10 or a newer compiler [(microchip.com/mplab/compilers)](http://www.microchip.com/mplab/compilers) | ||
- MPLAB® Code Configurator (MCC) 3.95.0 or newer [(microchip.com/mplab/mplab-code-configurator)](https://www.microchip.com/mplab/mplab-code-configurator) | ||
- MPLAB® Code Configurator (MCC) Device Libraries PIC10 / PIC12 / PIC16 / PIC18 MCUs [(microchip.com/mplab/mplab-code-configurator)](https://www.microchip.com/mplab/mplab-code-configurator) | ||
- Microchip PIC18F-Q Series Device Support (1.4.109) or newer [(packs.download.microchip.com/)](https://packs.download.microchip.com/) --> | ||
* [MPLAB® X IDE](http://www.microchip.com/mplab/mplab-x-ide) 5.40 or newer | ||
* [MPLAB® XC8](http://www.microchip.com/mplab/compilers) 2.31 or a newer compiler | ||
* [MPLAB® Code Configurator (MCC)](https://www.microchip.com/mplab/mplab-code-configurator) 4.0.0 or newer | ||
* MPLAB® AVR-Dx_DFP version 1.6.88 or newer | ||
|
||
## Hardware Used | ||
|
||
<!-- All hardware used in this example must be listed here. Use unbreakable links! | ||
- PIC18F47Q10 Curiosity Nano [(DM182029)](https://www.microchip.com/Developmenttools/ProductDetails/DM182029) | ||
- Curiosity Nano Base for Click boards™ [(AC164162)](https://www.microchip.com/Developmenttools/ProductDetails/AC164162) | ||
- POT Click board™ [(MIKROE-3402)](https://www.mikroe.com/pot-click) --> | ||
* [AVR128DB48 Curiosity Nano](https://www.microchip.com/DevelopmentTools/ProductDetails/PartNO/EV35L43A) | ||
* Electret microphone | ||
* One 2.2kΩ resistor | ||
* One 1µF capacitor | ||
|
||
## Setup | ||
|
||
<!-- Explain how to connect hardware and set up software. Depending on complexity, step-by-step instructions and/or tables and/or images can be used --> | ||
* Connect the hardware together as seen in the schematic of the application note | ||
|
||
## Operation | ||
|
||
<!-- Explain how to operate the example. Depending on complexity, step-by-step instructions and/or tables and/or images can be used --> | ||
* Connect the AVR128DB48 Curiosity Nano to a computer using a USB cable | ||
* Clone the repository or download the zip to get the source code | ||
* Open the .X project with MPLAB | ||
* Press Make and Program Device to run the example | ||
|
||
## Conclusion | ||
After going through this example, you should have a better understanding of how to set up the OPAMP peripheral to amplify weak signals from sensors into detectable signals for the MCU. | ||
|
||
## Summary | ||
|
||
<!-- Summarize what the example has shown --> |
113 changes: 113 additions & 0 deletions
113
avr128db48-low-bom-mic-interface-using-opamp-mplab-mcc.X/Makefile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,113 @@ | ||
# | ||
# There exist several targets which are by default empty and which can be | ||
# used for execution of your targets. These targets are usually executed | ||
# before and after some main targets. They are: | ||
# | ||
# .build-pre: called before 'build' target | ||
# .build-post: called after 'build' target | ||
# .clean-pre: called before 'clean' target | ||
# .clean-post: called after 'clean' target | ||
# .clobber-pre: called before 'clobber' target | ||
# .clobber-post: called after 'clobber' target | ||
# .all-pre: called before 'all' target | ||
# .all-post: called after 'all' target | ||
# .help-pre: called before 'help' target | ||
# .help-post: called after 'help' target | ||
# | ||
# Targets beginning with '.' are not intended to be called on their own. | ||
# | ||
# Main targets can be executed directly, and they are: | ||
# | ||
# build build a specific configuration | ||
# clean remove built files from a configuration | ||
# clobber remove all built files | ||
# all build all configurations | ||
# help print help mesage | ||
# | ||
# Targets .build-impl, .clean-impl, .clobber-impl, .all-impl, and | ||
# .help-impl are implemented in nbproject/makefile-impl.mk. | ||
# | ||
# Available make variables: | ||
# | ||
# CND_BASEDIR base directory for relative paths | ||
# CND_DISTDIR default top distribution directory (build artifacts) | ||
# CND_BUILDDIR default top build directory (object files, ...) | ||
# CONF name of current configuration | ||
# CND_ARTIFACT_DIR_${CONF} directory of build artifact (current configuration) | ||
# CND_ARTIFACT_NAME_${CONF} name of build artifact (current configuration) | ||
# CND_ARTIFACT_PATH_${CONF} path to build artifact (current configuration) | ||
# CND_PACKAGE_DIR_${CONF} directory of package (current configuration) | ||
# CND_PACKAGE_NAME_${CONF} name of package (current configuration) | ||
# CND_PACKAGE_PATH_${CONF} path to package (current configuration) | ||
# | ||
# NOCDDL | ||
|
||
|
||
# Environment | ||
MKDIR=mkdir | ||
CP=cp | ||
CCADMIN=CCadmin | ||
RANLIB=ranlib | ||
|
||
|
||
# build | ||
build: .build-post | ||
|
||
.build-pre: | ||
# Add your pre 'build' code here... | ||
|
||
.build-post: .build-impl | ||
# Add your post 'build' code here... | ||
|
||
|
||
# clean | ||
clean: .clean-post | ||
|
||
.clean-pre: | ||
# Add your pre 'clean' code here... | ||
# WARNING: the IDE does not call this target since it takes a long time to | ||
# simply run make. Instead, the IDE removes the configuration directories | ||
# under build and dist directly without calling make. | ||
# This target is left here so people can do a clean when running a clean | ||
# outside the IDE. | ||
|
||
.clean-post: .clean-impl | ||
# Add your post 'clean' code here... | ||
|
||
|
||
# clobber | ||
clobber: .clobber-post | ||
|
||
.clobber-pre: | ||
# Add your pre 'clobber' code here... | ||
|
||
.clobber-post: .clobber-impl | ||
# Add your post 'clobber' code here... | ||
|
||
|
||
# all | ||
all: .all-post | ||
|
||
.all-pre: | ||
# Add your pre 'all' code here... | ||
|
||
.all-post: .all-impl | ||
# Add your post 'all' code here... | ||
|
||
|
||
# help | ||
help: .help-post | ||
|
||
.help-pre: | ||
# Add your pre 'help' code here... | ||
|
||
.help-post: .help-impl | ||
# Add your post 'help' code here... | ||
|
||
|
||
|
||
# include project implementation makefile | ||
include nbproject/Makefile-impl.mk | ||
|
||
# include project make variables | ||
include nbproject/Makefile-variables.mk |
Oops, something went wrong.