LM3S9B96ÓëCC2520ƽ̨ÉϵÄZigBee×éÍø¼¼Êõ¼°Ó¦ÓÃ[ͼ]

Ïà¹ØרÌ⣺ ÎÞÏß Ð¾Æ¬

ÕªÒª£ºZigBee¼¼ÊõÊÇ»ùÓÚIEEE802.15.4µÄÒ»ÖÖÐÂÐ˵Ķ̾àÀë¡¢µÍ¹¦ºÄ¡¢µÍ³É±¾ºÍµÍËÙÂʵÄÎÞÏß´«¸ÐÆ÷ÍøÂç¼¼Êõ¡£ÍøÂç½Úµã×÷ΪÎÞÏß´«¸ÐÆ÷ÍøÂçµÄÎïÀíÔØÌ壬ÈçºÎʵÏÖÖÚ¶àÍøÂç½ÚµãµÄÖÇÄÜ»¯½ÓÈë³ÉΪ¹Ø¼üÎÊÌâÖ®Ò»¡£±¾ÎÄÌá³öÁËLM3S9B96+CC2520ƽ̨ÉÏÎÞÏßͨÐŽڵãµÄÖÇÄÜ»¯Éè¼Æ£¬·ÖÎöÁËZigBeeÎÞÏß×éÍøÓëÊý¾ÝͨÐż¼Êõ£¬²¢ÊµÏÖÁËÖÇÄܲ´³µÒýµ¼ÏµÍ³µÄÓ¦Óá£

ÒýÑÔ

»ùÓÚIEEE802.15.4±ê×¼µÄZigBee¶Ì¾àÀëµÍËÙÎÞÏ߸öÓòÍø(LR-WPAN)ЭÒ齫µÍËÙÂÊ¡¢µÍ¹¦ºÄ¡¢µÍ³É±¾×÷ΪÖ÷ÒªÑо¿Ä¿±ê£¬ÊÇÄ¿Ç°ÎÞÏß´«¸ÐÆ÷ÍøÂçµÄÖØÒªÖ§³ÅЭÒéÖ®Ò»¡£Õë¶ÔZigBeeÎÞÏ߶̾àÀëµÍ¹¦ºÄ½â¾ö·½°¸£¬ËäȻĿǰÒѾ­Óкü¸¼Ò´ó°ëµ¼Ì幫˾Éè¼Æ¡¢Éú²úÁËÏàÓ¦µÄÎÞÏßоƬ²¢ÌṩÁ˶ÔÓ¦µÄÖ§³ÖЭÒéÕ»£¬µ«ÊÇÄ¿Ç°µÄZigBeeÍøÂç¶àÊDzÉÓÃÐÔÄܽϵ͡¢´æ´¢ÈÝÁ¿½ÏСµÄ8/16λ΢¿ØÖÆÆ÷À´ÊµÏֵġ£È»¶ø£¬ZigBeeÎÞÏßÍøÂçµÄÖÐÐÄ¿ØÖƽڵãÍùÍùÒª·ÖÎö¡¢´¦ÀíÍøÂçÖÐͨÐŵĴóÁ¿Êý¾Ý£¬ÔÚһЩ¶Ôʵʱ¼°¸ßЧÂÊÓÐÑϸñÒªÇóµÄÓ¦Óó¡ºÏ£¬ÓбØÒª²ÉÓøßÐÔÄܵÄ΢´¦ÀíÆ÷×÷Ϊ½ÚµãµÄÊý¾Ý´¦Àíµ¥Ôª¡£TI¹«Ë¾Stellaris MCUÄÚ²¿ÓµÓÐÒ»¸ö32λARM Cortex-M3´¦ÀíÆ÷ºË£¬ARM Cortex-M3ºË¾ßÓиßËٵĴ¦ÀíËÙ¶ÈÇÒÖ§³ÖоƬ³§ÉÌ×Ô¼ºÀ©Õ¹·á¸»µÄÍâÉ裬±ÈÈçÍø¿Ú¡¢USB¿Ú¡¢LCDµÈ¡£Í¬Ê±£¬StellarisϵÁÐ΢¿ØÖÆÆ÷°üº¬ÁË100¶àÖÖ¿ÉÒÔÏòÈ«Çò¹©»õµÄ32λARMºËµÄMCU¡£±¾ÎÄÑ¡ÓûùÓÚ32λARM Cottex-M3ºËµÄ΢¿ØÖÆÆ÷LM3S9B96×÷ΪÎÞÏßоƬCC2520µÄ΢¿ØÖÆÆ÷µ¥Ôª¹¹³ÉЭµ÷Æ÷½Úµã£¬Áí½«8051ºËµÄSoC CC2530оƬģ¿é×÷ΪÖն˲ɼ¯½Úµã¡£Í¨¹ýÅäÖýڵãÉ豸»·¾³£¬ÊµÏÖÁËZigBeeЭÒéϵÄÖÕ¶ËÊý¾Ý²É¼¯¼°ÐÇÐÍ¡¢Ê÷ÐÍϵÄÎÞÏß×éÍøͨÐŹ¦ÄÜ£¬ÑéÖ¤Á˲»Í¬¹æ¸ñµÄZigBeeÎÞÏßÄ£¿éÔÚͬһЭÒéÕ»»·¾³ÏÂÄܹ»Õý³£×éÍøͨÐÅ£¬³§ÉÌÌṩµÄ²»Í¬ZigBeeÉ豸¿É½øÐл¥²Ù×÷¡£

