/*******************************************************
* ç¨åºå称ï¼main.c
* ç¨åºåè½ï¼ä¸»ç¨åºæ件
* ç¨åºä½è
ï¼å´é´é¹°
* å建æ¶é´ï¼2014-3-10
* ä¿®æ¹æ¶é´ï¼
* ç¨åºçæ¬ï¼V0.1
******************************************************/
/*
* å
å«ç头æ件
*/
#include "reg51.h"
#include "inc/hc595.h"
#include "inc/delay.h"
#include "intrins.h"
/* åå¨å¾
åéçæ°æ® */
code unsigned char ucDataOneTab[16] = {0x01, 0x02, 0x04, 0x08, 0x10, 0x20,0x40,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,};
code unsigned char ucDataTwoTab[16] = {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01, 0x02, 0x04, 0x08, 0x10, 0x20,0x40,0x80};
//code unsigned char ucDataOneTab[16] = {0x01, 0x02, 0x04, 0x08, 0x10, 0x20,0x40,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,};
//code unsigned char ucDataTwoTab[16] = {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80, 0x40, 0x20, 0x10, 0x08, 0x04,0x02,0x01};
/******************************************************
* å½æ°å称ï¼main
* å½æ°åè½ï¼ä¸»å½æ°
* å
¥å£åæ°ï¼void
* åºå£åæ°ï¼
*******************************************************/
int main()
{
unsigned int i;
while (1)
{
for (i = 0; i < 16; i++ ) //æ¹æ16个ä¾æ¬¡äº®i<8æ¹æi<16
{
SendData(ucDataOneTab[i], ucDataTwoTab[i]);
Delay1ms(1000);
}
}
return 0;
}
追é®è½ç¨å¾®è¯¦ç»ç¹å¿åï¼æ²¡è§£éä¸å¤ªç解