标题: 单片机KEIL C编译器 printf函数的使用,把内容输出到串口 [打印本页]

作者: hmgqljz111    时间: 2020-3-12 11:21
标题: 单片机KEIL C编译器 printf函数的使用,把内容输出到串口
在KEIL DEBUG 中把HELLO WORLD,输出到串口,可以方便程序的调试。
#include<reg52.h>
#include<intrins.h>
#include<stdio.h>


void main(void)
{

      SCON=0X50;
          TMOD|=0X20;
          TH1=0XE8;
          TL1=0XE8;
          TR1=1;
          TI=1;

   while(1)
      {
           printf("Hello World\n");
          }


}


作者: hbcqd    时间: 2020-3-12 21:53
谢谢分享!




欢迎光临 (http://www.51hei.com/bbs/) Powered by Discuz! X3.1