ÖÆÑõ»úµç×Ó¿ØÖÆÆ÷ϵͳÉè¼Æ_µçÆø¹¤³ÌÂÛÎÄ·¶ÎÄ
·¢²¼Ê±¼ä£º
2014-12-01
À´Ô´£º
ÈË´ó¾¼ÃÂÛ̳
µçÆø¹¤³ÌÂÛÎÄ
Õª Òª
Ëæ×żÆËã»ú¡¢µç×Ó¡¢Í¨Ñ¶¼¼ÊõµÄ·ÉËÙ·¢Õ¹£¬ÈËÃǶÔÓÚ¸÷ÖÖÖÇÄܲúÆ·µÄ¿ØÖÆÆ÷Ìá³öÁ˸ü¸ß¡¢¸üеÄÒªÇó¡£ÎªÁËÂú×ãÕâеÄÒªÇ󣬱¾±ÏÒµÉè¼Æ±¾×Å¡°ÏµÍ³Îȶ¨£¬½µµÍ³É±¾¡±µÄÔÔò£¬²ÉÓÃCMOS 8λPICµ¥Æ¬»ú½«ÖÆÑõ»úµÄµç×Ó¿ØÖÆÆ÷½øÐÐÈ«ÐÂÉè¼Æ¡£ÒÔCÓïÑÔ×÷Ϊ¿ª·¢ÓïÑÔ£¬MPLABΪ¿ª·¢»·¾³£¬Õë¶ÔÖÆÑõ»úµç×ÓÆ÷²úÆ·±àдÁËÓ¦ÓóÌÐò£¬Ê¹¸Ãµç×Ó¿ØÖÆÆ÷ʵÏÖÑÓʱ¿ª¹Øµç»ú£¬¿ª»úÌáʾ£»¾ßÓÐÏÔʾ»úÆ÷ÔËÐÐʱ¼ä£¬¶¨Ê±ÉèÖ㬵ôµç´¢´æÊý¾Ý£¬µÍѹ±¨¾¯£¬Á÷Á¿¿ØÖÆ£¬ÑõÆøÅ¨¶ÈÖ¸±êÏÔʾÒÔ¼°ÀûÓúìÍâÒ£¿Ø¶Ô¸Ãµç×Ó¿ØÖÆÆ÷ÔËÐкͶ¨Ê±µÄ¿ØÖƲÙ×÷µÈ¹¦ÄÜ¡£ÔÚ±¾±ÏÒµÂÛÎÄͨ¹ýÕâ¸öÏîÄ¿µÄ¿ª·¢¹ý³Ì£¬²ûÊöÁ˵¥Æ¬»úµÄÑ¡Ôñ£¬I2CʵÏÖµôµç´æ´¢Êý¾ÝµÄ·½·¨£¬Í¨¹ýÍⲿÖжÏʵºìÍâ½âÂë±à³ÌµÄ¼¼ÇÉ¡£Ì½ÌÖÈçºÎ½ÏºÃµÄÀûÓÃPICµ¥Æ¬»úµÄÄÚ²¿×ÊÔ´ÒÔ¼°ÔÚʵ¼Ê²úÆ·ÖÐÄܹ»ºÜºÃ£¬ºÜÎȶ¨µÄ¹¤×÷¡£
¹Ø¼ü´Ê£ºÍⲿÖжϣ»½âÂ룻MPLAB£»I2C£»µôµç´¢´æ
Ŀ ¼
ÕªÒª
Abstract¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡.¡........¡¡..¡¢ò
1 Ð÷ ÂÛ¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡.¡¡¡¡..¡..1
1.1 ±³ ¾°¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡.....¡¡...¡..¡....¡1
1.2 ÈÎÎñºÍÄ¿±ê¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡.¡....¡¡...¡.....¡2
2 ×ÜÌåÉè¼Æ·½°¸¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡...¡¡¡¡¡¡¡¡....¡........3
2.1 ϵͳ×ÜÌå½á¹¹¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡..¡¡¡¡¡.¡¡¡¡¡......3
2.2 ϵͳӲ¼þ½á¹¹¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡..¡..¡¡.....¡4
2.3 ϵͳ×ÜÌåÈí¼þÁ÷³Ì¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡..¡.¡.¡.....¡5
3 Èí¼þ¡¢Ó²¼þϵͳ½á¹¹Éè¼Æ¡¡¡¡¡¡¡¡¡¡..¡¡¡¡¡¡¡¡¡.....¡.....¡7
3.1 Èí¼þ¡¢Ó²¼þÉè¼Æ»·¾³¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡.¡¡..¡¡....¡..¡7
3.1.1 PIC16F877A µÄÐÔÄÜÌØµã¡¡¡¡¡¡¡¡¡¡¡¡¡¡.¡¡¡.¡......¡7
3.1.2 CÓïÑÔ½éÉÜ¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡..¡¡¡.¡¡.¡..¡.¡7
3.1.3 MPLAB IDE±à³Ì»·¾³½éÉÜ¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡.¡¡.¡.¡.¡9
3.1.4 HI-TECH PICC±àÒëÆ÷½éÉÜ¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡..¡¡...¡¡.10
3.1.5 Protel 99 SEµç·Éè¼Æ»·¾³½éÉÜ¡¡¡¡¡¡¡¡¡¡¡¡¡.¡¡.¡¡..¡12
3.2 Ó²¼þµç·¼°PCBÉè¼Æ¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡.¡¡..¡12
3.2.1Ö÷Òª¹¦ÄÜÉè¼ÆÒªµã¡¡¡¡¡¡¡¡¡¡¡¡..¡¡¡¡¡¡¡¡.¡¡..¡13
3.2.2ºìÍâÒ£¿Ø¿ØÖÆÒªÇó¡¡¡¡¡¡¡¡¡¡¡¡¡¡..¡¡¡¡¡¡¡...¡¡14
3.2.3¿ØÖÆÃæ°åµç·×é³É¼°¹¤×÷ÔÀí¡¡¡¡¡¡¡¡¡¡¡¡¡¡..¡.¡..¡¡16
3.2.4µçÔ´°åϵͳµçѹ²úÉúµç·¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡..¡.¡¡..¡18
3.2.5ÑõŨ¶È´«¸ÐÆ÷¼°¹¤×÷µçѹ²úÉúµç·¡¡¡¡¡¡¡¡¡..¡¡¡¡.¡¡..¡20
3.2.6¶Ïµç±¨¾¯µç·Éè¼Æ¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡..¡¡.¡¡..¡22
3.3 ³ÌÐòÉè¼Æ¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡.¡¡¡¡¡¡¡...¡22
3.3.1 Ö÷³ÌÐòµÄ¹¦ÄܺÍÁ÷³Ìͼ¡¡¡¡¡¡¡¡¡¡¡¡....¡¡¡¡¡¡.......¡.23
3.3.2 ¼üÅÌɨÃ躯Êý¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡.....¡...23
3.3.3 I2C¶ÁдAT24C02¹¦Äܺ¯Êý¡¡¡¡¡¡¡¡..¡¡¡¡¡¡¡¡¡¡..¡24
3.3.4 ¶¨Ê±Æ÷Ä£¿é¹¦Äܺ¯Êý¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡..¡¡¡¡¡¡..¡24
3.3.5 ADת»»¹¦Äܺ¯Êý¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡...¡¡¡.¡¡¡¡..¡24
3.3.6 ÍⲿÖжϺìÍâ½âÂ빦Äܺ¯Êý¡¡¡¡¡¡¡¡¡..¡¡¡¡¡¡¡¡.¡.¡25
4 ϵͳµ÷ÊÔ¡¡¡¡¡¡¡¡¡¡¡¡¡¡.¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡.....¡26
4.1 ϵͳ¹¦Äܵ÷ÊÔ¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡.¡¡.26
4.2 ϵͳµÄ¸Ä½ø·½Ïò¡¡¡¡¡¡¡¡¡¡¡¡¡...¡¡¡¡¡¡¡¡¡.¡¡..26
5 ×ܽᡡ¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡.¡¡¡¡¡¡¡¡¡¡¡¡¡....¡.¡.28
Ö л¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡..¡...¡¡¡¡¡¡¡¡.¡¡¡29
²Î¿¼ÎÄÏס¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡..¡¡..30
¸½Â¼1 Ó¢ÎÄ×ÊÁÏ¡¡¡¡¡¡¡¡¡¡¡.¡¡¡¡¡¡¡¡¡¡¡¡¡¡.¡¡.¡31
¸½Â¼2 Ó¢ÎÄ×ÊÁÏ·Òë¡¡¡¡¡¡¡¡¡¡¡.¡¡¡¡¡¡¡¡¡¡¡¡¡.¡¡41
¸½Â¼3 ϵͳ×ÜÔÀíͼ¼°PCBͼ¡¡¡¡¡¡¡¡¡¡¡.¡¡¡¡.¡¡¡...¡¡47
¸½Â¼4 Èí¼þ²¿·Ö×Ó³ÌÐò¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡.50
¸½Â¼5 ×ܳÌÐò¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡..¡¡¡¡¡¡¡.¡¡¡¡¡¡¡.65
Abstract
Along With the computer, electronics, the rapid development of communication technology, smart people for various products has put a higher controller, the updated requirements. In order to meet these new requirements, the design of the graduation "system stability, reduce costs" principle, the use of CMOS 8-bit PIC MCU make the oxygen plant will be the new electronic controller design. C language as to the development of language, MPLAB for the development of the environment, oxygen plant for the preparation of the electronic product applications, so that the electronic controller delay and switch the motor, the start-up tips; have machines running time, regular set, brown-out storage Data, low-voltage alarm, traffic control, oxygen concentration indicators and the use of infrared remote controller to the electronic timing of the operation and control of operating functions. In this thesis through the project development process, described the choice of SCM, I2C achieve power-down method of data storage, is interrupted by an external infrared decoder programming skills. Discussion on how to better use PIC MCU's internal resources and the actual products can be very good, very stable work.
Keywords£ºExternal interrupt; decoding; MPLAB; I2C; brown-out storage