久久久久久久999_99精品久久精品一区二区爱城_成人欧美一区二区三区在线播放_国产精品日本一区二区不卡视频_国产午夜视频_欧美精品在线观看免费

 找回密碼
 立即注冊(cè)

QQ登錄

只需一步,快速開始

搜索
查看: 7708|回復(fù): 5
打印 上一主題 下一主題
收起左側(cè)

TPS62260LED-338 EVM數(shù)字可尋址照明接口(DALI)設(shè)計(jì) 電路原理圖+msp430程序

  [復(fù)制鏈接]
跳轉(zhuǎn)到指定樓層
樓主
實(shí)物圖:



描述

數(shù)字可尋址照明接口 (DALI) 標(biāo)準(zhǔn)定義了用于照明控制應(yīng)用中的通用通信協(xié)議和物理接口標(biāo)準(zhǔn)。該設(shè)計(jì)采用現(xiàn)有的 TPS62260LED-338 EVM 和電平轉(zhuǎn)換電路板以實(shí)施 DALI LED 器件類型控制機(jī)構(gòu)。在 TPS62260LED-338 EVM 上找到的微控制器為 MSP430F2131。MSP430F2131 負(fù)責(zé)執(zhí)行與 CPU 間的通信,而計(jì)時(shí)器資源主要用于控制淡出率和 LED 亮度。DALI 在 IEC 60929 中有具體的定義,并已在 IEC 62386 中進(jìn)行了更新。包含 LED 器件類型是進(jìn)行此更新的主要原因之一。

特性

    使用板載 MSP430 計(jì)時(shí)器實(shí)施 DALI 協(xié)議
    提供用于 MSP430 的 DALI 接口的 PHY 設(shè)計(jì)
    與 TPS62260LED-338 EVM 配合使用
    還提供 MSP430 G2 Launchpad 支持
    該參考設(shè)計(jì)已經(jīng)過測(cè)試,并包含軟件、硬件設(shè)計(jì)gerber文件和相關(guān)的設(shè)計(jì)資料;

電路原理圖:




BOM:
[size=15.7537px]BOM
[size=15.7537px]Digital Addressable Lighting Interface (DALI)
[size=15.7537px]Bill of Materials
[size=15.7537px]X1      851-93-006-20-001000    Mill-Max
[size=15.7537px]IC1     SN74AC14DR              Texas Instruments
[size=15.7537px]R1      10K Ohm resistor +/-5%
[size=15.7537px]R2      10K Ohm resistor +/-5%
[size=15.7537px]R3      200 ohm resistor +/-5%
[size=15.7537px]OK1     SFH6156-1T              Vishay/Semiconductors
[size=15.7537px]K1      ASSR-1410-003E          Avago Technologies
[size=15.7537px]X2      1935226                 Phoenix Contact
[size=15.7537px]X3      1935226                 Phoenix Contact

