case 0xeb: //¼ì²âµ½1±»°´Ï if(keycount!=0) { write_date(0x30+1); iset[keycount++]=1; } break; case 0xdb: //¼ì²âµ½2±»°´Ï if(keycount!=0) { write_date(0x30+2); iset[keycount++]=2; }
break; case 0xbb: //¼ì²âµ½3±»°´Ï if(keycount!=0) { write_date(0x30+3); iset[keycount++]=3; } break; case 0x7b: //¼ì²âµ½-±»°´Ï iset[4]--; if(iset[4]==-1) { iset[4]=9; iset[3]--; if(iset[3]==-1) { iset[3]=9; iset[2]--; if(iset[2]==-1) { iset[2]=9; iset[1]--; } } } write_com(0x80+5); write_date(0x6d); write_date(0x41); write_com(0x80); write_date(0x53); write_date(0x30+iset[1]);
write_date(0x30+iset[2]); write_date(0x30+iset[3]); write_date(0x30+iset[4]); AD_DAstart=1; break; } while(temp!=0xf0) //ËÉÊÖ¼ì²â { temp=P2; temp=P2&0xf0; } } }
P2=0xf7; // ¼ì²âµÚËÄÐи÷¼üÊÇ·ñÓа´¼ü°´Ï temp=P2; // ½«P2¿ÚµÄÖµ¸³¸øtemp temp=temp&0xf0; // λÓë if(temp!=0xf0) {
delayms(100); temp=P2;
temp=temp&0xf0; if(temp!=0xf0) //È·Èϱ»°´Ï£¬·ÀÖ¹¶¶¶¯ { temp=P2; switch(temp) { case 0xe7: //¼ì²âµ½0±»°´Ï if(keycount!=0) { write_date(0x30); iset[keycount++]=0; } break; case 0xd7: //¼ì²âµ½É¾³ý¼ü±»°´Ï if(keycount<5&&keycount>0) { if(keycount!=1) keycount--; write_com(0x80+keycount); }
break; case 0xb7: //¼ì²âµ½È·Èϼü±»°´Ï if(set==1) {
write_com(0x01); // Êý¾ÝÖ¸Õë¼°Êý¾ÝÇå0 write_com(0x80+5); write_date(0x6d); write_date(0x41); write_com(0x80); write_date(0x53); write_com(0x0f); write_com(0x80+1); set=0; keycount=1; } break; case 0x77: write_com(0x01); // Êý¾ÝÖ¸Õë¼°Êý¾ÝÇå0 write_com(0x80); // ÉèÖÃÊý¾ÝµØÖ·Ö¸Õ룬µÚÒ»ÐÐ for(num=0;num<16;num++) { write_date(table1[num]); delayms(1); //Ñ»··½Ê½Ð´µÚÒ»ÐÐÊý¾Ý } set=1; write_com(0x80+0x40); // ÉèÖÃÊý¾ÝµØÖ·Ö¸Õ룬µÚ¶þÐÐ for(num=0;num<16;num++) { write_date(table2[num]); delayms(1); //Ñ»··½Ê½Ð´µÚ¶þÐÐÊý¾Ý } AD_DAstart=0; break; } while(temp!=0xf0) //ËÉÊÖ¼ì²â { temp=P2; temp=P2&0xf0; } } }
if(keycount==5) { keycount=0; AD_DAstart=1;
write_com(0x0c); }
}
2011½ì±ÏÒµÉè¼Æ£¨ÂÛÎÄ£©¿ÎÌâÈÎÎñÊé
ϵ(²¿)£ºµç×ÓÓëͨÐŹ¤³Ìϵ רҵ£ºµçÆø¹¤³Ì¼°Æä×Ô¶¯»¯
Ö¸µ¼½Ìʦ ѧÉúÐÕÃû ¿ÎÌâÃû³Æ ѧºÅ Ö°³Æ °à¼¶ »ùÓÚproteusµÄÊý¿ØºãÁ÷Ô´µÄ·ÂÕæÑо¿ ÄÚ ÈÝ ¼° ÈÎ Îñ Éè¼ÆÄÚÈÝ£º ÀûÓÃproteusÈí¼þÉè¼ÆÊý¿ØÖ±Á÷µçÁ÷Ô´£¬²¢¶ÔÉè¼Æµç·½øÐзÂÕæÑéÖ¤¡£±¾Éè¼ÆµÄÖ÷ÒªÈÎÎñÊÇ£ºÊäÈë½»Á÷µçѹ200¡«240V£¬50Hz£»Êä³öÖ±Á÷µçѹ¡Ü10V¡£ÆäÔÀíʾÒâͼÈçÏÂËùʾ¡£ ÏÔʾÆ÷ ¼üÅÌ ¿ØÖÆÆ÷ µç Ô´ µçÁ÷Ô´ ¸ºÔØ
Äâ ´ï µ½ µÄ Òª Çó »ò ¼¼ Êõ Ö¸ ±ê »ù±¾ÒªÇó£º 1¡¢Êä³öµçÁ÷·¶Î§£º200mA¡«2000mA£» 2¡¢¿ÉÉèÖò¢ÏÔʾÊä³öµçÁ÷¸ø¶¨Öµ£¬ÒªÇóÊä³öµçÁ÷Óë¸ø¶¨ÖµÆ«²îµÄ¾ø¶ÔÖµ¡Ü¸ø¶¨ÖµµÄ1£¥+10 mA£» 3¡¢¾ßÓС°+¡±¡¢¡°-¡±²½½øµ÷Õû¹¦ÄÜ£¬²½½ø¡Ü10mA£» 4¡¢¸Ä±ä¸ºÔصç×裬Êä³öµçѹÔÚ10VÒÔÄڱ仯ʱ£¬ÒªÇóÊä³öµçÁ÷±ä»¯µÄ¾ø¶ÔÖµ¡ÜÊä³öµçÁ÷ÖµµÄ1£¥+10 mA£» 5¡¢×ÔÖƵçÔ´£¨ÀûÓ÷ÂÕæÔ¼þʵÏÖ£©¡£ ÆðÖ¹ÈÕÆÚ 2010Äê11ÔÂ01ÈÕ¡ª2010Äê12ÔÂ01ÈÕ 2010Äê12ÔÂ02ÈÕ¡ª2011Äê02ÔÂ01ÈÕ 2011Äê02ÔÂ02ÈÕ¡ª2011Äê04ÔÂ01ÈÕ 2011Äê04ÔÂ02ÈÕ¡ª2011Äê05ÔÂ01ÈÕ 2011Äê05ÔÂ02ÈÕ¡ª2011Äê05ÔÂ10ÈÕ 2011Äê05ÔÂ10ÈÕ¡ª2011Äê05ÔÂ21ÈÕ ¹¤×÷ÄÚÈÝ ¸ù¾ÝÈÎÎñÊé²éÕÒÏà¹Ø×ÊÁÏ£¬×öһЩʵµØµ÷ÑУ»³õ²½È·¶¨Éè¼Æ˼·¡£ Õýʽȷ¶¨ÏµÍ³Éè¼Æ·½°¸£¬×öºÃ¿ªÌⱨ¸æ¡£ Íê³ÉϵͳµÄÈ«²¿Éè¼Æ¡¢°²×°¡¢µ÷ÊÔ£»ÔÚÉè¼Æ¹ý³ÌÖÐΪ ÂÛÎÄ×¼±¸²ÄÁÏ¡£ ¸ù¾ÝÉè¼ÆÄÚÈÝÍê³ÉÂÛÎĵÄ׫д£»·´¸´ÐÞ¸ÄÓëÅúÔÄ£¬×îÖÕ¶¨¸å¡£ ½øÐзÂÕ棬Íê³ÉÂÛÎÄ¡£ ÐÞ¸ÄÂÛÎÄ£¬ÖÆ×÷PPT£¬×¼±¸´ð±ç¡£ ½ø ¶È °² ÅÅ