#include reg51h#include intrinsh#include stdioh#define uchar unsigned char#define uint unsigned intuchar code Table= 0x3C0x420x420x420x420x420x420x3C0 0x180x380x780x180x180x180x180x181 0x000x7E0x020x0
代码中串行通信部分似乎没有问题,通过判断接收到的数据来改变目标亮度等级。但是需要注意的是,这里使用了中断方式来接收串口数据,需要确保波特率等设置正确,否则可能会出现接收不到数据的情况。同时,也需要确保发送端和接收端的通信协议一致。
原文地址: http://www.cveoy.top/t/topic/dUZL 著作权归作者所有。请勿转载和采集!