»ùÓÚµ¥Æ¬»úµÄÈý²ãµçÌÝϵͳÉè¼Æ
¸½Â¼1 Ôª¼þÇåµ¥
ÐòºÅ Ãû³Æ ÐͺŠµ¥Î» ÊýÁ¿ ±¸×¢ 1 2 3 4 5 µç×è µçÈÝ ¾§Õñ °´¼ü 7¶ÎÏÔʾÊýÂë¹Ü 10K 30P 12MHZ --- SM42038 Ö§ Ö§ Ö§ ¸ö ¸ö 1 3 1 8 2 6 7 8 9 10 11 12 µç³ØºÐ µç³Ø µ¼Ïß¼°º¸Îý ×ÔËø¿ª¹Ø ÅÅ×è µ¥Æ¬»ú ÍòÓðå --- --- --- --- 102 AT89C51 --- ¸ö ½Ú --- ¸ö ¸ö ¸ö ¿é 1 3 Èô¸É 1 2 1 1
1
»ùÓÚµ¥Æ¬»úµÄÈý²ãµçÌÝϵͳÉè¼Æ
¸½Â¼2 ³ÌÐò²¿·Ö
#include #define LCD1 P1 #define LCD2 P3
void Zero();
void Delay_ms(unsigned int Time);
void Display(unsigned int n,unsigned char a); void Flash(unsigned int Time); void KBScan(); void dl_ms(); void Destination(); void Up(); void Down();
//P2Óë²éѯʽ¼üÅÌÓ²¼þÏàÁ¬ sbit P2_0=P2^0; sbit P2_1=P2^1; sbit P2_2=P2^2; sbit P2_3=P2^3; sbit P2_4=P2^4; sbit P2_5=P2^5; sbit P2_6=P2^6;
unsigned int lift=1; /*µçÌÝËùÔÚÂ¥²ã*/
unsigned int status=1; /*µçÌÝÉÏÐÐΪ1£¬ÏÂÐÐΪ0*/ unsigned char request[3]={0,0,0}; /*1~3Â¥ÓÐÎÞÇëÇó£¬ÓÐÇëÇóΪ1*/ unsigned char dst=1; /*µçÌݵÄÄ¿µÄÂ¥²ã*/
//ÇåÁã³ÌÐò void Zero() {
LCD1=0x00; LCD2=0x00; }
//ÑÓʱ³ÌÐò£¬ÒÔºÁÃëΪµ¥Î»£¬ÓÃÈí¼þ¼Æʱ£¬ÊäÈëµÄ²ÎÊý void Delay_ms(unsigned int Time) {
unsigned int i=0,j=0;
2
»ùÓÚµ¥Æ¬»úµÄÈý²ãµçÌÝϵͳÉè¼Æ
for(i=0;i