51µ¥Æ¬»ú Keil C ÑÓʱ³ÌÐòµÄ¼òµ¥Ñо¿
51µ¥Æ¬»ú Keil C ÑÓʱ³ÌÐòµÄ¼òµ¥Ñо¿
by: InfiniteSpace Studio/isjfk, 1.21.2004
ÈκÎÈ˶¼¿ÉÒÔÔÚ×¢Ã÷Ô×÷Õߺͳö´¦µÄÇ°ÌáÏÂËæÒâתÔØÕâƪÎÄÕ£¬µ«²»µÃÓÃÓÚÉÌҵĿµÄ¡£
Ó¦Óõ¥Æ¬»úµÄʱºò£¬¾³£»áÓöµ½ÐèÒª¶Ìʱ¼äÑÓʱµÄÇé¿ö¡£ÐèÒªµÄÑÓʱʱ¼äºÜ¶Ì£¬Ò»°ã¶¼ÊǼ¸Ê®µ½¼¸°Ù΢Ãî(us)¡£ÓÐʱºò»¹ÐèÒªºÜ¸ßµÄ¾«¶È£¬±ÈÈçÓõ¥Æ¬»úÇý¶¯DS18B20µÄʱºò£¬Îó²îÈÝÐíµÄ·¶Î§ÔÚÊ®¼¸usÒÔÄÚ£¬²»È»ºÜÈÝÒ׳ö´í¡£ÕâÖÖÇé¿öÏ£¬ÓüÆʱÆ÷ÍùÍùÓеãСÌâ´ó×ö¡£¶øÔÚ¼«¶ËµÄÇé¿öÏ£¬¼ÆʱÆ÷ÉõÖÁÒѾȫ²¿ÅÉÉÏÁ˱ðµÄÓÃ;¡£Õâʱ¾ÍÐèÒªÎÒÃÇÁíÏë±ðµÄ°ì·¨ÁË¡£
ÒÔÇ°Óûã±àÓïÑÔдµ¥Æ¬»ú³ÌÐòµÄʱºò£¬Õâ¸öÎÊÌ⻹ÊÇÏà¶ÔÈÝÒ×½â¾öµÄ¡£±ÈÈçÓõÄÊÇ12MHz¾§ÕñµÄ51£¬´òËãÑÓʱ20us£¬Ö»ÒªÓÃÏÂÃæµÄ´úÂ룬¾Í¿ÉÒÔÂú×ãÒ»°ãµÄÐèÒª£º
mov r0, #09h
loop: djnz r0, loop
51µ¥Æ¬»úµÄÖ¸ÁîÖÜÆÚÊǾ§ÕñƵÂʵÄ1/12£¬Ò²¾ÍÊÇ1usÒ»¸öÖÜÆÚ¡£mov r0, #09hÐèÒª2¸ö¼«ÆäÖÜÆÚ£¬djnzÒ²ÐèÒª2¸ö¼«ÆäÖÜÆÚ¡£ÄÇô´æÔÚr0ÀïµÄÊý¾ÍÊÇ(20-2)/2¡£ÓÃÕâÖÖ·½·¨£¬¿ÉÒԷdz£·½±ãµÄʵÏÖ256usÒÔÏÂʱ¼äµÄÑÓʱ¡£Èç¹ûÐèÒª¸ü³¤Ê±¼ä£¬¿ÉÒÔʹÓÃÁ½²ãǶÌס£¶øÇÒ¾«¶È¿ÉÒÔ´ïµ½2us£¬Ò»°ãÀ´Ëµ£¬ÕâÒѾ×ã¹»ÁË¡£
ÏÖÔÚ£¬Ó¦Óøü¹ã·ºµÄºÁÎÞÒÉÎÊÊÇKeilµÄC±àÒëÆ÷¡£Ïà¶Ô»ã±àÀ´Ëµ£¬C¹ÌÈ»ÓкܶàÓŵ㣬±ÈÈç³ÌÐòÒ×ά»¤£¬±ãÓÚÀí½â£¬ÊʺϴóµÄÏîÄ¿¡£µ«È±µã£¨ÎÒ¾õµÃÕâÊÇCµÄΨһһ¸öȱµãÁË£©¾ÍÊÇʵʱÐÔûÓб£Ö¤£¬ÎÞ·¨Ô¤²â´úÂëÖ´ÐеÄÖ¸ÁîÖÜÆÚ¡£Òò¶øÔÚʵʱÐÔÒªÇó¸ßµÄ³¡ºÏ£¬»¹ÐèÒª»ã±àºÍCµÄÁªºÏÓ¦Óᣵ«ÊÇÊDz»ÊÇÕâÑùÒ»¸öÑÓʱ³ÌÐò£¬Ò²ÐèÒªÓûã±àÀ´ÊµÏÖÄØ£¿ÎªÁËÕÒµ½Õâ¸ö´ð°¸£¬ÎÒ×öÁËÒ»¸öʵÑé¡£
ÓÃCÓïÑÔʵÏÖÑÓʱ³ÌÐò£¬Ê×ÏÈÏëµ½µÄ¾ÍÊÇC³£ÓõÄÑ»·Óï¾ä¡£ÏÂÃæÕâ¶Î´úÂëÊÇÎÒ¾³£ÔÚÍøÉÏ¿´µ½µÄ£º
void delay2(unsigned char i)
{
for
Ïà¹ØÎĵµ£º
ÔÚCÓëC++ÓïÑÔÖж¼´æÔڹؼü×Öconst,ºÜ¶àÈ˶¼¶Ô´Ë¹Ø¼ü×Ö´æÔÚÒ»¸ö´íÎóµÄÈÏʶ£¬ÈÏΪÔÚCÓïÑÔÖйؼü×ÖconstÊÇʹ±äÁ¿×÷Ϊһ¸ö³£Á¿£¬¼´½«±äÁ¿³£Á¿»¯£¬¾ÍÏñºê¶¨ÒåÒ»Ñù¡£¶øÔÚCÓïÑÔÖеĹؼü×ÖconstËùÆðµÄ×÷Óò¢²»ÊÇʹ±äÁ¿³£Á¿»°£¬¶øÊÇÏÞÖƱäÁ¿£¬Ê¹±äÁ¿³ýÁ˱»¸³³õÖµÍ⣬ÎÞ·¨±»ÖØи³Öµ¡£
¶øÔÚC++Öйؼü×Öconst²»½öʹ ......
ʲôÊÇmvcģʽ £¿
MVC ʽµÄ³öÏÖ²»½öʵÏÖÁ˹¦ÄÜÄ£¿éºÍÏÔʾģ¿éµÄ·ÖÀ룬ͬʱËü»¹Ìá¸ßÁËÓ¦ÓÃϵͳµÄ¿Éά»¤ÐÔ¡¢¿ÉÀ©Õ¹ÐÔ¡¢¿ÉÒÆÖ²ÐÔºÍ×é¼þµÄ¿É¸´ÓÃÐÔ
B/S ģʽºÍC/SģʽÓÐʲôÇø±ð£¿
C/S½á¹¹£¬¼´Client/Server(¿Í»§»ú/·þÎñÆ÷)½á¹¹£¬ÊÇ´ó¼ÒÊìÖªµÄÈí¼þϵͳÌåϵ½á¹¹£¬Í¨¹ý½«ÈÎÎñºÏÀí·ÖÅäµ½Client¶ËºÍServer¶Ë£ ......
1 Ç°ÑÔ
¡¡³¤ÆÚÒÔÀ´£¬¹ã´ó³ÌÐòԱΪµ½µ×ÊÇʹÓÃClient/Server£¬»¹ÊÇʹÓÃBrowser/Server½á¹¹ÕùÂÛ²»ÐÝ£¬ÔÚÕâЩÕùÂÛµ±ÖÐ,C/S½á¹¹µÄ³ÌÐò¿Éά»¤ÐԲ²¼ÖÃÀ§ÄÑ£¬Éý¼¶²»·½±ã£¬Î¬»¤³É±¾¸ß¾ÍÊÇÒ»¸öÏ൱ÖØÒªµÄÒòËØ¡£ÓкܶàÆóÒµÓû§¾ÍÊÇÒòΪÕâ¸öÔÒò¶ø·ÅÆúʹÓÃC/S¡£È»¶øµ±Ò»¸öÓ¦ÓñØÐëҪʹÓÃC/S½á¹¹²ÅÄܺܺõÄʵÏÖÆ书ÄܵÄʱ ......
//ΪÁ˺ÍDSP¼æÈÝ£¬TSint64ºÍTUint64ÉèÖóÉTSint40ºÍTUint40Ò»ÑùµÄÊý
//½á¹ûVCÖл¹ÊÇÈÏΪÊÇ32λµÄ£¬ÏÔÈ»²»ºÏÊÊ
//typedef signed long int TSint64;
//typedef unsigned long int TUint64; &nb ......