51单片机水滴实验(LED小灯水滴变大下落,带拖尾效果)程序看不太懂,
/**作者:网友孤竹翼羽**/
#include
typedefunsignedcharuint8;
unsignedchara[]={0,1,2,4,6,16,32,64};x05x05x05x05x05x05x05x05x05//亮度数组以实现拖尾效果
unsignedcharb[]={0,34,48,59,68,76,84,91,97,103,109,114,119,123,126};x05//时间数组以实现加速效果
signedcharc[]={-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7};
sbitDB0=P0^0;
voidmain()
{
x05unsignedchari,k,p,t,j;
x05charl;
x05P0=0xFF;
x05
x05while(1)/*水滴形成(渐变效果)*/
x05{
x05x05k=0;
x05x05for(i=0;i