给你编制一个例程吧。#include#includevoid delay(int a){while(a--);}main(){unsigned char i;while(1){P0=0x7f;for(i=0;i<8;i++)P0=_cror_(P0,1);P0=0x3f;for(i=0;i<7;i++)P0=_cror_(P0,1);}}