在线时间1 小时
UID375965
ST金币0
蝴蝶豆0
注册时间2012-7-30
新手上路
- 最后登录
- 2019-4-12
|
a0a.1 0b0c
{
CLK_PeripheralClockConfig(CLK_Peripheral_DAC, ENABLE);
RI->IOCMR2 = 0x10;
RI->IOSR2 =0x10;
DAC_DeInit();
/* Fill DAC Init param DAC_Trigger_None and DAC Channel1 Init */
DAC_Init(DAC_Channel_1, DAC_Trigger_None, DAC_OutputBuffer_Disable);
/* Enable DAC Channel1 */
DAC_Cmd(DAC_Channel_1, ENABLE);
DAC_SetChannel1Data(DAC_Align_12b_R,2048);
}
stm8l dac 此程序已经在stm8l152c6t6上面验证过,测PF0可以有正常的输出。但是在STM8l151K6上面测PB5引脚确没有输出。问题会是在哪里?左边为stm8l151.右边为stn8l152
经高人指点要设置routing interface.可是加了
RI->IOCMR2 = 0x10;
RI->IOSR2 =0x10;仿真的结果显示这两个寄存器任为0.本人菜鸟。希望大师进一步指点;谢谢!!!
|
|