Home

XC800 Family DALI Control Gear Software Stack

image

Contents

1. AP08102 Appendix 10 2 DALI Variables List of variables defined in the DALI standard are shown in Table 12 Table 12 Declaration of DALI Variables Variables Default values Reset Values Range of Validity Memory Actual level Power On level 254 0 min to max 1 Byte RAM Power On Level 254 254 0 to 255 1 Byte Flash System Failure Level 254 254 0 to 255 1 Byte Flash Minimum Level Physical min Physical min Physical min to max 1 Byte Flash Maximum Level 254 254 MIN to 254 1 Byte Flash Fade Rate 7 7 1 to 15 1 Byte Flash Fade Time 0 0 0 to 15 1 Byte Flash Short Address 255 no change 0 to 63 255 1 Byte Flash Search Address FF FF FFh FF FF FFh 00 00 00h to FF FF FFh 3 Bytes RAM Group 0 7 0000 0000b 0000 0000b 0 to 255 1 Byte Flash Group 8 15 0000 0000b 0000 0000b 0 to 255 1 Byte Flash Scene 0 255 255 0 to 255 1 Byte Flash Scene 1 255 255 0 to 255 1 Byte Flash Scene 2 255 255 0 to 255 1 Byte Flash Scene 3 255 255 0 to 255 1 Byte Flash Scene 4 255 255 0 to 255 1 Byte Flash Scene 5 255 255 0 to 255 1 Byte Flash Scene 6 255 255 0 to 255 1 Byte Flash Scene 7 255 255 0 to 255 1 Byte Flash Scene 8 255 255 0 to 255 1 Byte Flash Scene 9 255 255 0 to 255 1 Byte Flash Scene 10 255 255 0 to 255 1 Byte Flash Scene 11 255 255 0 to 255 1 Byte Flash Scene 12 255 255 0 to 255 1 Byte Flash Scene 13 255 255 0 to 255 1 Byte Flash Scene 14 255 255 0 to 255 1
2. DALI Slave Software S Main LED Control a 9 a 3 4 lt i a LED controls LED status X Y Program DALI variables to Flash 0 s DALI Commands Handler ar ti Timer 0 o A DALI address and DALI command DALI response v o o DALI Protocol haj Read DALI A A variables Une re Edge detected ne hae y e X BootROM user routine Y f f os Timer0 E Reload Interrupt Programming Erasing CCU6 S lt 16 bit Timer2 lt timer T2EX aro GPIO zo ADC Do 5 A G 15 Flash A E P1 0 P0 5 x y y DALI DALI LED RX TX Driver Figure 7 Software Structure for the XC83x 3 2 Hardware Abstraction Layer Configuration The config h file stores the configuration of the GPIO and timers The file can be modified according to the application requirements 3 2 1 GPIO Module The default GPIO settings for DALI receive and transmit are P1 0 and P0 5 respectively For the DALI receive T2EX Timer 2 External pin must be mapped to these pins Depending on the application and package used the GPIO for DALI interface can be re configured to other port pins Refer to Table 1 for the GPIO pins that have T2EX as input function and can be used for DALI receive Application Note 8 V1 3 2012 10 DALI Control Gear Software Stack Infineon poets DALI Control Gear Software Stack Table 1 DALI Receive GPIO pin selection Package GPIO can be used for DALI
3. Table 11 List of source files Files Description Start xc a51 Start up code for XC82x device This is part of the compiler package Main c Main loop and user application code to control the LED Refer to Figure 18 DALI main c DALI Software Stack main function loop refer to Figure 19 DALI c DALI software module initialisation and DALI command handling DALI API c Contains all the API routines described in Chapter 4 T01 c Timer 0 module initialisation and 1 msec interrupt service routine T2 Timer 2 module initialisation and the interrupt service routine that decode or encode the DALI frame lO c GPIO module initialisation CC6 c CCU6 module initialisation ADC c Setup channel 4 for power loss detection DALI_para c Defined the DALI parameter contents DALI_memory_bank0 c Defined the memory bank 0 contents DALI Flash Sect default c Defined the memory bank 1 contents config h Configuration of GPIO and definitions of timer overflow periods used in timer0 and timer2 modules 6 7 Schematic The schematic for the DALI DMX512 board is shown in Figure 16 and Figure 17 Application Note 19 V1 3 2012 10 DALI Control Gear Software Stack Infineon AP08102 Preparing Software Stack for LED Application DMX512_PHY 22 05 7038 03 Ji 1 e ae gt gt gt B B A gt 2 ee gt gt 3 amp n o 0 T resistance p n by 0 Developer must
4. Figure 12 Overview of hardware setup Connect to 5V supply VCC GND Programming Connector VCC GND SPD M F y On board Connect to DALI BUS Figure 13 Board Connections Application Note 15 V1 3 2012 10 Infineon DALI Control Gear Software Stack AP08102 Preparing Software Stack for LED Application Table 8 shows the XC836 MCU pins usage in this LED example Table 8 XC836 MCU Pins Assignment Pin Number Port Pin Pin Functionality 1 P2 7 Reserved for DMX512 2 P2 6 3 P2 5 4 P2 4 Power loss detection 5 P2 3 Reserved for DMX512 6 P2 2 Reserved for DMX512 7 P2 1 Reserved for DMX512 8 P2 0 Reserved for DMX512 9 P0 6 Reserved for DMX512 10 P0 5 DALI Transmit 11 P0 4 DALI Receive 12 Vopp I O Port Supply 13 P1 3 CC61 LED Driver 14 P1 2 a 15 P1 1 CC60 LED Driver 16 P1 0 17 Vssp Vssc 1 O Port Ground Core Supply Ground 18 Vope Core Supply Output 19 P1 4 20 P1 5 CC62 LED Driver 21 P0 0 22 PO 1 23 P0 2 E 24 P0 3 25 P3 0 XTAL 26 P3 1 XTAL 27 P3 2 SPD 18 P0 7 6 2 Downloading LED Example Code Using DAP miniWiggler With the DAP miniWiggler user can download the example code to the board by setting up the 3 pins as shown in Figure 14 through XC800 FLOAD in DAVEBENCH or KEIL UVision4 Application Note 16 V1 3 2012 10 DALI Control Gear
5. LightNET DALI configuration SW for groups and scenes Power Supply Easy Kit as DALI Master Board USB UART XC83x DALI Slave Board XC83x SW Stack DALI PHY XC83x DALI Slave Board XC83x SW Stack DALI PHY DALI BUS PC Connector XC83x DYAN SW Stack PHY Figure 2 Block Diagram for DALI Control Device and Control Gear This document describes the DALI Software Stack for Control Gear solution created to provide an application example for LED control This solution is based on the published IEC standard and is implemented with the Infineon XC83x microcontroller The following items are required for use with this application note e DALI DMX512 board order number KIT DALI RGB XC836 DKV1 Figure3 XC836 DALI DMX512 Board Other application notes of interest are e AP08104 Guide to using DALI LightNet tool e AP08105 DALI Demo using Touch Sense Control Application Note 6 V1 3 2012 10 DALI Control Gear Software Stack Infineon pees DALI Protocol 2 DALI Protocol DALI uses the Manchester encoded unidirectional serial protocol with a transmission rate of 1200bps 10 T E LOGICAL 1 LOGICAL 0 Figure 4 Bi phase levels Logical 1 Logical 0 2 1 Receiving DALI Forward Frame Forward frame is the command frame received from the DALI master It consists of 19 bits START BIT STOP BI
6. 4 usec Flash programming not done 4 3 Status of Lighting Device If the lighting device is faulty or disconnected this routine is to be called Table 6 Status of Lamp LED Routine LIGHT status Inputs 0 Lighting Device OK 1 Lighting Device faulty or disconnected Return 4 4 Light On This routine will set bit 2 of the DALI status byte indicating that the lighting device is powered on The user application needs to call this routine after the pre heating and ignition process of the lighting device are complete Application Note 13 V1 3 2012 10 DALI Control Gear Software Stack Infineon AP08102 Conditional Compilation Option Table 7 Light On Routine LIGHT on Inputs Return 5 Conditional Compilation Option Four conditional compilation preprocessor functions are defined e XC83X_8K Flash size is 8Kbytes and the Memory banks are in upper 4K e SPECIAL_MODE_EN DALI special commands commands 258 to 270 are supported MEMORY_BANK_EN Read Memory Map access commands supported commands 197 273 274 WRITE_MEMORY_EN Write to Memory Map commands supported commands 275 This option is not supported in 4K flash device Options for Target XC83X 8K Mem access Device Target Output Listing User C51 AX51 LX51 Locate LX51 Misc Debug Utities Preprocessor Symbols o lt Define SPECIAL MODE EN MEMORY BANK EN XC83X
7. Byte Flash Scene 15 255 255 0 to 255 1 Bytes Flash Status 1XX0 XXXXb 0X10 OXXXb 0 to 255 1 Byte RAM DTR undefined no change 0 to 255 1 Byte RAM DTR1 undefined no change 0 to 255 1 Byte RAM DTR2 undefined no change 0 to 255 1 Byte RAM Application Note 24 V1 3 2012 10
8. Forward Frame 2 A EE AAR Aa 7 Sending Backward Frame lt teen eee 7 DALI Control Gear Software Stack 000 ccc tenes 8 SoftWare SITUCIUTS s iia ad Yea kad Ob le eae Oe 8 Hardware Abstraction Layer Configuration lt 4 4444 44444 eee 8 GPIO Module ici aa alate in a Oe ea ie Bite ea a iw a N dv ew da daa wl ps dod he 8 GPIO Initialisation 2 0 eee nents 9 Timer O and Timer 2 Modules 2 0 0000 tee 9 MEEO ck zao ate R dasa seins Gk dae V eee Gage Fie EA aa Aw woe Gaga ees 9 VUNG Ls air oo ee ee CA Rae c R RN OO EEE dG eee a a Bees aes 9 DALI Protocol Module 0 00 cee eee 10 DALI Commands Handler Module 0 0000 een teens 10 Process Command ii hdc ae ee eee PA a ae ae Pe ol 10 Fading Control ici jist dita awe bbe eed dene era ed dees 11 DAL Vanablesiow wie So s Aiea SEP VB eRe ie 4 Pee eR Mend eee A 11 Memory Banks erronee panded a eee a old ne ada Pi R ok E oo 12 API ROUUNGS 2 5 ches ce bee eae abe wba dha Mebane eee rete AB R ob o da sd 13 Are Power Level iio da pok ae ame Cada Rk a e ae RRA RES eee CRS 13 Program DALI Variables 1 53 k veda vee deed ede dae deel be debe eae 13 Status of Lighting Device 0 tees 13 Light ON estricta he he eh eee pd dad 13 Conditional Compilation Option aaaea 14 Preparing Software Stack for LED Application lt 15 Hardware Setup o 15 Downloading LED Example Code Using DAP miniWi
9. RX TSSOP 28 P0 4 P0 6 P1 0 P2 0 P2 7 P3 2 DSO 24 P0 4 P0 6 P1 0 P2 0 P3 2 DSO 20 P0 4 P0 6 P1 0 P2 0 TSSOP 16 P0 4 P0 6 P1 0 P2 0 1 P3 2 cannot be used as DALI Receive pin if the boot mode is set to USER DIAGNOSTIC Default settings 1 DALI Transmit is on P0 5 define DALI_TX_PIN PO 5 define READ DALI TX PIN PO 5 2 DALI Receive is on P1 0 define DALI RX DATAIN P1 DATAIN define READ DALI RX PIN AGC bo define T2EX SEL 0x02 3 2 1 1 GPIO Initialisation GPIO settings for the DALI Transmit and Receive pains Table 2 GPIO Settings Port Function Port Direction Mode Pull up DALI Transmit PO 5 Out Push pull Enabled DALI Receive P1 0 In Open Drain Disabled 3 2 2 Timer 0 and Timer 2 Modules The default settings for Timer O and Timer 2 are based on Fao 24MHZ If a different peripheral clock frequency is selected the settings for Timer 0 and Timer 2 have to be changed accordingly 3 2 2 1 Timer 0 The Timer 0 serves as a 1 msec tick The main loop is run every 1 msec see Figure 18 The Interrupt Service Routine carries out the timing countdown reguired in the Software Stack Default settings Timer 0 0xD120 1 msec tick 3 2 2 2 Timer 2 The Manchester encoding and decoding of the DALI frame is performed in the DALI Software Stack with the use of the Timer 2 module The Timer 2 external pin T2EX is connected to the DALI RX to detect the falling rising edge of th
10. Software Stack Infineon AP08102 Preparing Software Stack for LED Application Connections for programming the DALI Power Conn A I DAP MINIWI LER Connector X3 5V Supply Control Gear using a GG 1 gt X3 VCC GND VCC GND Programming Pin 3 2 Connector X2 gt PC KIT_DALI_RGB_XC836_DKV1 KIT_DAP_MINIWIGGLER_USB a KIT DAP MINWIGGLER USB KIT DALI RGB XC836 DKV1 Figure 14 Programming the board using DAP miniWiggler 6 3 Hardware Abstraction Layer In the configuration file CONFIG H there are changes to the Timer 2 configuration as shown in Table 9 Table 9 Configuration of GPIO and Timers in CONFIG H Module Description Changes Timer O Timer 0 overflow timing No change Timer 2 Timer 2 overflow timing No change Define wakeup from power define lt SPACE gt PWR_DOWN_WAKEUP_TIME lt SPACE gt 0x0960 down mode timing GPIO Define DALI transmit and DALI receive pin is changed from P1 0 to P0 4 DALI receive pins define lt SPACE gt DALI_RX_DATAIN lt SPACE gt PO DATAIN define lt SPACE gt READ_DALI_RX_PIN lt SPACE gt ACC_b4 P0 4 define lt SPACE gt T2EX_SEL lt SPACE gt 0x01 T2EX_1 at P0 4 Application Note 17 V1 3 2012 10 DALI Control Gear Software Stack Infineon AP08102 Preparing Software Stack for LED Application 6 4 Application Layer In this LED example code the following feature is
11. a failure of such components can reasonably be expected to cause the failure of that life support device or system or to affect the safety or effectiveness of that device or system Life support devices or systems are intended to be implanted in the human body or to support and or maintain and sustain and or protect human life If they fail it is reasonable to assume that the health of the user or other persons may be endangered oe DALI Control Gear Software Stack Infineon AP08102 XC82x XC83x Revision History V1 3 2012 10 Previous Version s V1 2 2012 03 Page Subjects major changes since last revision E Updated DALI Control Gear Schematic Part 1 Changed R5 from 1K to 560R Trademarks We Listen to Your Comments Is there any information in this document that you feel is wrong unclear or missing Your feedback will help us to continuously improve the quality of this document Please send your proposal including a reference to this document to mcdocu comments infineon com EL Application Note 3 V1 3 2012 10 DALI Control Gear Software Stack Infineon poets Table of Contents Table of Contents 2 1 2 2 3 1 3 2 3 2 1 3 2 1 1 3 2 2 3 2 2 1 3 2 2 2 3 3 3 4 3 4 1 3 4 2 3 4 3 3 4 4 4 1 4 2 4 3 4 4 6 1 6 2 6 3 6 4 6 5 6 6 6 7 10 10 1 10 2 OVBIVIOW iacaat a dos ss belie ta eee Dee ee 5 DALI Protocol iv 502603 eee lee a R da ba ee de ti eee 7 Receiving DALI
12. added e Programming of the DALI variables is triggered when ADC channel 4 P2 4 goes below 2V This act as a power loss detection The PROGRAM DALI variables routine is called to program the DALI variables into the flash 3 12 1 e VCC GND SPD KIT DALI RGB XC836 DKV1 DALI Parameters Programming During power up TP4 should not be connected DALI Control Gear To simulate a power loss eveni connect KIT DALI RGB XC836 DKV1 TP4 to GND Figure 15 Simulate Power Loss Event by connecting TP4 to GND 6 5 Compiler Options and Linker Address Allocation For this LED example code the compiler options XC83X 8K SPECIAL MODE EN MEMORY BANK EN and WRITE MEMORY EN are enabled The address allocation for the DALI variables are defined in the linker file as shown in Table 10 Table 10 Address Allocation in the Linker Segments Description Address DALI PARA DALI variables reset values 0x1DE0 to 0x1DFF DALI MEMORY BANKO Memory Bank 0 0x1E00 to Ox1EFF DALI FLASH SECT DEFAULT Flash Emulated EEPROM 0x1F00 to Ox1FFF DALI variables default values 0x1F01 to Ox1F1C Memory Bank 1 default values 0x1F20 to 0x1F7E Application Note 18 V1 3 2012 10 Infineon DALI Control Gear Software Stack AP08102 6 6 Preparing Software Stack for LED Application Software Package Table 11 lists the source files in the software package
13. follow the isolated topology specified in the standard Supported DMX 16 DALI_PHY I L C L Figure 16 DALI DMX512 Board Schematic Part 1 Application Note 20 V1 3 2012 10 Cinfineon DALI Control Gear Software Stack AP08102 Preparing Software Stack for LED Application XC836 ict ES gris STIR 21 DMX5T7 RX DCT P2_6 A C2 Po 2 PIS PO 7 PO 3 PZA ki DiP3 sf coa i DIP2 15 we E i lt COUTE1 pe E DEI DIS R COUT62 MX512 DIS RX m GE 2 0082 DAL TX n COUT63 DALI RX vcc XTAL4 C4 XTAL3 c3 100nF 330nF 555 GND GND A jiga Pin Power Co Conn nl 2 05 7028 02 X2 2 X31 SPD X2 1 X32 22 23 2031 f Ea 1 34 22uF 8 x GND orar eT C7 DNA L4 GND Le Leo 1 paa LED cs ca 224F 6 3 33uF 6 3V GND GND RED CH a e LED Driver ss as 1C4 BCR421 GND AS Figure 17 DALI DMX512 Board Schematic Part 2 Application Note 21 V1 3 2012 10 7 DALI Control Gear Software Stack Infineon poets Summary Summary The DALI Control Gear Software Stack solution has been developed in accordance with the IEC62386 standard The description in this application note shows how the solution can be customised for an LED control application From the examp
14. BK WRITE MEMORY EN D Undefine B Code Optimization Wamings Wamingevel2 y famingevel2 Y Level 9 Common Block Subroutines 52 Bits to round for float compare E X Emphasis Favor size w 7 Global Register Coloring F int e joo000 Y Linker Code Packing max AJMP ACALL I Dont use absolute register accesses Keep variables in order Y Enable ANSI integer promotion rules Include Paths B Misc Controls Compiler OBJECTADVANCED ROM COMPACT OPTIMIZE 9 SIZE BROWSE MOD517 NOAU DEFINE control SPECIAL MODE EN MEMORY BANK EN XC83X 8K WRITE MEMORY EN DEBUG string OK Cancel Z Figure 11 Keil Preprocessor Settings K Application Note 14 V1 3 2012 10 Cinfineon DALI Control Gear Software Stack AP08102 6 Preparing Software Stack for LED Application Preparing Software Stack for LED Application This chapter describes an LED application example that uses the DALI Software Stack with the DALI DMX512 board from Infineon 6 1 Hardware Setup This section describes the hardware setup for this LED example The DALI DMX512 board has 3 LED drivers which are used to drive the LED channels The PWM signal is generated using the CCU6 module and output through Ports 1 1 1 3 and 1 5 to control the brightness level of the LED DALI Control Device DALI BUS Power DALI PHY M BCR421 LED Driver
15. Cinfineon www 3 3 i A XC800 Family DALI Control Gear Software Stack AP08102 Application Note V1 3 2012 10 Microcontrollers Edition 2012 10 Published by Infineon Technologies AG 81726 Munich Germany 2012 Infineon Technologies AG All Rights Reserved LEGAL DISCLAIMER THE INFORMATION GIVEN IN THIS APPLICATION NOTE IS GIVEN AS A HINT FOR THE IMPLEMENTATION OF THE INFINEON TECHNOLOGIES COMPONENT ONLY AND SHALL NOT BE REGARDED AS ANY DESCRIPTION OR WARRANTY OF A CERTAIN FUNCTIONALITY CONDITION OR QUALITY OF THE INFINEON TECHNOLOGIES COMPONENT THE RECIPIENT OF THIS APPLICATION NOTE MUST VERIFY ANY FUNCTION DESCRIBED HEREIN IN THE REAL APPLICATION INFINEON TECHNOLOGIES HEREBY DISCLAIMS ANY AND ALL WARRANTIES AND LIABILITIES OF ANY KIND INCLUDING WITHOUT LIMITATION WARRANTIES OF NON INFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS OF ANY THIRD PARTY WITH RESPECT TO ANY AND ALL INFORMATION GIVEN IN THIS APPLICATION NOTE Information For further information on technology delivery terms and conditions and prices please contact the nearest Infineon Technologies Office www infineon com Warnings Due to technical requirements components may contain dangerous substances For information on the types in question please contact the nearest Infineon Technologies Office Infineon Technologies components may be used in life support devices or systems only with the express written approval of Infineon Technologies if
16. TS 1 start bit logical 1 bi phase code 1 address byte YAAA AAAS bi phase code Y short address 0 or group broadcast address 1 A address bits S direct arc power level 0 or command 1 1 data byte XXXX XXXX bi phase code 2 stop bits 1 idle line Figure 5 Forward Frame Format 2 2 Sending Backward Frame Backward frame is sent only after the reception of a query command or a write memory command It consists of 11 bits START BIT STOP BITS D7 D6 DS D4 D3 D2 D1 DO 1 start bit logical 1 bi phase code 1 data byte XXXX XXXX bi phase code 2 stop bits 1 idle line Figure6 Backward Frame Format Application Note 7 V1 3 2012 10 DALI Control Gear Software Stack Infineon poets DALI Control Gear Software Stack 3 DALI Control Gear Software Stack This chapter describes the DALI Software Stack implemented for XC83x devices 3 1 Software Structure Figure 7 shows the interface of the different software modules in the XC83x lighting application software It consists of peripheral modules the DALI Software Stack and an application layer The DALI Software Stack consists of the DALI protocol and commands handler
17. ables can be updated by the DALI master through the configuration and special commands Application Note 11 V1 3 2012 10 DALI Control Gear Software Stack Infineon poets DALI Control Gear Software Stack 3 4 4 Memory Banks The DALI standard supports up to 256 memory banks up to 256 bytes for each memory bank Due to limited flash size the implementation can support only 2 memory banks Bank 0 and Bank 1 For a device with a flash size of 4K bytes Bank 0 is 32 bytes and with read only access Bank 1 is 95 bytes and with read write access For a device with a flash size of 8K bytes Bank 0 is 256 bytes and with read only access e Bank 1 is 95 bytes and with read write access The default data of Memory Bank 0 is defined in the file called DALI_memory_bank0 c The default data of Memory Bank 1 is defined in the file called DALI Flash Sect default c Table 3 Memory Bank Address Allocation Device Flash Size Memory Bank 0 Memory Bank 1 Default XC82x XC83x 4K Bytes Ox0ECO to Ox0EDF 32 bytes 0x0F20 to Ox0F7E 95 bytes XC83x 8K Bytes 0x1E00 to 0x1EFF 256 bytes 0x1F20 to Ox1F7E 95 bytes At power up the device will retrieve the Memory Bank 1 data from the flash and place it into XRAM Any changes to the Memory Bank 1 data reguested by the DALI Master will be carried out in XRAM The routine Program DALI Variables is to be called to copy the Memory Bank 1 data from the XRAM
18. e forward frame Default settings Timer 2 0xC4F0 520 usec for DALI Reception Timer 2 OxD8FO 417 usec for DALI Transmission Application Note 9 V1 3 2012 10 DALI Control Gear Software Stack Infineon poets DALI Control Gear Software Stack 3 3 DALI Protocol Module The T2_viTmr2 function handles the decoding and encoding of the DALI frames Peripherals Modules DALI Protocol detec All address and Edge and shift the bit in Set command DALI Address TAE ei Detected the DALI g o ready flag DALI Command command bufers DALI GPIO Commands DALI RX Handler T2 overflow Timer gt oe eee n interrupt overflow trigger Figure8 Decoding DALI Forward Frame Peripherals Modules DALI Protocol La DALI Teont tiie gt ade Response nae as encoding All response bits DALI transmitted Commands Handler GPIO R Set Response DALITX M Br pase dates transmitted flag Figure 9 Encoding DALI Backward Frame 3 4 DALI Commands Handler Module The main purpose of this module is to process the DALI address and command data from the DALI protocol module This module contains application interface routines and DALI functions for fade control arc power control and read write memory 3 4 1 Process Command The address byte of the DALI com
19. ggler 0 00 0c eee eee eae 16 Hardware Abstraction Layer eee eae 17 Application Layer iii pa ng heh bea tees dal bodl wee Bolo ky oe Blau eee Bee a 18 Compiler Options and Linker Address Allocation 0 000 ccc cette een 18 Software Package a see had eta dee ice dda slz edd ARA A Peak eee eee eee 19 Schemat moria dan li wae ws Hee ee wee wee quel A EEEIEE te LENES ee E EAA 19 SUMMAly 15425 wee lean WE AAA ER v eta cea ae ea a eae 22 Acronyms Abbreviations and Special Terms lt ccc cee enna 22 References oorr roris domky zo koa ea ee ee oe ea AA A 22 ADpPehdbe ips A ARA oo are da Sees 23 Fow OEC O O O d s 23 DALI Variables eee eee 24 Application Note 4 V1 3 2012 10 Infineon 1 DALI Control Gear Software Stack AP08102 Overview Overview Digital Addressable Lighting Interface DALI is a communication protocol for lighting control in buildings The interface was first described in Annex E IEC60929 standard for fluorescent lamp ballast Subsequently it was updated to the new standard IEC 62386 to include other lighting devices such as LED and HID for example The standard for control interface of electronic control gears was published in June 2009 The standard for lighting control devices is scheduled to be published in 2012 DALI requires only a pair of wires to form the bus for communication to all devices on a single DALI network Each piece of operating equipment with a DALI i
20. into the flash This could be done before the device goes into power down mode or in the power loss situation Application Note 12 V1 3 2012 10 DALI Control Gear Software Stack Infineon poets API Routines 4 API Routines The DALI Software Stack provides 4 API routines DALI_arc_power return the required arc power level e PROGRAM_DALI_variables to program the DALI variables and Memory Bank 1 data to flash if they are updated by the DALI master e LIGHT status to update the DALI Software Stack on the status of the lighting device e LIGHT_on to indicate that the lighting device is turned on 4 1 Arc Power Level The DALI Software Stack provides a routine that the user application can call to get the reguested arc power level DALI arc power If the return value is zero the lamp LED has to be turned off Table 4 Update arc power level to the Application layer Routine DALI arc power Inputs Return 8 bits data 0 minimum arc power level maximum arc power level 4 2 Program DALI Variables This routine programs the updated DALI variables and Memory Bank 1 data to the flash If all the variables data remain unchanged there will be no programming action Table 5 Program DALI variables routine Routine PROGRAM_DALI_variables Inputs Return Resources used 32 bytes of IRAM for buffering data to be programmed Execution Time 14 msec Flash programming done 2
21. le users will be able to customise the Software Stack to their own lighting application 8 Acronyms Abbreviations and Special Terms List of terms and abbreviations used throughout the document 9 1 2 3 4 API Application Programming Interface GPIO General Purpose Input Output MCU Microcontroller Unit T2EX Timer 2 External Pin References 1EC62386 Digital addressable lighting interface Part 101 General requirements System Edition 1 0 2009 06 IEC62386 Digital addressable lighting interface Part 102 General requirements Control gear Edition 1 0 2009 06 XC82x User s Manual version 1 1 XC83x User s Manual version 1 1 Application Note 22 V1 3 2012 10 Infineon DALI Control Gear Software Stack AP08102 10 Appendix 10 1 Flow Charts Figure 18 and Figure 19 show the flow of the main loop and the DALI Software Stack C Main c D Vv Peripherals Initialisation h 4 Enable interrupts yes DALI Main 5 User code Application Appendix Figure 18 Software flow in main c DALI Main DALI state machine yes yes y Update light arc Set light to power power according on condition to the fade rate Figure 19 Software Flow in DALI main c Application Note 23 V1 3 2012 10 DALI Control Gear Software Stack Infineon
22. mand is used to distinguish between a normal and a special command This check is implemented in the DALI_vProcess_cmd function Figure 10 shows the flow of this function Application Note 10 V1 3 2012 10 DALI Control Gear Software Stack Infineon poets DALI Control Gear Software Stack DALI Process y Command Check DALI Address ddress belong to special command Address valid No Yes Yes Yes v Y No Standard Direct arc Special Commands power control commands Figure 10 Process DALI command 3 4 2 Fading Control According to the DALI standard there are 15 different fade times and fade rates that control dimming The fade control is executed every 1 msec during the fading process It updates the current arc power and stops the fading process once the target arc power is reached The fade time per step is calculated using the formula Fade Time Fade time perstep Target Arc Power Current Arc Power steps To resolve the truncation error the formula is modified to Fade Time Fade time per 2 steps 05 Target Arc Power Current Arc Power 2 3 4 3 DALI Variables There are 34 DALI variables defined in the standard see Table 12 The data from these 34 variables is returned to the DALI master when requested through the query commands 29 of the 34 vari
23. nterface can be communicated with over DALI individually Using a bi directional data exchange a DALI controller can query and set the status of each connected lighting device As a standalone system DALI can be operated with a maximum of 64 devices Alternatively DALI can be used as a subsystem via DALI gateways for connection to building management systems Figure 1 Grouped System Brightness control within large open plan office lecture halls or conference rooms DALI can provide zoned or localised control of lighting Control could be offered through infra red remote control or a software control with GUI support or used together as an easy configuration tool to group loads together Offering flexibility in customised lighting DALI Control Device s e g Control Panel Remote Controller software control with GUI support us ul Complex System Multiple DALI systems can be connected together utilising gateways to building management systems Software programs offer more sophisticated programming functionality for grouped systems such as scenesetting timeclock and partition control Building Management System i DALI Control Device s e g Control Panel Remote Controller software control with GUI support DALI System Types Application Note 5 V1 3 2012 10 Cinfineon DALI Control Gear Software Stack AP08102 Overview

Download Pdf Manuals

image

Related Search

Related Contents

Glancetron DISP8034SW  FR-Ascent Linear 36.indd  A460 User Manual  Omega Vehicle Security OM-420 User's Manual  Philips widescreen flat TV 19PFL5522D 19" HD-Ready Black High Gloss  

Copyright © All rights reserved.
Failed to retrieve file