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/MSP430FR4133:需要有关数字选择的简略定义方面的帮助

Guru**** 2589265 points
Other Parts Discussed in Thread: MSP430FR4133

请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/microcontrollers/msp-low-power-microcontrollers-group/msp430/f/msp-low-power-microcontroller-forum/771135/ccs-msp430fr4133-need-help-with-shorthand-definitions-for-digit-select

器件型号:MSP430FR4133

工具/软件:Code Composer Studio

您好论坛、

MSP430FR4133 LaunchPad 的参考示例提供以下数字选择:

#define pos1 4  /*数字 A1 - L4 */
#define pos2 6  /*数字 A2 - L6 */
#define pos3 8  //数字 A3 - L8 */
#define pos4 10 //数字 A4 - L10 */
#define pos5 2  /*数字 A5 - L2 */
#define pos6 18 //数字 A6 - L18 */

我的问题是变量(pos (x))的值(2、4、6、8...) 是指。 行末尾的注释似乎是指段引脚、但这是此 LaunchPad 上的16个段位数字、需要运行4个段引脚。

变量值是否是指使用的第一个 LCDM (x)变量? 第二个 LCDM(x)由编译器推断?

我有17 7个段位在我的项目中运行、我想用一个更显式的语句来定义它们。 如果有任何帮助、我们将不胜感激! 谢谢你。

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    它们是 LCDMEM 索引:

    $ grep pos1 *
    StopWatchMode.c: showChar ((*分钟)/ 10 +'0'、pos1);
    StopWatchMode.c: showChar ((*小时)/ 10 +'0'、pos1);
    TempSensorMode.c: LCDMEM[pos1+1]|= 0x04;
    hal_lcd.c: showChar (buffer[0]、pos1);
    hal_lcd.c:LCDMEMW [pos1/2]= 0;
    hal_lcd.h:#define pos1 4 /*位 A1 - L4 */
    main.c: LCDMEM[pos1]= LCDMEM[pos1+1]= I;