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: content/hardware/10.mega/boards/giga-r1-wifi/tutorials/giga-audio/content.md
+27-29Lines changed: 27 additions & 29 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
---
2
2
title: Guide to GIGA R1 Advanced ADC/DAC and Audio Features
3
-
description: "Learn how to use the ADC/DAC features, along with useful examples on how to generate waveforms and play audio from a file."
3
+
description: 'Learn how to use the ADC/DAC features, along with useful examples on how to generate waveforms and play audio from a file.'
4
4
author: José Bagur, Taddy Chung & Karl Söderby
5
5
hardware:
6
6
- hardware/10.mega/boards/giga-r1-wifi
@@ -11,16 +11,15 @@ software:
11
11
tags: [ADC, DAC, Audio, USB]
12
12
---
13
13
14
-
In the GIGA R1, you can find the powerful STM32H747XI, a dual-core 32-bit Arm® Cortex® microcontroller from STMicroelectronics; this is the same microcontroller found in the [Portenta H7](/hardware/portenta-h7) board.
14
+
In the GIGA R1, you can find the powerful STM32H747XI, a dual-core 32-bit Arm® Cortex® microcontroller from STMicroelectronics; this is the same microcontroller found in the [Portenta H7](/hardware/portenta-h7) board.
15
15
16
16
In this guide, we will focus on the advanced ADC/DAC features, utilizing the [Arduino_AdvancedAnalog](https://github.com/arduino-libraries/Arduino_AdvancedAnalog) library. The examples found in this guide can be used to:
17
-
18
-
- Set up and read ADCs with specific parameters (resolution, sample rate, number of samples per channel, queue depth).
19
-
- Set up and write to a DAC channel with specific parameters (resolution, frequency, number of samples per channel, queue depth).
17
+
- Set up and read ADCs with specific parameters (resolution, sample rate, number of samples per channel, queue depth).
18
+
- Set up and write to a DAC channel with specific parameters (resolution, frequency, number of samples per channel, queue depth).
20
19
- Generate specific waveforms through input via serial commands (triangle, square, sine, sawtooth waves) as well as adjusting the frequency.
21
20
- Read and play audio files (`.wav`) from a USB stick (connected to USB-A) to a speaker, using the audio jack.
22
21
23
-
**_Important note: the GIGA R1 does NOT have an amplifying circuit onboard. Connecting speakers that does not have an amplifier can damage the DAC and the board itself._**
22
+
***Important note: the GIGA R1 does NOT have an amplifying circuit onboard. Connecting speakers that does not have an amplifier can damage the DAC and the board itself.***
24
23
25
24
## Hardware & Software Needed
26
25
@@ -170,7 +169,7 @@ A digital-to-analog converter (DAC) is a device that has a function opposite to
170
169
171
170
- 8-bit or 12-bit monotonic output
172
171
- Left or right data alignment in 12-bit mode
173
-
- Dual DAC channel independent or simultaneous conversions
172
+
- Dual DAC channel independent or simultaneous conversions
174
173
- DMA capability for each channel
175
174
- External triggers for conversion
176
175
- Input voltage reference or internal voltage reference
**_\*USB mass storage devices connected needs to be formatted with the FAT32 as a file system, using the MBR partitioning scheme. Read more in the [USB Mass Storage](/tutorials/giga-r1-wifi/giga-usb/#usb-mass-storage) section._**
472
+
***\*USB mass storage devices connected needs to be formatted with the FAT32 as a file system, using the MBR partitioning scheme. Read more in the [USB Mass Storage](/tutorials/giga-r1-wifi/giga-usb/#usb-mass-storage) section.***
475
473
476
474
### USB Stick Configuration
477
475
478
-
The **Arduino_AdvancedAnalog** library contains the necessary functions that enable us to use the advanced capabilities of the GIGA R1 DACs.
476
+
The **Arduino_AdvancedAnalog** library contains the necessary functions that enable us to use the advanced capabilities of the GIGA R1 DACs.
479
477
480
-
To read `.wav` files from the USB stick we are using the **Arduino_USBHostMbed5** library. It is important that the USB stick is formatted properly, and that we define its name in the sketch. In this case, we name it `USB_DRIVE`, and is defined like this:
478
+
To read `.wav` files from the USB stick we are using the **Arduino_USBHostMbed5** library. It is important that the USB stick is formatted properly, and that we define its name in the sketch. In this case, we name it `USB_DRIVE`, and is defined like this:
481
479
482
-
```arduino
480
+
```arduino
483
481
mbed::FATFileSystem usb("USB_DRIVE");
484
482
```
485
483
@@ -663,7 +661,7 @@ This example is similar to the **Play Single Audio File** example, but with some
663
661
664
662
- This example uses multiple audio files.
665
663
- The file read is moved to a separate function, `configFile()`, as it will be continuously called from the sketch.
666
-
- Instead of playing a file once, it keeps looping it.
664
+
- Instead of playing a file once, it keeps looping it.
667
665
- The **BOOT0** (`PC_13`) button (right next to the audio jack) is used as a regular pushbutton to loop through the audio files.
0 commit comments