#include
//--重定义函数变量--//
#define uchar unsigned char
#define uint unsigned int
#define ulong unsigned long
//--定义SPI要使用的 IO--//
***it MOSIO = P3^4;
***it R_CLK = P3^5;
***it S_CLK = P3^6;
//---全局变量声明--//
ulong column; //点阵列
ulong row; //点阵行
ulong dt;
//--点阵显示数组--//
uchar code tab0[] =
{0x00, 0x01, 0x00, 0x02, 0x00, 0x04, 0x00, 0x08,
0x00, 0x10, 0x00, 0x20, 0x00, 0x40, 0x00, 0x80,
0x01, 0x00, 0x02, 0x00, 0x04, 0x00, 0x08, 0x00,
0x10, 0x00, 0x20, 0x00, 0x40, 0x00, 0x80, 0x00};
//--10字模--//
uchar code tab1[] =
{0, 0, 0, 0, 0, 0, 8, 24, 14, 36, 8, 66, 8, 66, 8, 66,
8, 66, 8, 66, 8, 66, 8, 36, 62, 24, 0, 0, 0, 0, 0, 0};
//--09字模--//
uchar code tab2[] =
{0, 0, 0, 0, 0, 0, 24, 24, 36, 36, 66, 66, 66, 66, 66,
66, 66, 100, 66, 88, 66, 64, 66, 64, 36, 36, 24, 28, 0, 0, 0, 0} ;
//--08字模--//
uchar code tab3[] =
{0, 0, 0, 0, 0, 0, 24, 60, 36, 66, 66, 66, 66, 66, 66, 36,
66, 24, 66, 36, 66, 66, 66, 66, 36, 66, 24, 60, 0, 0, 0, 0};
//--07字模--//
uchar code tab4[] =
{0, 0, 0, 0, 0, 0, 24, 126, 36, 34, 66, 34, 66, 16, 66, 16,
66, 8, 66, 8, 66, 8, 66, 8, 36, 8, 24, 8, 0, 0, 0, 0};
//--06字模--//
uchar code tab5[] =
{0, 0, 0, 0, 0, 0, 24, 56, 36, 36, 66, 2, 66, 2, 66, 26, 66,
38, 66, 66, 66, 66, 66, 66, 36, 36, 24, 24, 0, 0, 0, 0};
//--05字模--//
uchar code tab6[] =
{0, 0, 0, 0, 0, 0, 24, 126, 36, 2, 66, 2, 66, 2, 66, 26, 66,
38, 66, 64, 66, 64, 66, 66, 36, 34, 24, 28, 0, 0, 0, 0};
//--04字模--//
uchar code tab7[] =
{0, 0, 0, 0, 0, 0, 24, 32, 36, 48, 66, 40, 66, 36, 66, 36, 66,
34, 66, 34, 66, 126, 66, 32, 36, 32, 24, 120, 0, 0, 0, 0};
//--03字模--//
uchar code tab8[] =
{0, 0, 0, 0, 0, 0, 24, 60, 36, 66, 66, 66, 66, 32, 66, 24, 66,
32, 66, 64, 66, 64, 66, 66, 36, 34, 24, 28, 0, 0, 0, 0};
//--02字模--//
uchar code tab9[] =
{0, 0, 0, 0, 0, 0, 24, 60, 36, 66, 66, 66, 66, 66, 66, 32, 66,
32, 66, 16, 66, 8, 66, 4, 36, 66, 24, 126, 0, 0, 0, 0};
//--01字模--//
uchar code tab10[] =
{0, 0, 0, 0, 0, 0, 24, 8, 36, 14, 66, 8, 66, 8, 66, 8, 66, 8, 66,
8, 66, 8, 66, 8, 36, 8, 24, 62, 0, 0, 0, 0};
//--00字模--//
uchar code tab11[] =
{0, 0, 0, 0, 0, 0, 24, 24, 36, 36, 66, 66, 66, 66, 66, 66, 66, 66,
66, 66, 66, 66, 66, 66, 36, 36, 24, 24, 0, 0, 0, 0};
//--GO--//
uchar code tab12[] =
{0, 0, 0, 0, 0, 0, 60, 28, 34, 34, 34, 65, 1, 65, 1, 65, 1, 65, 113,
65, 33, 65, 34, 65, 34, 34, 28, 28, 0, 0, 0, 0};
//--全局函数声明--//
void HC595SendData( uchar BT3, uchar BT2,uchar BT1,uchar BT0);
/*******************************************************************************
void main(void)
{
int k, i, ms;
}
/*******************************************************************************
void HC595SendData( uchar BT3, uchar BT2,uchar BT1,uchar BT0)
{
uchar i;
}
更多回帖