Tip / ログイン to post questions, reply, level up, and achieve exciting badges. Know more

cross mob

LCDにLongを表示する - Community Translated (JA)

LCDにLongを表示する - Community Translated (JA)

GeethaP_31
Employee
Employee
50 questions asked 10 questions asked 5 questions asked

Community Translated by NoTa_4591161          Version: **

Translation - English: Display a Long on LCD

質問:

PSoC Cコンパイラを使用してLCDに長い変数を表示するにはどうすればよいですか?

回答:

longltoa関数を使用してasciiに変換し、LCD_PrString関数を使用してLCDに表示できます。コードスニペットの例を以下に示します。

#include <stdlib.h>

void mainvoid
{
   long myLong = 134546;
   char OutputString [12];

   ltoaOutputStringmyLong10;
   LCD_Position0,0;
   LCD_PrStringOutputString;

}

ltoa関数の詳細は、PSoC Designer Help >> Documentation menuの「C言語ユーザーガイド」にあります。

0 件の賞賛
186 件の閲覧回数
寄稿者