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
The Digital-to-Analog Converter (DAC) converts a digital value to an analog voltage. The DAC module offers flexible input source selection, provision to route output to other peripherals such as analog comparator and Analog to Digital converter, and configurable registers set.
3
7
4
8
DAC has a flexible option to choose both positive as well as negative reference voltage sources, depending on application requirement.
5
9
6
10
This Xpress example discusses how DAC peripherals from PICQ10, can be used to generate reference voltage and different signals.
-[PIC18-Q10 Product Family Page](https://www.microchip.com/design-centers/8-bit/pic-mcus/device-selection/pic18f-q10-product-family)
16
+
-[PIC18F47Q10 Data Sheet](http://ww1.microchip.com/downloads/en/DeviceDoc/40002043D.pdf)
17
+
-[PIC18F47Q10 Code Examples on GitHub](https://github.com/microchip-pic-avr-examples?q=pic18f47q10-cnano)
8
18
9
19
# Reference Voltage and Waveform Generation Using DAC
10
20
The signals generated in this example are “Sine wave, Triangular wave, Square wave, Sawtooth wave, and constant (reference) voltage signals”. The digital Look Up Table (LUT) is created and fed into DAC input to generate the corresponding signal.
@@ -20,7 +30,7 @@ The signals generated in this example are “Sine wave, Triangular wave, Square
20
30
21
31
The following figure 1 shows an overview of the Signal Generator Example.
With full program and debug capabilities, the PIC18F47Q10 Curiosity Nano evaluation kit offers complete support for the new design. With the award-winning MPLAB X integrated development platform and MPLAB Code Configurator (MCC), the kit provides access to the Intelligent analog and Core Independent Peripherals on the PIC18F47Q10. Figure 2 shows the PIC18F47Q10 Curiosity Nano board.
System configuration in MCC is used for Microcontroller oscillator configuration, PLL, Watchdog timer and low voltage programming settings. In this example internal oscillator of 4MHz frequency with clock divider 1 is used as a system clock and the Watchdog timer is disabled.
63
84
64
-
The following figure 3 shows the system configuration settings in MCC.
85
+
The following figure 4 shows the system configuration settings in MCC.
The on-board switch SW0 on the Curiosity Nano board is connected to PE2. As external interrupt configuration is not possible on pin PE2, pin RC2 is configured as Interrupt on Change (IOC) and RC2 is shorted to RE2 using external jumper for detecting button press event using IOC feature.
92
113
93
114
# Operation
94
115
95
-
*Setup the hardware, as per Hardware Setup (Refer Figure 2.1 and 2.2).
116
+
*Setup the hardware, as per Hardware Setup (Refer Figure 3.1 and 3.2).
96
117
*Connect the pins RE2 and RC2 using the jumper.
97
118
*Connect RA2 (DAC1OUT1 Pin) to the positive terminal of the Scope (DSO/Oscilloscope) and connect GND (CNANO board ground pin) to GND terminal of scope.
98
119
*Power on the CNANO board by connecting the micro USB cable from micro USB socket (Micro USB Connector) on the CNANO board to the PC USB socket.
99
120
*The Curiosity Nano board should appear as a Mass Storage Device after connecting to the PC.
0 commit comments