1 ZigBeeÓ¦ÓÃÌåϵ½á¹¹

±¾Æ½Ì¨²ÉÓÃZigBee±ê×¼¼¼Êõ£¬Æä¾ßÌåÓ¦ÓÃÌåϵ½á¹¹Èçͼ1Ëùʾ¡£ÆäÖУ¬Ó²¼þʵÌå²ãÖ÷ÒªÓÉ´¦ÀíÆ÷Ä£¿é¡¢ÎÞÏßͨÐÅÄ£¿é¹¹³É£¬Çø±ðÓÚЭµ÷Æ÷»ò·ÓÉÆ÷µÄÈ«¹¦ÄÜÉ豸£¬×÷Ϊ¾«¼ò¹¦ÄÜÉ豸µÄÖն˽ڵãÒ»°ã»¹ÐèÔÙÅäÉÏ´«¸ÐÆ÷Ó²¼þÄ£¿éÒÔʵÏÖÊý¾Ý²É¼¯£»OSALÈí¼þ¹¦ÄÜÄ£¿é×÷ΪTIZ-StackЭÒéÕ»ÖеIJÙ×÷ϵͳ³éÏó²ã£¬Í³Ò»¹ÜÀíЭÒéÕ»µÄÔËÐÐÒÔ¼°¸÷ÖÖÈÎÎñʼþµÄÏìÓ¦£»ZigBeeЭÒéÕ»ÔËÐÐÓÚOSAL³éÏóϵͳ֮ÉÏ£¬¸ÃЭÒéÕ»ÊÇÓɲãÀ´Á¿»¯±íʾÆäÕû¸öЭÒé±ê×¼µÄ£¬Ã¿Ò»²ã¸ºÔðÍê³ÉËù¹æ¶¨µÄÈÎÎñ£¬²¢ÇÒÏòÉϲãÌṩÏàÓ¦µÄÊý¾Ý½Ó¿Ú¼°·þÎñ£»ZigBee¼¼ÊõÌåϵ½á¹¹Ö÷ÒªÓÉÎïÀí(PHY)²ã¡¢Ã½Ìå·ÃÎÊ¿ØÖÆ(MAC)²ã¡¢ZigBeeÍøÂç(NWK)²ãÒÔ¼°Ó¦ÓÃ(APL)²ã¹¹³É£¬ÆäÖÐÎïÀí²ãÓëýÌå·ÃÎÊ¿ØÖƲãЭÒéΪIEEE 802.15.4ЭÒé±ê×¼£¬ÍøÂç²ãÓÉZigBee¼¼ÊõÁªÃËÖƶ¨£¬¶øÓ¦ÓòãµÄÓ¦ÓÃÔò¸ù¾ÝÓû§×Ô¼ºµÄÓ¦ÓÃÐèÇó½øÐпª·¢ÀûÓá£

