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.

CCS: Help regarding coding



Tool/software: Code Composer Studio

Im a beginner in CCS 7.1.0 . im going through a code that generates sine PWM output .. the program has a file for ADC. that has these particular lines

MOV @ADCMAXCONV,#07h  

MOV @ADCCHSELSEQ1, #0123h

which initializes the A/D conversion. I could find out what ADCMAXCONV and ADCCHSELSEQ1 are and what these registers are used for, but im not being able to find out what the hexcode #07h stands for and what is its purpose.  

My question might be too basic to ask in this forum but if you can help me out with this it will be of great help.

  • Hi,

    As a general statement, the MOV opcode requires a source and a destination value to move data. In this particular case, the MOV opcode is performing what is mentioned at page 260 of the TMS320C28x CPU and Instruction set guide: it is moving the value 7 to the ADCMAXCONV memory mapped register. 

    The exact meaning of the 7 is that it is setting the first three bits (7 equals to 111 in binary) and clearing all the other bits of the ADCMAXCONV register.

    You would then cross this information with the ADCMAXCONV information you already found and see what it means to set these bits. 

    Hope this helps,

    Rafael