I am using Tms320f28335(from TI) for vector control of PMSM. now i have to set the PWM on/off using the switch buttons that are connected with SND3360. I also have to display the data of the variable on SND3360. i can display fixed number on SND3360 but i dont know how can i display the variable values. Any help regarding code will be much appreciated.
Mode_cnt += Mode_inc;
if(Mode_cnt > MODE_LIM) { Mode_cnt = 0; }
switch(Mode_cnt)
{
case 0: Display[5] = 0x30; break;
case 1: sts_display(); led_display(0x00); DELAY_US(2L); break;
case 2: diag_display(); led_display(0x00); DELAY_US(2L); break;
case 3: para1_display(); led_display(0x00); DELAY_US(2L); break;
}
}
with these functions i can set, clear, increment and decrement specific buttons and display such as Display[n] as n=1...6.
for example
void sts_display(void)
{
Sts_cnt += Up_inc;
if(Sts_cnt > Sts_lim) { Sts_cnt = 0; }
switch(Sts_cnt)
{
case 0: Display[3] = 0x30; break;
case 1: Display[3] = 0x75; break;
case 2: Display[3] = 0x36; break;
default: Display[3] = 0x30; break;
}
}