Академический Документы
Профессиональный Документы
Культура Документы
Connectors
There are no specific connectors dedicated for the
DALI interface. Two-wire connectors with common
screw terminals or push fit suffice (Figure 3).
Cabling
Due to the transmission rate, there is no need for spe-
cial cables or wires. Two-wire standard electrical
cables can get the job done. 18 AWG, class 1 or 2
cables (solid or stranded) are commonly used on many
fixtures. They are often purple in color and usually
rated 600V. A maximum voltage drop of up to 2V is
allowed across the connecting wires from the interface
supply to each system component. The maximum
distance between two communicating units should be
300 meters (984 feet).
DALI CIRCUITS
There is no specification or recommendations on how
to implement the circuit design for DALI. The following
optically isolated circuit interfaces a PIC16F1947 to the
DALI bus.
R5
4 U1 1
DALI TX
330R (Any GPIO)
D4
+5V R4 3 2
MM5Z5V1
Q2
MMBT2222A-TP 120R TCLT1000
R6 R7 R8
2
D5
2.2K 10K 1K
3 1
1 4
U2 DALI RX
(Interrupt Pin)
BGX 50A E6327
4
2 3
TCLT1000
IDLE 1 1 0 1 0 0 1 0 IDLE
CLK
Signal
Manchester
encoded
EXAMPLE 1:
void TransmitFrame(void)
{
static uint8_t bitcount = 0;
if (TxFlag.TransmitMode && TE_TMR_INT_ENABLE)
{
switch (makeframe)
{
case start:
......................................
......................................
break;
case alldata:
if (TxFlag.Secondhalf)
{
DATA_OUT ^= 1;
TxFlag.Secondhalf = CLEAR;
bitcount++;
if (bitcount > 15)
{
makeframe=stop;
bitcount = 0;
}
}
else
{
if (FwdFrame.Word & 0x8000) DATA_OUT = DALI_LO;
else DATA_OUT=DALI_HI;
FwdFrame.Word <<= 1;
TxFlag.Secondhalf = SET;
makeframe=alldata;
}
break;
case stop:
..........................................
..........................................
break;
..........................................
..........................................
}
Manchester
encoded
bit-time bit-time bit-time bit-time
Manchester
decoded
0 1 1 0 0
EXAMPLE 2:
void ReceiveFrame(void)
{
static uint16_t count = 0;
static uint16_t HalfBitTime=0;
static uint16_t LoadHalfBitTime=0;
if (RxFlag.ReceiveMode)
{
switch (makeframe)
{
case start:
............................
............................
break;
case address:
if (count <= 7)
{
if (TE_TMR_INT_ENABLE && TE_TMR_INT_FLAG)
{
TE_TMR_INT_FLAG = CLEAR;
TE_TMR_ON=CLEAR;
receivebuff <<= 1;
if (DATA_IN_INT== DALI_LO)
{
SET_INT_FALLING_EDGE();
receivebuff |= 0x01;
}
else SET_INT_RISING_EDGE();
TE_TMR_INT_ENABLE = CLEAR;
TE_TMR_ON = CLEAR;
EDGE_INT_ENABLE= SET;
}
else if (EDGE_INT_ENABLE)
{
EDGE_INT_ENABLE = CLEAR;
TE_TMR_INT_ENABLE = SET;
TE_TMR_VALUE = TMRLoadVal;
TE_TMR_ON = SET;
count++;
}
else
{
RxFlag.Error = SET;
RxFlag.ListenMode = SET;
break;
}
if (count <= 7)
makeframe = address;
else
{
count = 0;
makeframe = data;
EDGE_INT_ENABLE = CLEAR;
EDGE_INT_FLAG = CLEAR;
TE_TMR_INT_ENABLE = SET;
TE_TMR_VALUE = TMRLoadVal;
TE_TMR_ON = SET;
FwdFrame.Byte.Address = receivebuff;
receivebuff = CLEAR;
}
}
break;
.............................................
.............................................
}
REFERENCES:
[1] International Standard CEI IEC 60929, Third
edition 2006-01
[2] International Standard IEC 62386-101, Edition
1.0 2009-06
[3] International Standard IEC 62386-102, Edition
1.0 2009-06
1
RX- B6
GND B7 J3 POWER
APPENDIX A
GND B8
1
LOOP
R1
2
A1
TX+ J1 SUPPLY
TX- A2 POWER 0R
A3
RX+ P1
A4
2
IN A5 Polarized 1 2
RX- A6 3 4 INT/RB0 DALI IN
DALI OUT SDO/RC5
R3 1 D3 2
3
1K
1/4W BAV99-7-F
1
DALI Bus
TB1 J6 J4 J5
1
2
2
LOOP 2
ED130/2DS EDSTL130/02
TB2 J9
1
IN 2
ED130/2DS EDSTL130/02
R5
4 U1 1
SDO/RC5 DALI OUT
330R
D4
+5V R4 3 2
MM5Z5V1
Q2
MMBT2222A-TP 120R TCLT1000
2
D5 R6 R7 R8
2.2K 10K 1K
3 1
1 4
U2 INT/RB0
DALI IN
4
BGX 50A E6327
2 3
TCLT1000
AN1465
DS01465A-page 11
AN1465
NOTES:
Microchip believes that its family of products is one of the most secure families of its kind on the market today, when used in the
intended manner and under normal conditions.
There are dishonest and possibly illegal methods used to breach the code protection feature. All of these methods, to our
knowledge, require using the Microchip products in a manner outside the operating specifications contained in Microchips Data
Sheets. Most likely, the person doing so is engaged in theft of intellectual property.
Microchip is willing to work with the customer who is concerned about the integrity of their code.
Neither Microchip nor any other semiconductor manufacturer can guarantee the security of their code. Code protection does not
mean that we are guaranteeing the product as unbreakable.
Code protection is constantly evolving. We at Microchip are committed to continuously improving the code protection features of our
products. Attempts to break Microchips code protection feature may be a violation of the Digital Millennium Copyright Act. If such acts
allow unauthorized access to your software or other copyrighted work, you may have a right to sue for relief under that Act.
QUALITY MANAGEMENT SYSTEM Microchip received ISO/TS-16949:2009 certification for its worldwide
headquarters, design and wafer fabrication facilities in Chandler and
CERTIFIED BY DNV Tempe, Arizona; Gresham, Oregon and design centers in California
and India. The Companys quality system processes and procedures
are for its PIC MCUs and dsPIC DSCs, KEELOQ code hopping
== ISO/TS 16949 == devices, Serial EEPROMs, microperipherals, nonvolatile memory and
analog products. In addition, Microchips quality system for the design
and manufacture of development systems is ISO 9001:2000 certified.