ÔÚÓ¦ÓÃϵͳÉè¼Æ¹ý³ÌÖУ¬¿¼Âǵ½LM3S9B96µÄÓÅÁ¼ÌØÐÔÒÔ¼°×÷ΪЭµ÷Æ÷¶ÔÓ²¼þ½ÚµãµÄ¸ßÐÔÄÜÒªÇó£¬Óøÿª·¢°åÀ´¿ØÖÆCC2520ÎÞÏß´«ÊäÄ£¿é£¬²¢°ÑLM3S9B96+CC2520×÷ΪЭµ÷Æ÷½Úµã£¬ÕâÒ²ÊÇTI¹«Ë¾ÌṩµÄеÄ32λÎÞÏß´«¸ÐÆ÷ÍøÂç½Úµã·½°¸¡£Í¬Ê±£¬½«¼¯³ÉÁËÒ»¸ö8051ºË¼°ÉäƵµç·µÄCC2530ÎÞÏßÄ£¿é×÷Ϊ·ÓɺÍÖն˽ڵ㣬Öն˽ڵãµÄ´«¸ÐÆ÷Ôò²ÉÓÃE18-D80NKDC-5V·´Éäʽ½Ó½ü¿ª¹Ø´«¸ÐÆ÷£¬ÒԴ˹¹³ÉZigBeeÎÞÏß×éÍøµÄÓ²¼þƽ̨¡£ÔÚZigBeeЭÒéջѡÔñ·½Ã棬CC2520¼°CC2530ʹÓõÄÊÇTI¹«Ë¾Éè¼ÆµÄ·ûºÏZigBee2007/PRO±ê׼ϵͳµÄZigBeeЭÒéÕ»Z-Stack¡£Z-StackÊÇ×îй¦ÄܵÄЭÒéÕ»²úÆ·£¬ÔÚ»¥²Ù×÷ÐÔ¡¢½ÚµãÃܶȹÜÀí¡¢Êý¾Ý¸ººÉ¹ÜÀí¡¢ÆµÂʽݱäµÈ·½ÃæÓÐÖØ´ó½ø²½£¬ÇÒ¾ßÓÐÖ§³ÖÍø×´ÍøÂçºÍµÍ¹¦ºÄµÈÌص㡣ÔÚÓ¦ÓóÌÐòÄ£¿éÖУ¬Í¨¹ýE18-D80NKDC-5V·´Éäʽ½Ó½ü¿ª¹Ø´«¸ÐÆ÷½øÐÐÕÏ°­Îï¼ì²â£¬ÀûÓÃCC2530Öն˽ڵãÓëLM3S9B96Эµ÷Æ÷½øÐÐZigBeeÐÇÐÍÍøͨÐÅ£¬¹¹½¨ÁËÖÇÄܲ´³µÒýµ¼ÏµÍ³¡£

2 ZigBeeÍøÂç½Úµã½á¹¹

2.1 Ó²¼þÄ£¿é½éÉÜ

TI¹«Ë¾µÄCC2520¡¢CC2530оƬÊÇ·ûºÏZigBee¼¼ÊõµÄ¾ßÓи߼¯³É¶ÈµÄÎÞÏßÉäƵÊÕ·¢Æ÷¼þ£¬CC2520ºÍCC2530оƬµÄPHYÓëMAC²ãЭÒé·ûºÏIEEE 802.15.4±ê×¼£¬Ä£¿é¿É¹¤×÷ÔÚ2 394¡«2 507 MHzµÄ2.4 GHz ISMÃâ·ÑƵ¶Î¡£¸ÃƵ¶Î¿ÉÌṩ16¸öÎïÀíͨÐÅÐŵÀ£¬¹¤×÷ËÙÂÊ¿É´ïµ½250 kbps£¬ÂëƬËÙÂÊΪ2 Mchip/s¡£CC2520ºÍCC2530ÎÞÏßоƬ¾ùÊÇÓÐ×ŵ͹¦ºÄµÄÌص㣬ÔÚ½ÓÊÕÊý¾Ý֡ʱµçÁ÷ÏûºÄ½öΪ18.5 mA£¬ÆäÊä³ö¹¦Âʱà³Ì¿É¿Ø£¬×î´óÊä³ö¹¦ÂÊ¿É´ï5 dBm£¬´ËʱµçÁ÷ÏûºÄ33.6 mA£¬Ö§³ÖIEEE802.15.4±ê×¼ÓëZigBeeЭÒ顣оƬµÄRFµç·²¿·Ö»¹Ìṩ·á¸»µÄÓ²¼þ¹¦ÄÜÖ§³Ö£¬Èç·â°ü´¦Àí¡¢Êý¾Ý»º³å¡¢±¬·¢´«Êä¡¢Êý¾Ý¼ÓÃÜ¡¢Êý¾ÝÑéÖ¤¡¢¿ÕÏÐÐŵÀÆÀ¹À¡¢Á´Â·ÖÊÁ¿Ö¸Ê¾ºÍ·â°üʱ¼äÐÅÏ¢£¬¿É´ó·ù¼õÇáÖ÷»ú¿ØÖÆÆ÷µÄ×÷Òµ¸ººÉ¡£

