Electronic Components Datasheet Search
  English  ▼

X  

AN3126 Datasheet(PDF) 16 Page - STMicroelectronics

Part # AN3126
Description  Audio and waveform generation using the DAC in STM32 microcontrollers
PDF  24 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Manufacturer  STMICROELECTRONICS [STMicroelectronics]
Direct Link  http://www.st.com
Logo STMICROELECTRONICS - STMicroelectronics

AN3126 Datasheet(HTML) 16 Page - STMicroelectronics

Back Button AN3126 Datasheet HTML 12Page - STMicroelectronics AN3126 Datasheet HTML 13Page - STMicroelectronics AN3126 Datasheet HTML 14Page - STMicroelectronics AN3126 Datasheet HTML 15Page - STMicroelectronics AN3126 Datasheet HTML 16Page - STMicroelectronics AN3126 Datasheet HTML 17Page - STMicroelectronics AN3126 Datasheet HTML 18Page - STMicroelectronics AN3126 Datasheet HTML 19Page - STMicroelectronics AN3126 Datasheet HTML 20Page - STMicroelectronics Next Button
Zoom Inzoom in Zoom Outzoom out
 16 / 24 page
background image
Application examples
AN3126
16/24
Doc ID16895 Rev 2
Note:
For right-aligned 12-bit resolution: DAC_MaxDigitalValue = 0xFFF
For right-aligned 8-bit resolution: DAC_MaxDigitalValue = 0xFF
So the analog sine waveform ySineAnalog can be determined by the following equation
ySineAnalog x
()
3.3Volt
ySineDigital x
()
0xFFF 1
+
-------------------------------------
=
The table is saved in the memory and transferred by the DMA, the transfer is triggered by
the same timer that triggers the DAC
2.1.3
Fixing the sine wave frequency
To fix the frequency of the sinewave signal, you have to set the frequency of the Timer
Trigger output.
The frequency of the produced sine wave is
fSinewave
fTimerTRGO
ns
------------------------------
=
So, if TIMx_TRGO is 1 MHz, the frequency of the DAC sine wave is 10 kHz.
Note:
To have a high quality sine wave curve, it is recommended to use a high number of samples
ns (the difference can be appreciated by comparing Figure 13 with Figure 14).
Table 4. Digital and analog sample values of the sine wave
Sample
(x)
Digital Sample Value
ySineDigital (x)
Analog Sample Value (Volt)
ySineAnalog(x)
0
2048
1.650
1
3251
2.620
2
3995
3.219
3
3996
3.220
4
3253
2.622
5
2051
1.653
6
847
0.682
7
101
0.081
8
98
0.079
9
839
0.676



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24


Datasheet Download

Go To PDF Page


Link URL



Does ALLDATASHEET help your business so far?  [ DONATE ] 

About Alldatasheet   |   Advertisement   |   Contact us   |   Privacy Policy   |   Link to Datasheet    |   Link Exchange   |   Manufacturer List
All Rights Reserved©Alldatasheet.com


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
Russian : Alldatasheetru.com  |   Korean : Alldatasheet.co.kr  |   Spanish : Alldatasheet.es  |   French : Alldatasheet.fr  |   Italian : Alldatasheetit.com
Portuguese : Alldatasheetpt.com  |   Polish : Alldatasheet.pl  |   Vietnamese : Alldatasheet.vn
Indian : Alldatasheet.in  |   Mexican : Alldatasheet.com.mx  |   British : Alldatasheet.co.uk  |   New Zealand : Alldatasheet.co.nz
Family Site : ic2ic.com  |   icmetro.com