Skip to content

Commit 98cd221

Browse files
Irene Mary AbrahamIrene Mary Abraham
authored andcommitted
MPAE-12932: updated Readme
1 parent 9e93584 commit 98cd221

File tree

1 file changed

+33
-32
lines changed

1 file changed

+33
-32
lines changed

README.md

Lines changed: 33 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -11,22 +11,22 @@ This demo example discusses how DAC peripheral from PIC18F Q10 family of microco
1111

1212
# Related Documents / Useful Links
1313

14-
- [TB3238 - 5-Bit Digital-to-Analog Converter](https://www.microchip.com/DS90003238)
15-
- [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](https://www.microchip.com/DS40002043)
17-
- [PIC18F47Q10 Code Examples on GitHub](https://github.com/microchip-pic-avr-examples?q=pic18f47q10)
14+
* [TB3238 - 5-Bit Digital-to-Analog Converter](https://www.microchip.com/DS90003238)
15+
* [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](https://www.microchip.com/DS40002043)
17+
* [PIC18F47Q10 Code Examples on GitHub](https://github.com/microchip-pic-avr-examples?q=pic18f47q10)
1818

1919
# Reference Voltage and Waveform Generation Using DAC
2020
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.
2121

2222
### The LUT is generated by considering following parameters-
2323
1. Constant (Reference) Voltage:
24-
* Voltage 1.6V
25-
* Voltage 3.0V
24+
* Voltage 1.6V
25+
* Voltage 3.0V
2626

2727
2. Waveforms:
28-
* Amplitude of the signal – 3.3V
29-
* Frequency of the signal – 100Hz (DAC register update frequency can be modified by changing timer period to change the frequency of the generated signal.)
28+
* Amplitude of the signal – 3.3V
29+
* Frequency of the signal – 100Hz (DAC register update frequency can be modified by changing timer period to change the frequency of the generated signal.)
3030

3131
Figure 1 shows an overview of the Signal Generator Example.
3232

@@ -40,7 +40,7 @@ The onboard push button (SW0) is used to switch between the Constant voltage and
4040

4141
This example generates the reference voltage at power up, and the signal output will be changed after each switch press as per following sequence
4242

43-
1. Reference voltage 1.6V (on Power up)
43+
1. Reference voltage 1.6V (on Power up)
4444
2. Reference voltage 3V
4545
3. Sine Wave
4646
4. Triangular Wave
@@ -49,21 +49,21 @@ This example generates the reference voltage at power up, and the signal output
4949

5050
**Frequency calculation for the generated signal**
5151

52-
- When the signal to be generated is Sine wave, Triangular wave, Square wave or Sawtooth wave, frequency of the generated signal is decided by the DAC register update frequency and total number of points in one cycle of the signal.
53-
- Timer 2 interrupt is used for updating the DAC register.
54-
- Frequency of the generated signal = 1/ (total number of points in one cycle X Timer 2 period) = 1/(128 X 78.13 us) = 100 Hz.
55-
- For changing the frequency of the generated signal timer 2 period can be changed.
52+
* When the signal to be generated is Sine wave, Triangular wave, Square wave or Sawtooth wave, frequency of the generated signal is decided by the DAC register update frequency and total number of points in one cycle of the signal.
53+
* Timer 2 interrupt is used for updating the DAC register.
54+
* Frequency of the generated signal = 1/ (total number of points in one cycle X Timer 2 period) = 1/(128 X 78.13 us) = 100 Hz.
55+
* For changing the frequency of the generated signal timer 2 period can be changed.
5656

5757
***Note: The system clock frequency also has impact on the maximum frequency that can be generated using this method.
58-
For generating higher frequecy signal the higher system clock frequency should be used.
58+
For generating higher frequency signal the higher system clock frequency should be used.
5959
With 64 MHz of system clock frequency the maximum frequency generated is 1.1 KHz.***
6060

6161
Operation of this example is discussed in following section.
6262

6363
# Hardware used
6464
* [PIC18F47Q10 Curiosity Nano evaluation board](https://www.microchip.com/Developmenttools/ProductDetails/DM182029)
6565

66-
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.
66+
With full program and debug capabilities, the PIC18F47Q10 Curiosity Nano evaluation kit offers complete support for the new design. With 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.
6767

6868
![PIC18F47Q10_Curiosity_Nano_board](images/PIC18F47Q10_Curiosity_Nano_board.png)
6969

@@ -96,13 +96,14 @@ Open "Clock Control" setup present under "System" dropdown menu in "Project Reso
9696

9797
* Set "Clock Source" as "HFINTOSC"
9898
* Set "HF Internal Clock" as "16_MHz"
99-
* Set "Clock Divider" as "1"
99+
* Set "Clock Divider" as "1"
100+
100101

101102
![Clock Control](images/clock_control.png)
102103

103104
**Figure 4: Clock Control**
104105

105-
* **Add peripherals to the project**
106+
## -> Add peripherals to the project
106107

107108
Add DAC, TMR2 and TMR4 peripherals to the project from Device Resources → Drivers.
108109

@@ -187,57 +188,57 @@ As pin RE2 cannot be used as input pin for timer 4, pin RC2 is configured as tim
187188

188189
# Demo Operation
189190

190-
* Setup the hardware, as per Hardware Setup (Refer Figure 3.1 and 3.2).
191-
* Connect the pins RE2 and RC2 using the jumper.
192-
* 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.
193-
* 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.
194-
* Click on "Make and Program Device"
191+
* Setup the hardware, as per Hardware Setup (Refer Figure 3.1 and 3.2).
192+
* Connect the pins RE2 and RC2 using the jumper.
193+
* 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.
194+
* 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.
195+
* Click on "Make and Program Device"
195196

196197

197198
![Programming_the_device](images/Programming_the_device.png)
198199

199200
**Figure 11: Programing the device**
200201

201-
* Turn on the Oscilloscope.
202-
* Observe the default constant signal (Reference Voltage 1.6V) on the oscilloscope screen.
202+
* Turn on the Oscilloscope.
203+
* Observe the default constant signal (Reference Voltage 1.6V) on the oscilloscope screen.
203204

204205
![Generated_reference_voltage_signal_on_oscilloscope_screen](images/Generated_reference_voltage_signal_on_oscilloscope_screen_1.png)
205206

206207
**Figure 12: Generated Reference voltage (1.6V) Signal on Oscilloscope screen**
207208

208-
* Press on board button (SW0) to change the generated signal and observe the constant 3.0V signal on the oscilloscope screen.
209+
* Press on board button (SW0) to change the generated signal and observe the constant 3.0V signal on the oscilloscope screen.
209210

210211
![Generated_constant_voltage_signal_on_oscilloscope_screen](images/Generated_reference_voltage_signal_on_oscilloscope_screen_2.png)
211212

212213
**Figure 13: Generated Constant voltage (3.0V) Signal on Oscilloscope screen**
213214

214-
* Press on board button (SW0) to change the generated signal and observe the sine wave on the oscilloscope screen.
215+
* Press on board button (SW0) to change the generated signal and observe the sine wave on the oscilloscope screen.
215216

216217
![Generated_sine_wave_on_oscillosocope](images/Generated_sine_wave_on_oscillosocope.png)
217218

218219
**Figure 14: Generated Sine Wave on Oscilloscope screen**
219220

220-
* Press on board button (SW0) to change the generated signal and observe the triangular wave on the oscilloscope screen.
221+
* Press on board button (SW0) to change the generated signal and observe the triangular wave on the oscilloscope screen.
221222

222223
![Generated_triangle_wave_on_oscilloscope](images/Generated_triangular_wave_on_oscilloscope.png)
223224

224225
**Figure 15: Generated Triangular Wave on Oscilloscope screen**
225226

226-
* Press on board button (SW0) to change the generated signal and observe the square wave on the oscilloscope screen.
227+
* Press on board button (SW0) to change the generated signal and observe the square wave on the oscilloscope screen.
227228

228229
![Generated_square_wave_on_oscilloscope](images/Generated_square_wave_on_oscilloscope.png)
229230

230231
**Figure 16: Generated Square Wave on Oscilloscope screen**
231232

232-
* Press on board button (SW0) to change the generated signal and observe the sawtooth wave on the oscilloscope screen.
233+
* Press on board button (SW0) to change the generated signal and observe the sawtooth wave on the oscilloscope screen.
233234

234235
![Generated_sawtooth_wave_on_oscilloscope](images/Generated_sawtooth_wave_on_oscilloscope.png)
235236

236237
**Figure 17: Generated Sawtooth Wave on Oscilloscope screen**
237238

238-
* Press on board button (SW0) to change the generated signal and observe the default constant signal on the oscilloscope screen.
239-
* Cycle is repeated, once six signals are generated and displayed.
240-
* The signal change happens for every button (SW0) press.
239+
* Press on board button (SW0) to change the generated signal and observe the default constant signal on the oscilloscope screen.
240+
* Cycle is repeated, once six signals are generated and displayed.
241+
* The signal change happens for every button (SW0) press.
241242

242243
# Conclusion
243244
This example illustrates reference voltage generation and signal generator implementation using Digital to Analog Converter (DAC) peripheral of 8-Bit PIC MCU.

0 commit comments

Comments
 (0)