TI¹«Ë¾LM3S9B96΢¿ØÖÆÆ÷ÄÚº¬DMA¡¢Êý×Ö/Ä£Äâת»»Æ÷(DAC)ºÍÄ£Äâ/Êý×Öת»»Æ÷(ADC)µÈ¹¦ÄÜÄ£¿éÇÒÌṩÒÔÌ«Íø¡¢CAN¼°USB¿ÚͨÐÅ£¬ÓÖ¼æ¾ß¸ßÐÔÄܼ°³¬µÍ¹¦ºÄµÄÌص㣬ÄÜΪZigBeeÓ¦ÓÃÌṩÁ¼ºÃµÄÓ²¼þÖ§³Ö¡£ÎÞÏß´«¸ÐÍøÂç½ÚµãµÄ¾ßÌåÓ²¼þ½á¹¹Èçͼ2Ëùʾ¡£

2.2 ÎÞÏßͨÐŽڵãƽ̨·ÖÎö

ͨ¹ýÁ˽âIEEE802.15.4±ê×¼¡¢ZigBee¹æ·¶£¬²¢ÔÚ´ËÀíÂÛ»ù´¡ÉÏÑо¿TI¹«Ë¾µÄ±ê×¼ZigBeeЭÒéÕ»Z-Stack£¬¶ÔÆäµ×²ãÇý¶¯¡¢Ð­ÒéÕ»µÄ³õʼ»¯ÒÔ¼°Ê¼þ»úÖƽøÐÐÁËÑо¿Óë·ÖÎö¡£LM3S9B96+CC2520½Úµã×÷Ϊµ±Ç°½ÏеÄZigBee½Úµãƽ̨£¬»ùÓÚÈÎÎñµ÷¶È»úÖÆ£¬²ÉÓù¦ÄÜÄ£¿é»¯Éè¼Æ¡£

2.2.1 Эµ÷Æ÷µÄ¹¦ÄÜÄ£¿éÅäÖÃ

LM3S9B96΢¿ØÖÆÆ÷ÌṩÁË3¸öUARTͨÐÅ¿Ú£¬ÔÚzstack_collector¹¤³ÌÖÐÑ¡ÔñUART0×÷Ϊ´®ÐÐͨÐŶ˿ڡ£ÔÚϵͳʱÖÓÅäÖÃÉÏ£¬ÎªÊ¹Ð­µ÷Æ÷½ÚµãÔËÐÐÔÚ50 MHzµÄƵÂÊÉÏ£¬ÐèʹÓÃPLL(Phase Locked Loop£¬ËøÏà»·)½øÐÐϵͳʱÖÓ4·ÖƵÅäÖá£ÁíÍ⣬³ÌÐòÖÐʹÓö¨Ê±Æ÷timer0AÓëtime0BÒÔÖ§³ÖЭÒéÕ»ÈÎÎñµÄÔËÐС£CC2520ÓëLM3S9B96Ö®¼ä²ÉÓÃSPI½Ó¿Ú£¬ÆäËûÒý½ÅÅäÖÃΪ£ºFIFOP×÷Ϊ½ÓÊÕÊý¾Ý°üÅжϵÄÖØÒªÒý½Å£¬¶ÔÓ¦¿ª·¢°åÉϵÄÖжÏÒý½ÅPC6£»Êý¾Ý»º´æÅжÏÒý½ÅFIFOÔò¶ÔÓ¦PC7¡£ÔÚ½ÓÊÕģʽÏ£¬µ±·¢ÉúÔ½½ç»òÖ¡½ÓÊÕÍê±Ïʱ£¬FIFOPÒý½Å¿ÉÒÔÓÃÀ´ÖжÏ΢´¦ÀíÆ÷£¬FIFOÒý½Å¿ÉÒÔÓÃÀ´ÅжÏÊý¾ÝÊÇ·ñ¶¼´¦ÓÚ½ÓÊÕFIFOÖС£CC2520ÓëLM3S9B96΢¿ØÖÆÆ÷µÄ½Ó¿ÚÈçͼ3Ëùʾ¡£

CC2520ÀûÓÃSFD¡¢FIFO¡¢FIFOPºÍCCA 4¸öÒý½Å²éѯÊý¾ÝÊÕ·¢×´Ì¬£¬ÀûÓÃSPI½Ó¿Ú(CSN¡¢SO¡¢SI¡¢SCK)ÓëLM3S9B96΢¿ØÖÆÆ÷½øÐÐÊý¾Ý½»»»¼°ÃüÁî´«ËÍ¡£ÁíÍ⣬ÀûÓÃRSTnÒý½Å¸´Î»Ð¾Æ¬²¢Ê¹ÓÃVREG_ENÒý½ÅʹÄÜCC2520µÄµçѹµ÷ÕûÆ÷£¬Ê¹Æä²úÉúCC2520Õý³£¹¤×÷ËùÐèµÄµçѹ£¬CC2520µÄµçѹ¹æ¸ñ·¶Î§Îª1.8¡«3.8 V¡£±¾Æ½Ì¨µÄCC2520ÓëCC2530ʹÓõ¥¼«ÌìÏß½øÐÐͨÐÅ¡£

