- Notifications
You must be signed in to change notification settings - Fork0
An introduction to adc's on megaavr 0 series
License
microchip-pic-avr-examples/atmega4809-adc-basics-mplab
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
MegaAVR® 0-series devices feature a 10-bit Successive Approximation Register (SAR) Analog-to-Digital Converter (ADC) capable of conversion rates up to 115 ksps. It features a flexible multiplexer, which allows the ADC to measure the voltage at multiple single-ended input pins.
There are four modes we will explore in this example:
- ADC Free-Running mode
- ADC Single Conversion mode
- ADC Window Comparator mode
- ADC Sample Accumulator mode
This is an example of how to get started with the ADC on the ATmega4809. This is based on the application noteAN2573.
- MPLAB® X IDE v6.25 or later
- MPLAB® Data Visualizer
- Studio Data Visualizer
- MPLAB® XC8 (v3.00) alternativelyAVR/GNU C Compiler 5.4.0 can be used
- ATmega_DFP 3.4.282 or later
- Port PD6 is the ADC channel input. Connect a cable here to interact with the ADC.
- Download the zip file or clone the example to get the source code.
- Open
atmega4809-adc-basics-mplab.X
in MPLAB. - Connect the ATmega4809 Xplained Pro to the computer with a micro USB cable.
- Make sure the kit is selected as the tool to be programmed under project settings.
- Press theMake and Program button to program the device.
- Open the desired terminal application or Data Visualizer and access the serial port associated with the Xplained Pro.
TheAN2573 application note shows how to adjust the voltage level of the ADC input port, and the corresponding approximated value will be displayed via UART using the Data Visualizer.
We have here shown how to set up and get started with the ADC basics project. For further information about this example and the functionality of the ADC, refer to theAN2573 application note.
About
An introduction to adc's on megaavr 0 series
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors4
Uh oh!
There was an error while loading.Please reload this page.