You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+14-5Lines changed: 14 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,9 @@
2
2
3
3
# ATMEGA4809 Noise Countermeasures for ADC Applications
4
4
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. The example code is based on the application note [AN2551](#Related-Documentation)
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 inputsignal is fed through a Sample-and-Hold circuit which ensures that the input voltage to the ADC is held ata constant level during sampling.
6
+
7
+
The example code is based on the application note [AN2551](#Related-Documentation)
6
8
7
9
## Related Documentation
8
10
@@ -28,10 +30,17 @@ This is an example for noise countermeasures for ADC applications on the ATMEGA4
28
30
29
31
1. Open `NoiseCountermeasuresforADCApplicationswithmegaAVR0-series.X` in MPLAB
30
32
2. Connect the ATmega4809 Xplained Pro to your computer with a micro usb cable.
31
-
3. Make sure the kit is selected as the tool to be programmed under project settings
32
-
4. Press the make and program button to program the device.
33
-
5. Open data visualizer to interact with the virtual comport over UART on the devkit. The baud rate is `19200`
34
-
6. Follow Appendix A in [AN2551](#Related-Documentation) for step by step instructions on how to graph the samples
33
+
3. Use these defines to plot a graph without noise
34
+
```c
35
+
#defineHARMONIC_NOISE 0
36
+
#define ADC_64X_ACCUMULATOR_ENABLE 0
37
+
#define SAMPLING_DELAY 0
38
+
#define ENABLE_ASDV 0
39
+
```
40
+
4. Make sure the kit is selected as the tool to be programmed under project settings
41
+
5. Press the make and program button to program the device.
42
+
6. Open data visualizer to interact with the virtual comport over UART on the devkit. The baud rate is `19200`
43
+
7. Follow Appendix A in [AN2551](#Related-Documentation) for step by step instructions on how to graph the samples
35
44
36
45
Filtered ADC values will be passed over the UART port, these can be parsed or graphed for a visual understanding of ADC value.
0 commit comments