2.2.2 Эµ÷Æ÷µÄÈí¼þ»·¾³ÅäÖÃ

ʹÓÓ#include"config/lm3s/f8wConfig.h"”Óë“#include"config/lm3s/f8wCoord. h"”½«¸Ã¹¤³ÌÅäÖÃΪЭµ÷Æ÷¹¤³ÌÏîÄ¿¡£È»ºóÔÚZigBeeÍøÂçÉèÖÃÉÏ£¬Í¨¹ý“#define DEFAULT_CHANLIST 0x00000800”ºê¶¨Ò彫ÎïÀíÐŵÀÅäÖÃΪ11£¬Í¨¹ý“#define ZDAPP_CONFIG_PAN_ ID0xFFFF”ºê¶¨ÒåʹµÃЭµ÷Æ÷ÔËÐÐʱ¿É×ÔÐÐÉèÖÃPAN ID£¬ÈôZDAPP CONFIG_PAN_IDÖµ²»Îª0xFFFFʱ£¬PANIDÓÉÆäÖ¸¶¨¡£ZigBee½ÚµãµÄ2.4 GHzƵ¶ÎÓÐ×ÅÁ¼ºÃµÄ¿¹¸ÉÈÅÐÔÄÜ£¬²»Í¬ÐŵÀϵÄͨÐÅ»¥²»¸ÉÈÅ¡£ÔÚ×éÍø¹ý³ÌÖÐÎñ±Ø±£Ö¤ÍøÂç½ÚµãÓµÓÐÏàͬµÄPAN ID¼°ÎïÀíÐŵÀ£¬´¦ÔÚͬһÍøÂçÏ£¬·ñÔò½«ÎÞ·¨Õý³£×éÍøͨÐÅ¡£

3 ZigBeeÎÞÏß×éÍøÑо¿

3.1 LM3S9B96+CC2520Эµ÷Æ÷µÄ×éÍøÁ÷³Ì

CC2520Эµ÷Æ÷Èí¼þ³õʼ»¯µÄ»ù±¾Ë¼Â·ÊÇ£ºÏȶÔLM3S9B96ÓëCC2520¿ØÖƶ˿ڽøÐгõʼ»¯£»Ê¹ÄÜ´¥ÃþÆÁADCͨµÀ£¬Ê¹ÄÜUARTͨÐŶ˿ڣ¬Ê¹ÄÜSPI¿Ú£¬²¢Í¨¹ýSPI¿Ú°´ÕÕCC2520оƬµÄ²Ù×÷ʱÐò³õʼ»¯CC2520£»²Ù×÷ϵͳ³éÏó²ã¼ÓÔØЭÒéÕ»ÔËÐÐÈÎÎñ£¬²¢ÌṩÐÅÏ¢¹ÜÀí¡¢ÈÎÎñͬ²½¡¢Ê±ÎʹÜÀí¡¢ÖжϹÜÀí¡¢ÈÎÎñ¹ÜÀí¡¢ÄÚ´æ¹ÜÀí¡¢µçÔ´¹ÜÀíÒÔ¼°·ÇÒ×ʧ´æ´¢¹ÜÀíµÈ·þÎñ¡£¿ªÆôÎÞÏßÊÕ·¢»úºó£¬¾Í¿ÉÒÔÔËÐÐÈÎÎñ³ÌÐòµÈ´ýÊý¾ÝµÄÊÕ·¢¡£Ð­µ÷Æ÷É豸µÄ×éÍø³ÌÐòÁ÷³ÌÈçͼ4Ëùʾ¡£

3.2 LM3S9B96+CC2520ÓëCC2530×éÍøÑо¿

ZigBeeÓÐ×Å´ó¹æÄ£µÄ×éÍøÄÜÁ¦£¬Ã¿¸öÍøÂçÀíÂÛÉÏ×î´ó¿ÉÖ§³Ö65 535¸ö½Úµã£¬±¾Éè¼ÆÀûÓöà´ïÊ®¼¸¸ö½Úµã¹¹³ÉZigBeeƽ̨£¬Ñо¿·¢ÏÖLM3S9B96ÓëCC2530½øÐÐÎÞÏß×éÍø£¬±ØÐë¾ß±¸ÒÔϼ¸¸öÌõ¼þ¡£

