comparison libs/STM32F10x_StdPeriph_Lib_V3.5.0/Project/STM32F10x_StdPeriph_Examples/DAC/TwoChannels_TriangleWave/readme.txt @ 0:c59513fd84fb

Initial commit of STM32 test code.
author Daniel O'Connor <darius@dons.net.au>
date Mon, 03 Oct 2011 21:19:15 +1030
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:c59513fd84fb
1 /**
2 @page DAC_TwoChannels_TriangleWave DAC two channels triangle wave example
3
4 @verbatim
5 ******************** (C) COPYRIGHT 2011 STMicroelectronics *******************
6 * @file DAC/TwoChannels_TriangleWave/readme.txt
7 * @author MCD Application Team
8 * @version V3.5.0
9 * @date 08-April-2011
10 * @brief Description of the DAC two channels triangle wave example.
11 ******************************************************************************
12 * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
13 * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
14 * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
15 * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
16 * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
17 * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
18 ******************************************************************************
19 @endverbatim
20
21 @par Example Description
22
23 This example describes how to use two DAC channels to generate two different
24 signals with triangle waves on each DAC Channel output.
25
26 DAC channels conversion are configured to be triggered by TIM2 TRGO with triangle
27 wave generation. 12bit right data alignment is selected since we choose to access
28 both DAC_DHR12R1 and DAC_DHR12R2 registers.
29 A triangle amplitude of 2047 is selected for DAC channel1 and 1023 for DAC channel2.
30 Both DAC channels are then enabled. DAC Channel1 DHR12R1 and DAC channel2 DHR12R2
31 registers are set to have a base output voltage of VREF/16 on each output.
32
33 Once TIM2 is enabled, each TIM2 TRGO update event trigger both DAC channels start
34 of conversion. The triangle counter is incremented, added to the base value and
35 applied to the corresponding DAC channel output. The same calculation is repeated
36 on each trigger.
37 The triangle waves can be visualized by connecting both PA.04 and PA.05 pins to
38 an oscilloscope.
39
40
41 @par Directory contents
42
43 - DAC/TwoChannels_TriangleWave/stm32f10x_conf.h Library Configuration file
44 - DAC/TwoChannels_TriangleWave/stm32f10x_it.c Interrupt handlers
45 - DAC/TwoChannels_TriangleWave/stm32f10x_it.h Header for stm32f10x_it.c
46 - DAC/TwoChannels_TriangleWave/main.c Main program
47 - DAC/TwoChannels_TriangleWave/system_stm32f10x.c STM32F10x system source file
48
49 @par Hardware and Software environment
50
51 - This example runs on STM32F10x Connectivity line, High-Density, XL-Density,
52 Medium-Density Value line, High-Density Value line and Low-Density Value
53 line Devices.
54
55 - This example has been tested with STMicroelectronics STM32100B-EVAL
56 (Medium-Density Value line), STM3210C-EVAL (Connectivity line), STM32100E-EVAL
57 (High-Density Value line) and STM3210E-EVAL (High-Density and XL-Density)
58 evaluation boards and can be easily tailored to any other supported device
59 and development board.
60
61 - STM32100B-EVAL Set-up
62 - Connect PA.04 and PA.05 pins to an oscilloscope
63 @note JP2 should be open
64
65 - STM3210C-EVAL Set-up
66 - Only PA.04 can be monitored on an oscilloscope, PA.05 is used by other
67 module (Motor control connector) that prevents to have DAC channel output
68 on it. However, if you don't use Motor control connector, you can remove
69 the 0ohm resistor R84 and thus PA.05 can be used for DAC output.
70 @note Make shure that jumper JP15 is open.
71
72 - STM3210E-EVAL Set-up
73 - Connect PA.04 and PA.05 pins to an oscilloscope
74
75 - STM32100E-EVAL Set-up
76 - Connect PA.04 and PA.05 pins to an oscilloscope
77
78 @par How to use it ?
79
80 In order to make the program work, you must do the following :
81 - Copy all source files from this example folder to the template folder under
82 Project\STM32F10x_StdPeriph_Template
83 - Open your preferred toolchain
84 - Rebuild all files and load your image into target memory
85 - Run the example
86
87 @note
88 - Low-density Value line devices are STM32F100xx microcontrollers where the
89 Flash memory density ranges between 16 and 32 Kbytes.
90 - Low-density devices are STM32F101xx, STM32F102xx and STM32F103xx
91 microcontrollers where the Flash memory density ranges between 16 and 32 Kbytes.
92 - Medium-density Value line devices are STM32F100xx microcontrollers where
93 the Flash memory density ranges between 64 and 128 Kbytes.
94 - Medium-density devices are STM32F101xx, STM32F102xx and STM32F103xx
95 microcontrollers where the Flash memory density ranges between 64 and 128 Kbytes.
96 - High-density Value line devices are STM32F100xx microcontrollers where
97 the Flash memory density ranges between 256 and 512 Kbytes.
98 - High-density devices are STM32F101xx and STM32F103xx microcontrollers where
99 the Flash memory density ranges between 256 and 512 Kbytes.
100 - XL-density devices are STM32F101xx and STM32F103xx microcontrollers where
101 the Flash memory density ranges between 512 and 1024 Kbytes.
102 - Connectivity line devices are STM32F105xx and STM32F107xx microcontrollers.
103
104 * <h3><center>&copy; COPYRIGHT 2011 STMicroelectronics</center></h3>
105 */