部分程序:
  1. /******************************************************************************/
  2. // DALI RGB-LED Demo using MSP430F2131 and TPS62260 from Texas Instruments
  3. // The MSP430F2131 IO does not support the DALI logic levels and a level
  4. // translation circuit is required.
  5. //
  6. // LED PWM Description:
  7. // 8Mhz clock with a period of 5000 counts results in a frequency of 1.6Khz.
  8. // Minimum Physical Level setting for the TPS62260 EVM is 90
  9. //
  10. // DALI:
  11. // TI_DALI_Init()
  12. // This function restores the previous DALI settings stored in information
  13. // memory and intializes the WDT+, RAM varaibles, and GPIO.  The WDT+ is used
  14. // to update the actual_level based upon the DALI fade_rate or fade_time.
  15. //
  16. // TI_DALI_Transaction_Loop()
  17. // This function continually receives, decodes, and then acts upon DALI
  18. // commands.
  19. //
  20. // TI_DALI_Update_Callback()
  21. // The LED source continues without CPU intervention until the source needs
  22. // to be updated. In this case the source is the TIMER_A3, outputs A1 and A2.
  23. //
  24. // TI_DALI_Idle_Callback()
  25. // The time between two transactions (forward-forward or forward-backward)
  26. // is limited in the standard to 9.17ms.  After the CPU has processed the
  27. // recevied information this leaves only about 7ms to do other processes
  28. // before the CPU must receive or transmit the next DALI transaction.
  29. //
  30. // TI_DALI_Flash_Update(FWKEY)
  31. // This takes all of the non-voltaile variables defined in the standard and
  32. // writes them into a free portion of one of the info memory segments.
  33. // This function is intended to be called only once before or during a power
  34. // loss event.  The write cycles takes approximately 2.5ms and Vcc must be
  35. // greater than 2.2V during the write.
  36. //
  37. // Chris Sterzik
  38. // Texas Instruments
  39. // Built with CCS Version: 5.20
  40. //
  41. // Revision 1.1    09/17/2012
  42. /******************************************************************************/

  43. // THIS PROGRAM IS PROVIDED "AS IS". TI MAKES NO WARRANTIES OR
  44. // REPRESENTATIONS, EITHER EXPRESS, IMPLIED OR STATUTORY,
  45. // INCLUDING ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS
  46. // FOR A PARTICULAR PURPOSE, LACK OF VIRUSES, ACCURACY OR
  47. // COMPLETENESS OF RESPONSES, RESULTS AND LACK OF NEGLIGENCE.
  48. // TI DISCLAIMS ANY WARRANTY OF TITLE, QUIET ENJOYMENT, QUIET
  49. // POSSESSION, AND NON-INFRINGEMENT OF ANY THIRD PARTY
  50. // INTELLECTUAL PROPERTY RIGHTS WITH REGARD TO THE PROGRAM OR
  51. // YOUR USE OF THE PROGRAM.
  52. //
  53. // IN NO EVENT SHALL TI BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
  54. // CONSEQUENTIAL OR INDIRECT DAMAGES, HOWEVER CAUSED, ON ANY
  55. // THEORY OF LIABILITY AND WHETHER OR NOT TI HAS BEEN ADVISED
  56. // OF THE POSSIBILITY OF SUCH DAMAGES, ARISING IN ANY WAY OUT
  57. // OF THIS AGREEMENT, THE PROGRAM, OR YOUR USE OF THE PROGRAM.
  58. // EXCLUDED DAMAGES INCLUDE, BUT ARE NOT LIMITED TO, COST OF
  59. // REMOVAL OR REINSTALLATION, COMPUTER TIME, LABOR COSTS, LOSS
  60. // OF GOODWILL, LOSS OF PROFITS, LOSS OF SAVINGS, OR LOSS OF
  61. // USE OR INTERRUPTION OF BUSINESS. IN NO EVENT WILL TI'S
  62. // AGGREGATE LIABILITY UNDER THIS AGREEMENT OR ARISING OUT OF
  63. // YOUR USE OF THE PROGRAM EXCEED FIVE HUNDRED DOLLARS
  64. // (U.S.$500).
  65. //
  66. // Unless otherwise stated, the Program written and copyrighted
  67. // by Texas Instruments is distributed as "freeware".  You may,
  68. // only under TI's copyright in the Program, use and modify the
  69. // Program without any charge or restriction.  You may
  70. // distribute to third parties, provided that you transfer a
  71. // copy of this license to the third party and the third party
  72. // agrees to these terms by its first use of the Program. You
  73. // must reproduce the copyright notice and any other legend of
  74. // ownership on each copy or partial copy, of the Program.
  75. //
  76. // You acknowledge and agree that the Program contains
  77. // copyrighted material, trade secrets and other TI proprietary
  78. // information and is protected by copyright laws,
  79. // international copyright treaties, and trade secret laws, as
  80. // well as other intellectual property laws.  To protect TI's
  81. // rights in the Program, you agree not to decompile, reverse
  82. // engineer, disassemble or otherwise translate any object code
  83. // versions of the Program to a human-readable form.  You agree
  84. // that in no event will you alter, remove or destroy any
  85. // copyright notice included in the Program.  TI reserves all
  86. // rights not specifically granted under this license. Except
  87. // as specifically provided herein, nothing in this agreement
  88. // shall be construed as conferring by implication, estoppel,
  89. // or otherwise, upon you, any license or other right under any
  90. // TI patents, copyrights or trade secrets.
  91. /******************************************************************************/
  92. #include "dali_demo_hw.h"
  93. #include "dali.h"

  94. void Update_Callback(void);
  95. void DALI_Idle_Callback(void);

  96. /*********************LED Pointer Table ***************************************/
  97. const unsigned int LED[255]={0,5,5,5,5,6,6,6,6,6,6,7,7,7,7,7,7,8,8,8,8,9,9,9,9,
  98. 10,10,10,10,11,11,11,12,12,12,13,13,13,14,14,14,15,15,16,16,17,17,17,18,18,19,
  99. 20,20,21,21,22,22,23,24,24,25,26,26,27,28,29,29,30,31,32,33,34,35,36,37,38,39,
  100. 40,41,42,43,44,46,47,48,49,51,52,54,55,57,58,60,61,63,65,67,69,70,72,74,76,79,
  101. 81,83,85,88,90,93,95,98,100,103,106,109,112,115,118,122,125,128,132,136,139,
  102. 143,147,151,156,160,164,169,173,178,183,188,193,199,204,210,216,222,228,234,
  103. 241,247,254,261,269,276,284,291,300,308,316,325,334,343,353,363,373,383,394,
  104. 404,416,427,439,451,464,476,490,503,517,531,546,561,577,593,609,626,643,661,
  105. 679,698,718,737,758,779,800,823,845,869,893,917,943,969,996,1023,1052,1081,
  106. 1111,1141,1173,1205,1239,1273,1308,1345,1382,1420,1459,1500,1541,1584,1628,
  107. 1673,1719,1767,1816,1866,1918,1971,2025,2081,2139,2198,2259,2321,2386,2452,
  108. 2519,2589,2661,2735,2810,2888,2968,3050,3135,3221,3311,3402,3496,3593,3693,
  109. 3795,3900,4008,4119,4233,4350,4470,4594,4721,4852,4986
  110. }; //LED
  111. /******************************************************************************/

  112. static void Timer_Init(void);
  113. static void Clock_Init(void);

  114. // Main Program
  115. void main(void)
  116. {
  117.   unsigned int temp_flash_key;
  118.   WDTCTL=WDTPW+WDTHOLD;      // disable Watchdog

  119.   Clock_Init();
  120.   GPIO_INIT();  // GPIO Initialization
  121.   Timer_Init(); // Timer Initialization

  122.   temp_flash_key = FWKEY;         //
  123.   TI_DALI_Init(temp_flash_key);   // Initialize WDT for DALI fade implementation
  124.   temp_flash_key = 0;

  125.   TAxCTL |= MC_1;  // start Timer_A (up mode)
  126.   __enable_interrupt(); // enable maskable interrupts

  127.   TI_DALI_Transaction_Loop();
  128.   /* should never return */
  129.   while(1);
  130. } //End Main

  131. static void Clock_Init(void)
  132. {
  133.     DCOCTL = 0;
  134.     BCSCTL1= CALBC1_8MHZ;      // System Clock Settings
  135.     DCOCTL = CALDCO_8MHZ;      // use calibrated 8MHz settings
  136.                                // This should be coordinated with the dali.h file
  137. }

  138. static void Timer_Init(void)
  139. {
  140.     /*** PWM Timer Initialization ***********************************************/
  141.      TPS62260_ENABLE_PxOUT &= ~TPS62260_ENABLE_BIT;           // Turn off LEDs
  142.      TAxCTL = TASSEL_2+ID_0+MC_0+TACLR;   // Timer clock = SMCLK = 8MHz
  143.      TAxCCR0=5000;    // Define 1.6Khz frequency
  144.      TAxCCR1=LED[power_on_level];         // This power level will be overwritten
  145.      TAxCCR2=LED[power_on_level];         // by the reception of a power command
  146.                                          // within 0.6 seconds.  After this time
  147.                                          // the device will automatically go to
  148.                                          // the power on level if no command is
  149.                                          // received.
  150.      TAxCCTL1 = CM_0+CCIS_2+OUTMOD_3;     // ReSet on TACCRx, set on TACCR0
  151.      TAxCCTL2 = CM_0+CCIS_2+OUTMOD_3;
  152.      /****************************************************************************/
  153. }

  154. void TI_DALI_Update_Callback()
  155. {
  156.   TAxCCTL1 |= CCIE;
  157. }

  158. void TI_DALI_Idle_Callback(void)
  159. {
  160.   __no_operation();
  161. }

  162. /******************************************************************************/
  163. // Timer_A Interrupt Service Routine:
  164. /******************************************************************************/
  165. #pragma vector=TIMER_VECTOR
  166. __interrupt void ISR_TimerA(void)
  167. {
  168.   if(actual_level==OFF)
  169.   {
  170.       /* turn off LEDs */
  171.       TPS62260_ENABLE_PxOUT &= ~TPS62260_ENABLE_BIT;
  172.       TAxCCR1 = 0x00;
  173.       TAxCCR2 = 0x00;
  174.   }
  175.   else
  176.   {
  177.           //--- PWM signal generation
  178.       TPS62260_ENABLE_PxOUT|= TPS62260_ENABLE_BIT;
  179.       TAxCCR1=LED[actual_level]; //
  180.       TAxCCR2=LED[actual_level]; //
  181.   }
  182.   TAxCCTL1 &= ~CCIE;
  183. }

  184. /******************************************************************************/
  185. // Power loss event, save settings
  186. /******************************************************************************/
  187. //  if(flash_update_request)
  188. //  {
  189. //    TI_DALI_Flash_Update(FWKEY);
  190. //    WDTCTL = 0x05;  // illegal write to watch dog causes reset
  191. //  }


  192. #pragma vector=DUMMY_VECTORS
  193. __interrupt void ISR_Dummy(void)
  194. {
  195.     while(1)
  196.     {
  197.     }
  198. }