(1)²ÉÓÃÏàͬµÄ±ê׼ЭÒéÕ»

ÒòÏàͬЭÒéÕ»×éÍøÎÕÊÖЭÒé¼°Á÷³ÌÒ»Ñù£¬Òª±£Ö¤ÍøÂçÖÐÐÅÏ¢´«Êä¹ý³ÌÒ»Ö£¬Ð­µ÷Æ÷¡¢Â·ÓÉÆ÷ºÍÖÕ¶ËÉ豸֮¼äÖ»ÓвÉÓÃÏàͬµÄЭÒéÕ»£¬²ÅÄÜʵÏÖ»¥²Ù×÷¡£ÔÚ×éÍøʵÑéÖУ¬Í³Ò»²ÉÓÃÁËZigBee 2007/PROЭÒéÕ»¡£

(2)PAN IDºÅºÍÐŵÀµÄÅäÖÃ

Эµ÷Æ÷ºÍ·ÓÉÆ÷¡¢ÖÕ¶ËÉ豸µÄPAN IDºÅ±ØÐë±£³ÖÒ»Ö£¬Ëù²ÉÓõÄÐŵÀÒ²±ØÐëÏàͬ¡£ÍøÂçÉ豸µÄPANIDºÅÓëZDAPP_CONFIG_PAN_IDºêÖµµÄÉèÖÃÓйأ¬ÈôÆäֵΪ0xFFFF£¬ÔòЭµ÷Æ÷½«²úÉúÒ»¸öËæ»úµÄPAN ID£¬¶ø·ÓÉÆ÷ºÍÖÕ¶ËÉ豸½«ÔÚ×Ô¼ºµÄÐŵÀÉÏËæ»úÑ¡ÔñÒ»¸öÍøÂç¼ÓÈ룬²¢ÒÔЭµ÷Æ÷µÄPAN ID×÷Ϊ×Ô¼ºµÄPAN ID£»ÈôÆäÖµ½éÓÚ0x3FFFFÓë0xFFFFÖ®¼ä£¬ÔòЭµ÷Æ÷½«¸ù¾Ý×Ô¼ºµÄIEEEµØÖ·Ëæ»ú²úÉúÒ»¸öPAN ID£¬¶ø·ÓÉÆ÷ºÍÖÕ¶ËÉ豸½«ÒÔZDAPP_CONFIG_PAN_IDµÄÖµ×÷ΪÆäPAN ID£»ÈôÆäֵСÓÚµÈÓÚ0x3FFFF£¬ÔòЭµ÷Æ÷¡¢Â·ÓÉÆ÷ºÍÖÕ¶ËÉ豸¾ù»áÒÔZDAPP_CONFIG_PAN_IDµÄÖµ×÷ΪÆäPAN ID¡£2.4 GHzµÄÉäƵƵ¶Î±»·ÖΪ0x0B¡«0x1A¹²16¸ö¶ÀÁ¢µÄÐŵÀ£¬ÔÚ×éÍø¹ý³ÌÖУ¬Ð­µ÷Æ÷¡¢Â·ÓÉÆ÷ºÍÖÕ¶ËÉ豸±ØÐë²ÉÓÃÏàͬµÄÐŵÀ¡£

(3)ÏàÓ¦µÄʼþ´¦Àí»úÖÆ

CC2530оƬ³õʼ»¯Íê±Ïºó£¬´¥·¢ZB_ENTRY_EVENTʼþÆô¶¯É豸£¬¸ÃʼþÔÚÓû§×Ô¶¨ÒåµÄʼþ´¦Àíº¯Êýzb_Handle()salEvent()Öб»´¦Àí£¬µ÷ÓÃzb_StartReqtaest()º¯ÊýÆô¶¯Â·ÓÉÆ÷»òÕßÖÕ¶ËÉ豸²¢¼ÓÈëLM3S9B96Эµ÷Æ÷½¨Á¢µÄÍøÂç¡£

¸Ãº¯ÊýÖ÷ÒªÓÃÀ´´¦Àí3¸öÍøÂçʼþ£º

¡ôZB_ENTRY_EVENT£¬¸ºÔðÆô¶¯É豸×齨»ò¼ÓÈëZigBeeÍøÂç¡£

¡ôMY_FIND_COLLECTOR_EVT£¬¸ºÔðCC2530·ÓÉÆ÷¡¢ÖÕ¶ËÉ豸ºÍLM359896Эµ÷Æ÷Ö®¼äµÄ°ó¶¨¡£

