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
+5-10Lines changed: 5 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,9 +34,7 @@ In this project we will read the analog signal from the potentiometer and send i
34
34
35
35
To be able to read the value we would have to configure the Analog Digital Converter (ADC) to read the value from the correct pin.
36
36
When using the *Curiosity Nano Adapter* with the *POT 3 click* in space **1** we can read that Analog 1 - AN1 is connected to PORTA - RA0 on the **PIC18F57Q43**
37
-
38
-
TODO: Need to add line from AN1 click in 1 to RA0?
39
-
TODO: bigger picture
37
+
40
38

41
39
42
40
## Setup
@@ -51,15 +49,13 @@ In the *Device Resources* window scroll to find *ADCC* click the dropdown arrow
The ADCC was used in this code example to periodically measure the analog channel RA0 (POT) which is connected to a 10kΩ potentiometer on the POT3 Click board. The ADCC was programmed to use Timer1 as an auto-conversion trigger in order to core-independently perform a conversion every 500ms. Additionally, the computation feature of the ADCC was utilized in this example to perform a burst average conversion core independently every time the ADC gets triggered. The ADCC was setup in such a way where it takes 32 consecutive conversions and accumulates the results whenever triggered, and then automatically divides the results by 32 by right shifting the accumulated value by 5 to provide the filtered average ADC result. The MPLAB Code Configurator (MCC) was used to setup the ADCC module for this code example as shown below.
The Timer1 module in this example was used as the ADCC auto-conversion trigger source, meaning that every time Timer1 overflows / rolls over the ADC will be triggered in hardware to begin a conversion. The Timer1 clock source selected was MFINTOSC_31.25kHz with no prescaler, and the Timer1 period was configured to be 500ms. By selecting Timer1 as the auto-conversion trigger source in the ADCC MCC Configuration window, no other actions or setup is needed for the Timer1 work with the ADC in this manner. The MPLAB Code Configurator (MCC) was used to configure the Timer1 module for this code example as shown below.
58
+
The Timer1 module in this example was used as the ADCC auto-conversion trigger source, meaning that every time Timer1 overflows / rolls over the ADC will be triggered in hardware to begin a conversion. The Timer1 clock source selected was MFINTOSC_31.25kHz with no prescaler, and the Timer1 period was configured to be 500ms. By selecting Timer1 as the auto-conversion trigger source in the ADCC easy view window, no other actions or setup is needed for the Timer1 work with the ADC in this manner. The MPLAB Code Configurator (MCC) was used to configure the Timer1 module for this code example as shown below.
@@ -83,15 +77,16 @@ In the *Pins Grid View* find ANx for the input pin to the ADC module. AN1 coming
83
77
84
78

85
79
86
-
RA0 can be configured with a custom pin name in this case we called it POT to make the generated API more readable.
80
+
In the Pins tab, RA0 can be configured with a custom pin name in this case we called it POT to make the generated API more readable.
87
81
88
82

89
83
90
84
In the *Pins Grid View* find UART3 RX3 and TX3 for the connections for the Serial communications int the PIC18F57Q43 cnano. Select TX3 and RX3 as shown in figure below with the coresponding padlock symbol.
In the *Device Resources* window click the dropdown arrow next to *Drivers* to expand the choices. Find *Data Streamer Driver* and click the green plus symbol to add the driver to the solution.
0 commit comments