復(fù)制代碼



全部資料(壓縮包)下載:


軟件代碼.zip

48.67 KB, 下載次數(shù): 33, 下載積分: 黑幣 -5

物料清單 (BOM).pdf

16.7 KB, 下載次數(shù): 22, 下載積分: 黑幣 -5

相關(guān)設(shè)計(jì)參考資料.zip

4.45 MB, 下載次數(shù): 29, 下載積分: 黑幣 -5

硬件設(shè)計(jì)gerber文件.zip

13.98 KB, 下載次數(shù): 24, 下載積分: 黑幣 -5

評(píng)分

參與人數(shù) 1黑幣 +5 收起 理由
zhs + 5 共享資料的黑幣獎(jiǎng)勵(lì)!

查看全部評(píng)分

分享到:  QQ好友和群QQ好友和群 QQ空間QQ空間 騰訊微博騰訊微博 騰訊朋友騰訊朋友
收藏收藏3 分享淘帖 頂 踩
回復(fù)

使用道具 舉報(bào)

沙發(fā)
ID:111490 發(fā)表于 2017-11-9 16:50 | 只看該作者
學(xué)習(xí)!!!!
回復(fù)

使用道具 舉報(bào)

板凳
ID:170509 發(fā)表于 2018-8-3 16:40 | 只看該作者
學(xué)習(xí)這個(gè)不錯(cuò)。最近剛好要用到。
回復(fù)

