This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

msp430f5438 interfacing with 7 segment display

Other Parts Discussed in Thread: MSP430F5438

Hello,

right now i am working on the product of minilogger for communicating with PID card,in which my job is to convert it from c8051f340 to msp430f5438.

i have c code for c8051 & i have done almost it to msp controller. The doubt i found in existing code is with 7segment display in which programmer has added one file named VTEnglish.h. i am using 8 digit display 4 as upper & 4 as lower. Here i am giving snap shots of it.

unsigned char code ASCVs7Seg_codes[] = //As per this SW. Partly STD  
{
    0x00, //20H (space) <-- index starts with 0. So subtract 20h first. blank for unresolved CHAR
    0x00, //21H !
    0x00, //22H "
    0x00, //23H #
    0x00, //24H $
    0x00, //25H %
    0x00, //26H &
    0x00, //27H '
    0x00, //28H (
    0x00, //29H )

    0x00, //2AH *
    0x00, //2BH +
    0x00, //2CH ,
    0x40, //2DH -
    0x00, //2EH
    0x00, //2FH /

    0x3f, //30H 0<-- index starts with 0. So subtract 30h first. blank for unresolved CHAR
    0x06, //31H 1
    0x5b, //32H 2
    0x4f, //33H 3
    0x66, //34H 4
    0x6d, //35H 5
    0x7d, //36H 6
    0x07, //37H 7
    0x7f, //38H 8
    0x6f, //39H 9

    0x00, //3AH :
    0x00, //3BH ;
    0x00, //3CH <
    0x00, //3DH =
    0x00, //3EH >
    0x00, //3FH ?
    0x00, //40H @

    0x77, //41H A
    0x7C, //42H B*
    0x39, //43H C
    0x5E, //44H D*
    0x79, //45H E
    0x71, //46H F
    0x3D, //47H G
    0x76, //48H H
    0x0F, //49H I
    0x1F, //4AH J
    0x76, //4BH K*
    0x38, //4CH L
    0x37, //4DH M
    0x54, //4EH N*
    0x5C, //4FH O*
    0x73, //50H P
    0x00, //51H Q*
    0x31, //52H R
    0x6D, //53H S
    0x78, //54H T*
    0x3E, //55H U
    0x3E, //56H V SAME AS U
    0x00, //57H W*
    0x00, //58H X*
    0x6E, //59H Y
    0x5B, //5AH Z
    0x00, //5BH [
/*    0x00, //5CH \
    0x00, //5DH ]
    0x00, //5EH ^
    0x00, //5FH _
    0x00, //60H '

    0x00, //EXTRA

    0x00, //61H a*
    0x7C, //62H b
    0x5D, //63H c
    0x5E, //64H d
    0x7B, //65H e*
    0x00, //66H f*
    0x00, //67H g*
    0x74, //68H h
    0x00, //69H i*
    0x00, //6AH j*
    0x00, //6BH k*
    0x00, //6CH l*
    0x00, //6DH m*
    0x54, //6EH n
    0x5C, //6FH o
    0x00, //70H p*
    0x00, //71H q*
    0x50, //72H r
    0x6D, //73H s*
    0x78, //74H t
    0x1C, //75H u
    0x00, //76H v*
    0x00, //77H w*
    0x00, //78H x*
    0x00, //79H y*
    0x00, //7AH z*

    0x00, //7BH {
    0x00, //7CH |
    0x00, //7DH }
    0x00, //7EH ~
    0x00  //7FH (del)*/

};

unsigned char code VTmsg_short[] = //As per this SW. Partly STD  
{
//Parameter    Data Address    Range
"  SV"    //0000    HiLt~LoLt
"  DP"    //001A    0000/000.0/00.00/0.000 (English code)
"UNIT"    //0019    ? / ? / ENG (English code)
};

And below is the code of main file where the above code of  VTEnglish.h is used,,,

vt_address=0;
    disp_menu();

vt_address=1;
    disp_menu();

void disp_menu()
{
    B2R4 = (vt_address) * 4;
    for(B2R5=0;B2R5<4;B2R5++)
    {
          disp_m4[3-B2R5] = ASCVs7Seg_codes[VTmsg_short[B2R4 + B2R5]-0x20];
    }
}

i don't understand wt this code will display .Hoping for the response soon

thank you

**Attention** This is a public forum