Skip to content

Commit abe6571

Browse files
Ole AarhaugOle Aarhaug
authored andcommitted
MPAE-4790: Updated Project
1 parent 966ed09 commit abe6571

File tree

1 file changed

+14
-13
lines changed

1 file changed

+14
-13
lines changed

README.md

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
# ATMEGA4809 Noise Countermeasures for ADC Applications
44

5-
This is an example for noise countermeasures for ADC applications on the ATMEGA4809, this is a general example which is applicable to the whole megaAVR 0-series. In the ADCs implemented in megaAVR® 0-series, the input signal is fed through a Sample-and-Hold circuit which ensures that the input voltage to the ADC is held at a constant level during sampling.
5+
This is an example for noise countermeasures for ADC applications on the ATmega4809, this is a general example which is applicable to the whole megaAVR® 0-series. In the ADCs implemented in megaAVR® 0-series, the input signal is fed through a Sample-and-Hold circuit which ensures that the input voltage to the ADC is held at a constant level during sampling.
66

7-
The example code is based on the application note [AN2551](#Related-Documentation)
7+
The example code is based on the application note [AN2551](https://www.microchip.com/wwwAppNotes/AppNotes.aspx?appnote=en600674).
88

99
## Related Documentation
1010

@@ -18,35 +18,36 @@ The example code is based on the application note [AN2551](#Related-Documentatio
1818
- [MPLAB Data Visualizer](https://gallery.microchip.com/packages/MPLAB-Data-Visualizer-Standalone(Windows)/)
1919
- [Studio Data visualizer](https://www.microchip.com/mplab/avr-support/data-visualizer)
2020
- ATmega_DFP 2.2.108 or later
21-
- [XC8 (v2.20)](https://www.microchip.com/mplab/compilers) alternativly [AVR/GNU C Compiler 5.4.0](https://www.microchip.com/mplab/avr-support/avr-and-arm-toolchains-c-compilers) can be used
21+
- [XC8 (v2.20)](https://www.microchip.com/mplab/compilers) alternatively [AVR/GNU C Compiler 5.4.0](https://www.microchip.com/mplab/avr-support/avr-and-arm-toolchains-c-compilers) can be used
2222

2323
## Hardware Used
2424

2525
- [ATmega4809 Xplained Pro](https://www.microchip.com/developmenttools/ProductDetails/ATMEGA4809-XPRO)
2626

2727
## Setup
2828

29-
* The ADC input is mapped to `PD5` and will change the ADC values being sent over UART depending on the voltage applied.
29+
* The ADC input is mapped to `PD5` and will change the ADC values being sent over UART depending on the voltage applied
3030

3131
## Operation
3232

33-
1. Open `NoiseCountermeasuresforADCApplicationswithmegaAVR0-series.X` in MPLAB
34-
2. Connect the ATmega4809 Xplained Pro to your computer with a micro usb cable.
35-
3. Use these defines to plot a graph without noise
33+
1. Download the zip file or clone the example to get the source code.
34+
2. Open `NoiseCountermeasuresforADCApplicationswithmegaAVR0-series.X` in MPLAB
35+
3. Connect the ATmega4809 Xplained Pro to your computer with a micro usb cable.
36+
4. Use these defines to plot a graph without noise
3637
```c
3738
#define HARMONIC_NOISE 0
3839
#define ADC_64X_ACCUMULATOR_ENABLE 0
3940
#define SAMPLING_DELAY 0
4041
#define ENABLE_ASDV 0
4142
```
42-
4. Make sure the kit is selected as the tool to be programmed under project settings.
43-
5. Press the make and program button to program the device.
44-
6. Open data visualizer to interact with the virtual comport over UART on the devkit. The baud rate is `19200`.
45-
7. Follow Appendix A in [AN2551](#Related-Documentation) for step by step instructions on how to graph the samples.
46-
* Alternatively you can open the provided MPLAB Data Visualizer config `MPLAB_Data_Visualizer_Config_Noise_Countermesure.json` file. Make sure the correct COM port is selected when it's open.
43+
5. Make sure the kit is selected as the tool to be programmed under project settings.
44+
6. Press the make and program button to program the device.
45+
7. Open data visualizer to interact with the virtual comport over UART on the devkit. The baud rate is `19200`.
46+
8. Follow Appendix A in [AN2551](https://www.microchip.com/wwwAppNotes/AppNotes.aspx?appnote=en600674) for step by step instructions on how to graph the samples.
47+
* Alternatively, the MPLAB Data Visualizer can be used. To start plotting data, click load workspace and choose the provided config file `MPLAB_Data_Visualizer_Config_Noise_Countermesure.json`. Make sure the correct COM port is selected when it is opened. Documentation for the MPLAB Data Visualizer can be opened inside the visualizer by clicking the ‘?’ symbol or by pressing F1
4748

4849
Filtered ADC values will be passed over the UART port, these can be parsed or graphed for a visual understanding of ADC value.
4950

5051
## Conclusion
5152

52-
We have here shown how to get started with the [AN2551](#Related-Documentation) appnote. For more details about the code and theory of operation please inspect the appnote itself.
53+
We have here shown how to get started with the [AN2551](https://www.microchip.com/wwwAppNotes/AppNotes.aspx?appnote=en600674) appnote. For more details about the code and theory of operation please inspect the appnote itself.

0 commit comments

Comments
 (0)