如何编程,使串口接收4位数字,单片机将其在数码管上显示。
以下是我写的程序,但每次数码管都显示不成功。麻烦大家帮帮忙,教我程序该怎么编。谢谢。#includereg52.h#defineucharunsignedcharsbitwela=P2^7;sbitdula=P2^6;ucharrecive,rec=0,flag;charcodetable={0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f,0x77,0x7c,0x39,0x5e,0x79,0x71};vo