幻彩燈珠介紹
一、幻彩燈珠其實我們可以理解為該燈珠內(nèi)部有一顆LED驅(qū)動芯片外加R,G,B 3種顏色的LED的合封體。并且這顆LED驅(qū)動芯片可以驅(qū)動3路 LED,每一路LED驅(qū)動都跟內(nèi)部的R,G,B通過封裝打線連接好了。
1、幻彩燈珠的應(yīng)用場所:
(1)、家庭照明?;貌薀糁榭梢詰?yīng)用于家庭中的各種照明場景,如客廳、臥室、廚房等。多彩變幻的顏色可以為家庭營造出溫馨、浪漫的氛圍。
(2)、商業(yè)場所。幻彩燈珠可以應(yīng)用于商業(yè)場所的裝飾和照明,如商場、酒店、ktv等。多彩變幻的顏色可以為商業(yè)場所營造出藝術(shù)感和時尚感。
(3)、戶外景觀?;貌薀糁榭梢詰?yīng)用于城市公園、廣場、橋梁等戶外景觀,為城市增添藝術(shù)氣息和夜間景觀
2、幻彩燈珠對比傳統(tǒng)燈珠優(yōu)缺點:
(1)、顏色多彩變幻?;貌薀糁榈亩嗖首兓每梢詾榧彝ァ⑸虡I(yè)場所等營造出良好的氛圍
(2)、相比傳統(tǒng)的三基色LED燈珠+外置LED驅(qū)動芯片體積要小,更容易生產(chǎn)
(3)、相比傳統(tǒng)的LED燈珠+外置LED驅(qū)動芯片 成本更低
幻彩燈珠內(nèi)置驅(qū)動芯片介紹
一、市場常見的有WS2812,SM16703P,目前我們公司推出了AD2203芯片,該芯片性價比更高。
AD2203是三通道LED驅(qū)動IC,內(nèi)部集成有MCU數(shù)字接口、數(shù)據(jù)鎖存器、LED驅(qū)動等電路。通過外圍MCU控制實現(xiàn)該芯片的單獨灰度、級聯(lián)控制實現(xiàn)戶外大屏的彩色點陣發(fā)光控制 。 主要特征: 默認(rèn)上電燈不亮,恒流12mA(可定制),256級灰度可調(diào),數(shù)據(jù)自動整形,傳輸數(shù)率800---1200KHz,標(biāo)準(zhǔn)應(yīng)用電壓5V
管腳定義
具體參數(shù)如下:
六、通訊方式和應(yīng)用電路
芯片設(shè)計為單線歸零碼通訊方式。芯片上電復(fù)位以后,接收DIN 的數(shù)據(jù),足24 bit 后,DOUT 端口開始轉(zhuǎn)發(fā)數(shù)據(jù),輸出到下一個芯片。在轉(zhuǎn)發(fā)之前DOUT=0電位。芯片 OUTR、OUTG、OUTB 三個端口可輸出相應(yīng)24 bit 數(shù)據(jù)的不同占空比的信號。如果DIN 端輸入信號為RESET 信號,芯片將接收到的數(shù)據(jù)送顯示,芯片將在該信號結(jié)束后重新接收新的數(shù)據(jù),在接收完開始的 24bit 數(shù)據(jù)后,通過DOUT口轉(zhuǎn)發(fā)數(shù)據(jù),芯片在沒有接收到RESET 碼前,OUTR、OUTG、OUTB 管腳原輸出亮度保持不變,當(dāng)接收到不小于80μs 低電平RESET 碼后,芯片將剛才接收到的24 bit 亮度數(shù)據(jù)輸出到OUTR、OUTG、OUTB 引腳上。 七、數(shù)據(jù)編碼格式
T0H: 350ns T0L: 800ns T1H: 800ns T1L: 350ns (容錯20%) Trst > 80us
八、級連方法
九、數(shù)據(jù)傳輸方法
單芯片24BIT數(shù)據(jù)發(fā)送順序:高位先發(fā),即R7先發(fā)送
十、典型應(yīng)用電路
AD2202 應(yīng)用編程之炫彩漸變效果(MCU 應(yīng)廣150C)
#include "extern.h"
byte red, green, blue; //Could save these three bytes by using the rgb EWORD directly ( rgb$0, rgb$1, rgb$2)
byte mode;
byte hueinc;
byte firstinc;
EWORD rgb;
word pixels; //Only has to be a word if number of pixels > 255
word firstPixelHue;
#define definedPIXELS 300;//像素點
bit LED : pa.6;
bit BTN : pa.4;
int count;
//====================bit1
send1 MACRO
SET1 LED;
.DELAY 5;
$ LED low;
// .DELAY 1; //Going around is enough delay
ENDM
//===================bit0
send0 MACRO
SET1 LED;
.DELAY 2;
$ LED low;
.DELAY 2;
ENDM
//========================
void SendRGB (void)
{
DISGINT; //Let's not get interrupted
.FOR bitno, <23,22,21,20,19,18,17,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0> //Regular for() loop doesn't work, but at least the compiler can do the hard work
if (rgb.bitno == 0)
{
send0;
}
else
{
send1;
}
.ENDM
ENGINT;
}
void show (void) {
rgb$0 = blue; //I lost track of MSB, LSB and endians.. This is what works. ????????
rgb$1 = red;
rgb$2 = green;
SendRGB();
}
void clearLED (void)
{
rgb = 0;
//pixels = definedPIXELS;
pixels = 300; //Debug
do
{
SendRGB();
} while (--pixels);
.delay 2000; //If you want to make sure the LED-reset is caught, use a longer one. 0.125us *2000 = 250us
}
void FPPA0 (void)
{
.ADJUST_IC SYSCLK=IHRC/2 // SYSCLK=IHRC/2 16MH 2?? 8M
count = 0;
$ T16M IHRC, /4, BIT15; // BIT15 Time increment of each T16M = 16MHz / 4 = 4 MHz
// generate INTRQ.T16 = 16,384 uS every 2^16 times
ENGINT;
$ INTEN T16; // Enable the T16M interrupt
$ LED out,low; //LED ????? ???
$ BTN in, pull; //?????????
count = 0;
unsigned word hue = 0;
firstPixelHue = 0;
byte current;
mode = 0;
firstinc = 1;
//Let's start by clearing LED's and going to sleep - we don't want anything to consume current if we restarted by mistake
clearLED();
rgb = 0;
SendRGB();//
$ LED high;
CLKMD = 0xF4; // -> ILRC
CLKMD.En_IHRC = 0; // close IHRC
while (1)
{
STOPSYS;
if (BTN == 0) break; // examine and determine whether toggle to STOPSYS or execute at high speed.
}
CLKMD = 0x34; // -> IHRC / 2
count = 0; //
//========================???===========================================
while (1) //Main loop
{
if ( BTN == 1)
{ //If button is not pressed
pixels = definedPIXELS;//300
if (mode < 3)?
{ //Rainbow
hue = firstPixelHue;//0
if (mode == 0)
{
hueinc = 5;
firstinc = 1;
}
if (mode == 1) hueinc = 0;
if (mode == 2)
{
hueinc = 10;
firstinc = 0;
}
do
{
if (hue>=768)
{
hue -= 768;
}
current = (hue & 0xFF);
if (hue < 256)
{
red = ~current;
green = current;
blue = 0;
show();
}
if (hue > 255 && hue < 512)
{
red = 0;
green = ~current;
blue = current;
show();
}
if (hue > 511 && hue < 768)
{
red = current;
green = 0;
blue = ~current;
show();
}
hue+=hueinc;
} while (--pixels);
.delay(8000); //Should be increased if fewer LED's are used
firstPixelHue+=firstinc;
if (firstPixelHue > 3072) firstPixelHue = 0; //Has to be reset sometime.
} //End rainbow
//=================??======================
if (mode == 3)
{ //Red - not too bright
red = 150;
green = 0;
blue = 0;
do {
show();
} while (--pixels);
.delay(2000);
}
//=================??=======================
if (mode == 4)
{ //Green - not too bright
red = 0;
green = 150;
blue = 0;
do {
show();
} while (--pixels);
.delay(2000);
}
//====================??==================
if (mode == 5)
{ //Blue - not too bright
red = 0;
green = 0;
blue = 125;
do {
show();
} while (--pixels);
.delay(2000);
}
if (mode == 6)
{ //Princess! - not too bright
green = 0;
red = 200;
blue = 200;
do {
show();
} while (--pixels);
.delay(2000);
}
}
else
{ //Button pressed - go to sleep
clearLED();
rgb = 0;
SendRGB();
$ LED high; //I think I remember something about setting the WS2812B signal line high, reduces leak current. Maybe not.
if (count > 10)
{ //Unless we just woke up go to sleep
//Maybe disable wakeup from other pins - PADIER
CLKMD = 0xF4; // -> ILRC
CLKMD.En_IHRC = 0; // close IHRC
while (1)
{
STOPSYS;
if (BTN == 0) break; // examine and determine whether toggle to STOPSYS or execute at high speed.
}
CLKMD = 0x34; // -> IHRC / 2
mode++;
if (mode > 6) mode = 0;
}
/* //Change mode if button held longer when coming out of sleep
count = 0;
while (count < 30) {
if (BTN == 1) {
break;
}
}
*/
count = 0;
}
// wdreset;
}
}
void Interrupt (void)
{
pushaf;
if (Intrq.T16)
{
Intrq.T16 = 0;
count ++; // 16,384uS 61 == 999,424 uS ≤ 1S
}
popaf;
}
審核編輯黃宇
-
led
+關(guān)注
關(guān)注
242文章
23286瀏覽量
661105 -
驅(qū)動芯片
+關(guān)注
關(guān)注
13文章
1285瀏覽量
54669 -
DIN
+關(guān)注
關(guān)注
0文章
15瀏覽量
10774
發(fā)布評論請先 登錄
相關(guān)推薦
評論