Difference between revisions of "CH32V307"
Jump to navigation
Jump to search
(→Notes) |
|||
Line 9: | Line 9: | ||
* [https://github.com/openwch?tab=repositories OpenWCH] | * [https://github.com/openwch?tab=repositories OpenWCH] | ||
− | == Notes == | + | == Development Notes == |
=== DAC === | === DAC === | ||
Revision as of 20:25, 2 July 2022
Miscellaneous Links
Development Notes
DAC
- The output impedance is a concern. Without the Output Buffer enabled, >100kohm impedance for the load is recommended. Even WITH Output Buffer enabled, a 1kohm load is not really possible, both high and low end of range is not reached, which is a bit strange. 10kohm hasn't been tested yet.
- For fastest write to DAC output, this is used;
DAC->RD12BDHR = dac_value1 + (dac_value2 << 16);
- Simple initialization is;
RCC_APB1PeriphClockCmd(RCC_APB1Periph_DAC, ENABLE ); DAC_InitTypeDef DAC_InitType={0}; DAC_InitType.DAC_Trigger=DAC_Trigger_None; DAC_InitType.DAC_WaveGeneration=DAC_WaveGeneration_None; DAC_InitType.DAC_OutputBuffer=DAC_OutputBuffer_Enable; DAC_Init(DAC_Channel_1,&DAC_InitType); DAC_Init(DAC_Channel_2,&DAC_InitType); DAC_Cmd(DAC_Channel_1, ENABLE); DAC_Cmd(DAC_Channel_2, ENABLE);