void C2(void) // SPARE
//—————————————-
{
DcBusVolt = _IQmpy(_IQ12toIQ(AdcResult.ADCRESULT7),_IQ(1.2625)); // DC Bus voltage meas.
//—————————————-
{
DcBusVolt = _IQmpy(_IQ12toIQ(AdcResult.ADCRESULT7),_IQ(1.2625)); // DC Bus voltage meas.
pi_spd.Ref = DcBusVolt_Ref;
pi_spd.Fbk = DcBusVolt;
PI_MACRO(pi_spd);
pi_spd.Fbk = DcBusVolt;
PI_MACRO(pi_spd);
#define _IQ12toIQ(A) ((long) (A) << (GLOBAL_Q – 12))
DcBusVolt = _IQmpy(_IQ12toIQ(AdcResult.ADCRESULT7),_IQ(1.2625)); 这个语句的执行过程是什么,将AdcResult.ADCRESULT7左移12位(GLOBAL_Q默认为24),AdcResult.ADCRESULT7左移12位不是0吗?
Eric Ma:“将AdcResult.ADCRESULT7左移12位(GLOBAL_Q默认为24),AdcResult.ADCRESULT7左移12位不是0吗?”
Eric:
左移是放大呀,右移才是缩小。
如0x0001 左移4位就是0x0010.
TI中文支持网![TMS320F28379D: 导入例程出现故障Description Resource Path Location Type gmake: *** [gridconnectedinvlclfltr.obj] Error 1 gridConnectedInverterLCLFltr C/C++ Problem-TI中文支持网](https://www.ti2k.com/wp-content/uploads/ti2k/DeyiSupport_C2000_pastedimage1752114958744v1.jpg)