使用道具 舉報(bào)

地板
ID:27027 發(fā)表于 2019-1-4 08:26 | 只看該作者
主要用途在哪里
尋址照明控制,可以復(fù)聯(lián)多少
回復(fù)

使用道具 舉報(bào)

5#
ID:464689 發(fā)表于 2019-1-8 16:13 來(lái)自手機(jī) | 只看該作者
不錯(cuò)俄
回復(fù)

使用道具 舉報(bào)

6#
ID:25310 發(fā)表于 2019-3-1 11:41 | 只看該作者
不錯(cuò)。這個(gè)可以有。
回復(fù)

使用道具 舉報(bào)

本版積分規(guī)則

手機(jī)版|小黑屋|51黑電子論壇 |51黑電子論壇6群 QQ 管理員QQ:125739409;技術(shù)交流QQ群281945664

Powered by 單片機(jī)教程網(wǎng)

快速回復(fù) 返回頂部 返回列表
主站蜘蛛池模板: 欧美视频成人 | 精品国产一区二区久久 | 一区二区三区福利视频 | 欧美中文字幕在线观看 | 欧美一区二区三区小说 | 成人妇女免费播放久久久 | 黄免费看 | 亚洲精品一区二区冲田杏梨 | 国产一区二区 | 久久久久99 | 一区二区日韩精品 | 国产精品色 | 91精品国产欧美一区二区成人 | 在线免费91 | 欧美性jizz18性欧美 | 视频一区二区三区中文字幕 | 久久久久久久久国产精品 | 伊人超碰 | 亚洲精品乱 | 亚洲视频区 | 91在线精品秘密一区二区 | 成人黄色电影免费 | 一级片免费网站 | 久久久综合网 | 久久91av| 中文字幕在线观看一区二区 | 综合久久综合久久 | 欧美色综合网 | 日韩在线综合网 | 在线中文视频 | 色黄网站 | www国产成人 | 一区二区在线免费观看 | 日韩欧美精品在线 | 成人不卡 | 中文字幕精品一区二区三区精品 | 国产在线精品一区二区 | 国产精品美女久久久久aⅴ国产馆 | 午夜在线精品 | 国产一区二区三区高清 | 欧美啪啪网站 |