• 大小: 23.47MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-07-08
  • 语言: 其他
  • 标签: STM32F373  DAC  三角波  

资源简介

以STM32F373为硬件平台,以Keil5为开发环境,使用DAC产生三角波。可用于制作信号发生器或某些传感器的激励信号。

资源截图

代码片段和文件信息

/******************** (C) COPYRIGHT 2014 ***************************
 * 文件名  :main.c
 * 描述    :         
 * 实验平台:STM32F373RC
 * 描述    :
 * 作者    :yangwc
**********************************************************************/
#include “stm32f37x.h“
#include “main.h“


//函数功能:时钟配置
void Clock_Configuration(void)
{
 //开启IO时钟
   RCC_AHBPeriphClockCmd(RCC_AHBPeriph_GPIOA  ENABLE);

 /* Enable DAC clock */
   RCC_APB1PeriphClockCmd(RCC_APB1Periph_DAC1 ENABLE);
}




//函数功能:配置GPIO
void GPIO_Configuration(void)
{
 GPIO_InitTypeDef GPIO_InitStruct;

 /* Configure PA.04 (DAC1_OUT1) in analog mode -------------------------*/
   GPIO_InitStruct.GPIO_Mode  = GPIO_Mode_AN;
   GPIO_InitStruct.GPIO_PuPd  = GPIO_PuPd_NOPULL;
   GPIO_InitStruct.GPIO_Pin = GPIO_Pin_4;
   GPIO_Init(GPIOA &GPIO_InitStruct);
}



int main(void)
{
SystemInit();

Clock_Configuration();

GPIO_Configuration();

DAC_Config();

while(1)
DAC_SoftwareTriggerCmd(DAC1 DAC_Channel_1 ENABLE );
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件        349  2014-04-29 16:07  STM32F373_Triangle_Wave\Include\main.h

     文件      37250  2014-04-30 11:33  STM32F373_Triangle_Wave\JlinkLog.txt

     文件        650  2014-04-30 11:33  STM32F373_Triangle_Wave\JlinkSettings.ini

     文件     343854  2014-04-30 11:31  STM32F373_Triangle_Wave\main.crf

     文件       3137  2014-04-30 11:31  STM32F373_Triangle_Wave\main.d

     文件     375536  2014-04-30 11:31  STM32F373_Triangle_Wave\main.o

     文件       1070  2014-04-30 11:31  STM32F373_Triangle_Wave\Scr\main.c

     文件        640  2014-04-30 11:34  STM32F373_Triangle_Wave\Scr\sina_wave.c

     文件         98  2014-04-29 15:32  STM32F373_Triangle_Wave\Scr\sina_wave.h

     文件      25173  2012-07-16 14:49  STM32F373_Triangle_Wave\Scr\startup_stm32f37x.s

     文件     343554  2014-04-30 11:32  STM32F373_Triangle_Wave\sina_wave.crf

     文件       3311  2014-04-30 11:32  STM32F373_Triangle_Wave\sina_wave.d

     文件     375164  2014-04-30 11:32  STM32F373_Triangle_Wave\sina_wave.o

     文件        136  2014-04-30 11:31  STM32F373_Triangle_Wave\startup_stm32f37x.d

     文件      85522  2014-04-30 11:31  STM32F373_Triangle_Wave\startup_stm32f37x.lst

     文件       7388  2014-04-30 11:31  STM32F373_Triangle_Wave\startup_stm32f37x.o

     文件       3377  2014-04-14 14:53  STM32F373_Triangle_Wave\stm32f3\stm32f30x_conf.h

     文件       4594  2012-09-28 21:59  STM32F373_Triangle_Wave\stm32f3\stm32f30x_it.c

     文件       2201  2012-09-07 03:18  STM32F373_Triangle_Wave\stm32f3\stm32f30x_it.h

     文件       3382  2012-09-19 03:31  STM32F373_Triangle_Wave\stm32f3\stm32f37x_conf.h

     文件       5432  2014-04-16 16:06  STM32F373_Triangle_Wave\stm32f3\stm32f37x_it.c

     文件       2270  2014-04-14 16:14  STM32F373_Triangle_Wave\stm32f3\stm32f37x_it.h

     文件      14371  2012-12-07 21:08  STM32F373_Triangle_Wave\stm32f3\system_stm32f30x.c

     文件      13929  2014-04-15 16:04  STM32F373_Triangle_Wave\stm32f3\system_stm32f37x.c

     文件     347167  2014-04-30 11:31  STM32F373_Triangle_Wave\stm32f37x_dac.crf

     文件       3601  2014-04-30 11:31  STM32F373_Triangle_Wave\stm32f37x_dac.d

     文件     382392  2014-04-30 11:31  STM32F373_Triangle_Wave\stm32f37x_dac.o

     文件      46999  2012-09-18 20:10  STM32F373_Triangle_Wave\STM32F37x_DSP_StdPeriph_Lib_V1.0.0\Libraries\CMSIS\CMSIS END USER LICENCE AGREEMENT.pdf

     文件     436062  2012-09-18 20:10  STM32F373_Triangle_Wave\STM32F37x_DSP_StdPeriph_Lib_V1.0.0\Libraries\CMSIS\Device\ST\STM32F37x\Include\stm32f37x.h

     文件       2224  2012-09-18 20:10  STM32F373_Triangle_Wave\STM32F37x_DSP_StdPeriph_Lib_V1.0.0\Libraries\CMSIS\Device\ST\STM32F37x\Include\system_stm32f37x.h

............此处省略1938个文件信息

评论

共有 条评论