打印

请高手帮忙解决下我的DAC的问题

[复制链接]
2430|0
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
mcuatmel|  楼主 | 2011-12-8 09:22 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
我的IC是STM32F103RCT6,程序如下:
void DAC_Configuration(void)
{
  DAC_InitTypeDef DAC_InitStructure;
/* DAC Periph clock enable */
  RCC_APB1PeriphClockCmd(RCC_APB1Periph_DAC, ENABLE);
/* DAC channel1 Configuration */
  DAC_DeInit();
  DAC_StructInit(&DAC_InitStructure);
  DAC_InitStructure.DAC_Trigger = DAC_Trigger_Software;
  DAC_InitStructure.DAC_WaveGeneration = DAC_WaveGeneration_None;
  DAC_InitStructure.DAC_LFSRUnmask_TriangleAmplitude =DAC_TriangleAmplitude_4095;
  DAC_InitStructure.DAC_OutputBuffer = DAC_OutputBuffer_Disable;
  DAC_Init(DAC_Channel_1, &DAC_InitStructure);
  DAC_StructInit(&DAC_InitStructure);
  DAC_InitStructure.DAC_Trigger = DAC_Trigger_Software;
  DAC_InitStructure.DAC_WaveGeneration = DAC_WaveGeneration_None;
  DAC_InitStructure.DAC_LFSRUnmask_TriangleAmplitude =DAC_TriangleAmplitude_4095;
  DAC_InitStructure.DAC_OutputBuffer = DAC_OutputBuffer_Disable;
  DAC_Init(DAC_Channel_2, &DAC_InitStructure);
  DAC_Cmd(DAC_Channel_1, ENABLE);
  DAC_Cmd(DAC_Channel_2, ENABLE);
  DAC_SetDualChannelData(DAC_Align_12b_R, 0, 0);
  DAC_DualSoftwareTriggerCmd(ENABLE);
}
这段程序执行完后,DA输出为1V左右,请问我的问题是硬件还是软件?
另:这颗IC的DAC的VREF是多少?

相关帖子

发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

512

主题

1456

帖子

2

粉丝