0

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;
 }
 }
  • You take each digit of your variable (modulo/divide by 10) and convert it by lookup table to the LED segment combination. – kesselhaus Dec 05 '22 at 01:34
  • for fix variable like {0,1,..9} the lockup tables works well but when i want to display the real time data coming from microcontroller it doesn't work. i tried to used the address and pointer function to display the real time variable values such as for speed (238rpm), it doesn't work. – 무함마드 Dec 05 '22 at 05:17

0 Answers0