[H8-ML(2780)] Re: H83067F で文字と数字を出力するプログラムの書き方
From: hamayan <hamayan@xxxxxxxxxxxxxxx>
Date: 2003年01月29日(水)13時03分39秒
お世話になっています。hamayan です。

"one> void main(void){
"one> 	int i;
"one> 	char buf[150];             /* 文字列バッファを用意 */
"one> 	H8SCI_INIT(br19200);       /* 19200に通信速度を設定 */
"one> 	sprintf(buf,"hello !\n\r");/* bufに"hello!を設定" */
"one> 	H8SCI_OUT_STRING(buf);     /* 通信ポードに通信 */
"one> 	for(i=0;i<20;i++)          /* 0〜19までの数字を送信 */
"one> 	{   sprintf(buf, "num=%d\n\r",i);
"one> 	    H8SCI_OUT_STRING(buf);     /* 文字列を通信ポートに出力する */
"one> 	}
"one> 	while(1){}
"one> }

出力結果がまちまちなのは、フロー制御を行っていないので、
受け側(PC?)が取りこぼしているのでしょう。

あと、本来はポートをSCIで使える様に設定も必要

------------------------------------------------------------
)^o^()^o^()^o^()^o^()^o^()^o^()^o^()^o^()^o^()^o^()^o^()^o^(
☆☆☆☆☆☆☆☆☆☆☆☆designed by hamayan☆☆☆☆☆☆☆☆☆
from はまやん
アドレスは
	hamayan@xxxxxxxxxxxxxxxx
FILEを添付される場合は
	hamayan@xxxxxxxxxxxxxxx
URL
	http://www003.upp.so-net.ne.jp/hamayan/
★★★★★★★★★end of message and thank you★★★★★★★

スレッド概略
[2779(R)](起点)
 └[表示中]


投稿順に移動
[←前の記事へ(P)]
[→次の記事へ(N)]


リスト表示へ
[このスレッド(T)]
[本記事の前後(L)]