Other Parts Discussed in Thread: TMS320F28035
Tool/software: Code Composer Studio
dear team,
i am doing my paper on induction motor control on TMDSHVMTRPFCKIT with tms320f28035 control card, but due to limited GPIO pins on this kit; connected to other external circuit in the main board of the kit.i used to load 8bit data GPIO 16,17,18,19,22,24,25,26 pins. also GPIO 06 TO /LDAC of AD7305; GPIO 32,33,39 connected to A0,A1,/WR OF AD7305. these GPIO PINS are not connected external circuit(i.e free).i want to load the result for my case torque, speed and flux from my algorithm, to display and plot at DAC output(AD7305 device). but i get code error. all the information related to this question attached below
update_AD7305();
// To display the system values at DAC output pins
AD7305_CH_A= (PI_out*25);
AD7305_CH_B= (torque*25);
// Plot the circular trajectory of Actual stator flux
AD7305_CH_C= ((d_flux*255)+255)/2;
AD7305_CH_D= ((q_flux*255)+255)/2;
//==========================
void update_AD7305(void)
{
temp=GpioDataRegs.GPADAT.all;
temp&=0xF8B0FFFF;
GpioDataRegs.GPBCLEAR.all=0x00000003;
GpioDataRegs.GPADAT.all=temp|AD7305_CH_A;
GpioDataRegs.GPBCLEAR.bit.GPIO39=1;
GpioDataRegs.GPBSET.bit.GPIO39=1;
GpioDataRegs.GPBSET.bit.GPIO32=1;
GpioDataRegs.GPADAT.all=temp|AD7305_CH_B;
GpioDataRegs.GPBCLEAR.bit.GPIO39=1;
GpioDataRegs.GPBSET.bit.GPIO39=1;
GpioDataRegs.GPBSET.bit.GPIO33=1;
GpioDataRegs.GPADAT.all=temp|AD7305_CH_D;
GpioDataRegs.GPBCLEAR.bit.GPIO39=1;
GpioDataRegs.GPBSET.bit.GPIO39=1;
GpioDataRegs.GPBCLEAR.bit.GPIO32=1;
GpioDataRegs.GPADAT.all=temp|AD7305_CH_C;
GpioDataRegs.GPBCLEAR.bit.GPIO39=1;
GpioDataRegs.GPBSET.bit.GPIO39=1;
GpioDataRegs.GPACLEAR.bit.GPIO06=1;
GpioDataRegs.GPASET.bit.GPIO06=1;
}
//===============================================