Difference between revisions of "CH32V307"
Jump to navigation
Jump to search
(→Notes) |
(→DAC) |
||
Line 12: | Line 12: | ||
=== DAC === | === DAC === | ||
− | * The output impedance is a concern. Without the Output Buffer enabled, >100kohm impedance for the load is | + | * The output impedance is a concern. Without the Output Buffer enabled, >100kohm impedance for the load is needed. 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, but datasheet indicates that a 5kohm load should be fine. |
* For fastest write to DAC output, this is used; | * For fastest write to DAC output, this is used; |
Revision as of 20:27, 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 needed. 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, but datasheet indicates that a 5kohm load should be fine.
- 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);