»ùÓÚ51µ¥Æ¬»úµÄÁ÷Ë®Ïß²úÆ·¼ÆÊýÆ÷Éè¼Æ_±ÏÒµÉè¼Æ ÁªÏµ¿Í·þ

·¢²¼Ê±¼ä : ÐÇÆÚËÄ ÎÄÕ»ùÓÚ51µ¥Æ¬»úµÄÁ÷Ë®Ïß²úÆ·¼ÆÊýÆ÷Éè¼Æ_±ÏÒµÉè¼Æ¸üÐÂÍê±Ï¿ªÊ¼ÔĶÁ81839fa0fbb069dc5022aaea998fcc22bdd14316

(´ËÎĵµÎªword¸ñʽ£¬ÏÂÔغóÄú¿ÉÈÎÒâ±à¼­Ð޸ģ¡)

±ÏÒµÉè¼Æ£¨ÂÛÎÄ£©

»ùÓÚ51µ¥Æ¬»úµÄÁ÷Ë®Ïß

²úÆ·¼ÆÊýÆ÷Éè¼Æ

°à ¼¶: 31001°à ÐÕ Ãû: ÌÆÊ÷´º ר Òµ: Ó¦Óõç×Ó¼¼Êõ Ö¸µ¼ÀÏʦ: ÖÜÏþºìÀÏʦ

¶þÁãÒ»¶þÄêÁùÔÂÊ®ÈÕ

Õª Òª

±¾ÏµÍ³²ÉÓõÄÊÇÒÔµ¥Æ¬»úSTC89c52ΪºËÐĵĹâµç¼ÆÊýÆ÷¡£Æ乤×÷Ô­ÀíÊDzÉÓõ¥Æ¬»úµÄÍⲿÖжÏ0À´½øÐмÆÊý£¬Êý¾Ý²É¼¯²¿·Ö²ÉÓ÷´Éäʽ¹âµç´«¸ÐÆ÷£¬½«ºìÍâ·¢¹â¹ÜÓë¹âµç½ÓÊÕ¹ÜÏàÁÚ°²·Å£¬Ã¿µ±ÎïÌåͨ¹ýÒ»´Î£¬ºìÍâ¹â¾Í±»ÎïÌå·´É䣬¹âµç½ÓÊչܽÓÊÕÒ»´Î£¬¹âµç½ÓÊչܵÄÊä³öµçѹ¾Í²úÉúÒ»¸ö±ä»¯£¬Õâ¸ö±ä»¯µÄµçѹÐźÅͨ¹ý·Å´óºÍ´¦Àíºó£¬ÐγɼÆÊýÂö³å£¬ÊäÈëÖÁSTC89c52µ¥Æ¬»úµÄP3.2¿Ú£¬Í¨¹ýÈí¼þ¿ØÖƺÍÓ²

I ¼þ¿ØÖƲ¢ÓÃLED¼ÓÒÔÏÔʾ£¬±ã¿ÉʵÏÖ¶ÔÎïÌåµÄ¼ÆÊýͳ¼Æ¡£±¾¼ÆÊýÆ÷¿É½«»úе»òÈ˹¤¼ÆÊý·½Ê½±äΪµç×Ó¼ÆÊý£¬²¢ÇÒ²ÉÓÃLEDÊýÂë¹ÜÏÔʾ£¬¿ÉÊÊÓÃÓÚÖî¶àÐÐÒµ£¬ÒÔÂú×ãÏÖ´úÉú²ú¡¢Éú»î·½Ê½µÄÐèÇó¡£

ËùνµÄ¹âµçʽ´«¸ÐÆ÷Êǽ«¹âÐźÅת»¯ÎªµçÐźŵÄÒ»ÖÖ´«¸ÐÆ÷¡£¹âµçʽ´«¸ÐÆ÷ÊÇÒÔ¹âµçÆ÷¼þ×÷Ϊת»»×é¼þµÄ´«¸ÐÆ÷£¬¹âµç¼ì²â·½·¨¾ßÓо«¶È¸ß¡¢Ó¦Óÿ졢·Ç½Ó´¥µÈÓŵ㣬¶ø¿É²â²ÎÊý¶à£¬¹âµç´«¸ÐÆ÷µÄ½á¹¹¼òµ¥£¬ÐÎʽÁé»î¶à±äÒò´Ë£¬¹âµçʽ´«¸ÐÆ÷ÔÚ¼ì²âºÍ¿ØÖÆÖÐÓ¦Ó÷dz£¹ã·º¡£

