お世話になっています。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★★★★★★★