¡ôMY_REPORT_EVT£¬¸ºÔð¶¨Ê±Î¬»¤LM359896Эµ÷Æ÷ºÍCC2530·ÓÉÆ÷¡¢ÖÕ¶ËÉ豸֮¼äµÄ¸¸×Ó¹Øϵ¡£

É豸Æô¶¯Íê±Ïºó£¬×÷Ϊ·ÓÉÆ÷»òÖն˽ڵãµÄÉ豸½«×Ô¶¯µ÷Óûص÷º¯Êýzb_StartConfirm()È·ÈÏÉ豸ÊÇ·ñÆô¶¯³É¹¦£¬Í¬Ê±ÔÚº¯ÊýÄÚ²¿´¥·¢É豸°ó¶¨Ê¼þMY_FIND_COL_LECTOR_EVT¡£ÆäºËÐÄ´úÂëÈçÏ£º

CC2530·ÓÉÆ÷¡¢ÖÕ¶ËÉ豸ºÍLM359B96+CC2520Эµ÷Æ÷Íê³ÉÉ豸°ó¶¨ºó£¬»¹±ØÐ붨ʱ´¥·¢MY_REPORT_EVTʼþ£¬¸Ãʼþ¸ºÔðÿ¸ômyReportPer iodʱ¼ä(ĬÈÏΪ2s)ÏòLM359B96+CC2520Эµ÷Æ÷·¢Ë͸¸×Ó½Úµã°ó¶¨¹ØϵµÄÏûÏ¢ÒÔά»¤¸¸×Ó¹Øϵ£¬Æä·¢ËÍÏûÏ¢µÄ¹Ø¼üº¯ÊýΪzb_SendDataRequest()¡£

3.3 ZigBeeƽ̨ÉÏÖÇÄܲ´³µÒýµ¼ÏµÍ³Éè¼Æ

Õë¶ÔÄ¿Ç°´óÖÐÐÍÍ£³µ³¡ÖÐÆÕ±é´æÔÚµÄÍ£³µÄÑ¡¢ÊÕ·ÑÂé·³µÈÎÊÌ⣬ÔÚÒÔLM3S9B96+CC2520ΪЭµ÷Æ÷¡¢CC2530×÷ΪÖն˽ڵãµÄZigBeeÐÇ×´ÍøÂçµÄ»ù´¡ÉÏ£¬¹¹½¨ÁËÒ»¸öÐÂÐ͵ÄÍ£³µ³¡ÖÇÄܲ´³µÒýµ¼ÏµÍ³¡£¸Ãϵͳ²ÉÓÃN18-D80NK·´Éäʽ½Ó½ü¿ª¹Ø´«¸ÐÆ÷²É¼¯Ã¿¸ö³µÎ»µ±Ç°ÊÇ·ñ±»Õ¼ÓõÄ״̬ÐÅÏ¢£¬Í¨¹ýCC2530ÎÞÏß½ÚµãÄ£¿éÀûÓÃZigBee´«Êäµ½LM3S9B96Эµ÷Æ÷¡£LM3S9B96Эµ÷Æ÷¶ÔÐÅÏ¢»ã×ܺó½øÐгõ²½´¦Àí£¬ÒÔUDPͨÐŵÄÐÎʽÓëOMAP35 30ǶÈëʽÍø¹Ø½øÐоÖÓòÍøͨÐÅ£¬²¢ÔÚOMAP3530ǶÈëʽÍø¹ØµÄÏÔʾÆÁÉ϶Ե±Ç°ËùÓгµÎ»×´Ì¬½øÐÐͬ²½¸üв¢ÏÔʾ£¬ÒԱ㳵Ö÷Äܹ»Ö±¹ÛµØÑ¡Ôñ¿ÕÏгµÎ»¡£Í¬Ê±£¬»¹ÔÚÏÖÓеĻù´¡ÉϽ«OMAP3530µÄ´®¿ÚͨÐÅÓë¶ÌÐŲéѯģ¿é¼¯³ÉÔÚÒ»Æð£¬ÊµÏÖÁËÍ£³µ³¡¿ÕÏгµÎ»µÄ¶ÌÐŲéѯ¹¦ÄÜ¡£ÏµÍ³Ò²¿ÉÒÔÓÃLM3S9B96Эµ÷Æ÷ÉϵÄÍøÂç»òUSB¿Ú°Ñ²É¼¯µÄÐÅÏ¢Ö±½Ó´«Ë͸ø΢»ú½øÐÐͳ¼ÆºÍ¹ÜÀí¡£