¹Ø¼ü´Ê£º¼ÆÊýÆ÷£»¹âµç´«¸ÐÆ÷£»µ¥Æ¬»ú£»LEDÊýÂë¹Ü

Abstract

This system USES is with STC89c52 single chip microcomputer as the core of the photoelectric counter. The working principle of adopting SCM external interruption 0 to count, the data acquisition of the reflecting photoelectric sensor, the infrared light tube and photoelectric receiving tube adjacent put, whenever the object through a, infrared light is object reflective, photoelectric tube receiving a receiving, photoelectric receiving tube is the output voltage of produce a change, the changes of the voltage signal through the amplifier and processing, form count pulse, the input to STC89c52 SCM P3.2 mouth, through the control software and realize the object counting statistics. This counter can or mechanical artificial count way into

electronic counted, and using LED digital display tube, can be used in many industries, to meet the modern production, the way of life of demand.

The so-called photoelectric sensor is light signals are converted to electrical signals a sensor. Photoelectric sensor is based on photoelectric device as a conversion of components of the sensor, photoelectric detection method , the advantages of fast contact, and can be measured parameters, the structure of the photoelectric sensor is simple, flexible in form so, photoelectric sensor in the detection and control is widely used.

Keywords: counter; Photoelectric sensor; microcomputer; LED digital tube

Ŀ ¼

Õª Òª ............................................................................................................................... I ABSTRACT ............................................................................................................................ III µÚ1Õ Ð÷ ÂÛ ............................................................................................................... 1

1.1¡¢±¾ÂÛÎĵı³¾°ºÍÒâÒå .......................................................................................... 1 1.2¡¢Ö÷Òª·½·¨ºÍÑо¿½øÕ¹ .......................................................................................... 1 1.3¡¢Ö÷ÒªÄÚÈÝ .............................................................................................................. 1 1.4¡¢½á¹¹°²ÅÅ .............................................................................................................. 1 µÚ2Õ ÕûÌåÉè¼Æ·½°¸ ......................................................................................................... 2

2.1¡¢Éè¼Æ·½°¸Ñ¡Ôñ ...................................................................................................... 2 2.2¡¢Éè¼Æ·½¿òͼ .......................................................................................................... 2 µÚ3Õ Ӳ¼þÉè¼Æ¼°¹¦ÄÜ ................................................................................................. 2

3.1¡¢»ù±¾½éÉÜ .............................................................................................................. 3 3.2¡¢AT89C52Òý½Å¹¦ÄÜ ............................................................................................... 3 3.3¡¢STC89C52ϵͳ½á¹¹Í¼ .......................................................................................... 4 3.4¡¢STC89C52µÄ¸´Î»ÓëʱÖÓ ...................................................................................... 5 3.5¡¢STC89C52µ¥Æ¬»úµÄ»ù±¾¹¤×÷µç· ..................................................................... 5 3.6¡¢±¾´ÎÉè¼ÆµÄ²¿·Öµç· .......................................................................................... 5 3.7¡¢74HC573оƬ ....................................................................................................... 5 3.8¡¢ÏÔʾµç· .............................................................................................................. 6 µÚ4Õ Èí¼þÉè¼Æ ............................................................................................................... 7

4.1¡¢PROTEUSÈí¼þ ..................................................................................................... 7 4.2¡¢KEIL C51Èí¼þ .................................................................................................... 8 4.3¡¢Èí¼þÉè¼ÆÁ÷³Ìͼ£º ............................................................................................ 11 Ö л ............................................................................................................................. 12 ½á ÂÛ ........................................................................................................................... 12 ²Î¿¼ÎÄÏ× ............................................................................................................................. 13 ¸½ ¼ 1 µçÆøÔ­Àíͼ ................................................................................................. 14 ¸½ ¼ 2 PCBͼÓë3DÊÓͼ ............................................................................................ 14 ¸½Â¼3 Ô´³ÌÐò .................................................................................................................. 17 ¸½Â¼4 ·ÂÕæЧ¹ûͼ ............................................................................................................ 18