//自己看时序图写的,一般可以直接放在我的代码里作为引用,后几届的写的比较稚嫩,驱动可能不太符合,但是都大同小异。记得.c和.h分开搞
#include
#include
#define u8 unsigned char
#define u16 unsigned int
void Delay500us() //@11.0592MHz
{
unsigned char i, j;
_nop_();
_nop_();
i = 6;
j = 93;
do
{
while (--j);
} while (--i);
}
void Delay15us() //@11.0592MHz
{
unsigned char i;
i = 39;
while (--i);
}
void Delay60us() //@11.0592MHz
{
unsigned char i, j;
i = 1;
j = 162;
do
{
while (--j);
} while (--i);
}
void DSlinit()
{
P14=1;
P14=0;
Delay500us();
P14=1;
Dela