stm8l dac
http://bbs.21ic.com/forum.php?mod=image&aid=156868&size=300x300&key=d80ea74e3a8633fddc25ac50f61196b2&nocache=yes&type=fixnonehttp://bbs.21ic.com/forum.php?mod=image&aid=156866&size=300x300&key=760125b18e12d4841d7938e6df94212f&nocache=yes&type=fixnone{
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.本人菜鸟。希望大师进一步指点;谢谢!!!
页:
[1]