½áÓï

LM3S9B96×÷Ϊ32λARM Cortex-M3΢´¦ÀíÆ÷£¬ÔÚÐÔÄÜ·½Ãæ¾ßÓд¦ÀíËٶȿ졢ÍâΧ½Ó¿Ú·á¸»µÈÓÅÊÆ£¬ËüÓëCC2520Ò»Æð×é³ÉµÄЭµ÷Æ÷ÔÚZigB eeÎÞÏß×éÍø·½ÃæÓÐ׏ãÀ«µÄ·¢Õ¹Ç°¾°¡£±¾ÎÄÔÚÁ˽âCC2530¡¢CC2520µÈÎÞÏßоƬµÄÔ­ÀíÓë¼¼ÊõµÄ»ù´¡ÉÏ£¬ÊµÏÖÁË»ùÓÚLM3S9B96+CC2520ΪЭµ÷Æ÷£¬CC2530Ϊ·ÓÉÆ÷»òÖÕ¶ËÉ豸µÄÎÞÏß×éÍø·½°¸¡£ÔÚZigBee¼¼ÊõѸÃÍ·¢Õ¹µÄ½ñÌ죬ÏàÐÅLM3S9B96+CC2520ƽ̨½«»áΪ½â¾öZigBee¼¼ÊõÔÚʵ¼ÊÓ¦ÓÃÖеÄÎÊÌâ´øÀ´¸ü´óµÄ×ÔÓɶȺÍÑ¡ÔñÐÔ¡£

×÷ÕߣºËï¾ê ÂíÖÒ÷ Áõ¼Ñΰ ¶­·« À´Ô´£ºµ¥Æ¬»úÓëǶÈëʽϵͳ

ÎÒÍƼö´ó¼Ò¶Á

ÇáËɲÎÓë

VS

±í´ïÁ¢³¡

ÕâÊÇÀ¬»øÎÄÕÂ


΢ÐÅɨÃè·ÖÏí±¾Îĵ½ÅóÓÑȦ
ɨÂë¹Ø×¢5GͨÐŹٷ½¹«ÖÚºÅ,Ãâ·ÑÁìÈ¡ÒÔÏÂ5G¾«Æ·×ÊÁÏ
  • 1¡¢»Ø¸´¡°YD5GAI¡±Ãâ·ÑÁìÈ¡¡¶ÖйúÒƶ¯£º5GÍøÂçAIÓ¦ÓõäÐͳ¡¾°¼¼Êõ½â¾ö·½°¸°×ƤÊé¡·
  • 2¡¢»Ø¸´¡°5G6G¡±Ãâ·ÑÁìÈ¡¡¶5G_6GºÁÃײ¨²âÊÔ¼¼Êõ°×ƤÊé-2022_03-21¡·
  • 3¡¢»Ø¸´¡°YD6G¡±Ãâ·ÑÁìÈ¡¡¶ÖйúÒƶ¯£º6GÖÁ¼òÎÞÏß½ÓÈëÍø°×ƤÊé¡·
  • 4¡¢»Ø¸´¡°LTBPS¡±Ãâ·ÑÁìÈ¡¡¶¡¶ÖйúÁªÍ¨5GÖն˰×ƤÊé¡·¡·
  • 5¡¢»Ø¸´¡°ZGDX¡±Ãâ·ÑÁìÈ¡¡¶ÖйúµçÐÅ5GNTN¼¼Êõ°×ƤÊé¡·
  • 6¡¢»Ø¸´¡°TXSB¡±Ãâ·ÑÁìÈ¡¡¶Í¨ÐÅÉ豸°²×°¹¤³ÌÊ©¹¤¹¤ÒÕͼ½â¡·
  • 7¡¢»Ø¸´¡°YDSL¡±Ãâ·ÑÁìÈ¡¡¶ÖйúÒƶ¯ËãÁ¦²¢Íø°×ƤÊé¡·
  • 8¡¢»Ø¸´¡°5GX3¡±Ãâ·ÑÁìÈ¡¡¶R1623501-g605GµÄϵͳ¼Ü¹¹1¡·
  • ±¾ÖÜÈȵ㱾ÔÂÈȵã

     

      ×îÈÈͨÐÅÕÐƸ

    Òµ½ç×îÐÂ×ÊѶ


      ×îÐÂÕÐƸÐÅÏ¢

    ×îм¼ÊõÎÄÕÂ

    ×îÐÂÂÛ̳Ìù×Ó