- DWIN ଡେଭଲପର୍ ଫୋରମ୍ ରୁ |
DWIN ଡେଭଲପର୍ ଫୋରମ୍ - DWIN ସ୍କ୍ରିନ୍ କଣ୍ଟ୍ରୋଲ୍ WS2812 ଆମ୍ବିଏଣ୍ଟ୍ ଆଲୋକ, DWIN ସ୍କ୍ରିନ୍ କଣ୍ଟ୍ରୋଲ୍ WS2812 ଆମ୍ବିଏଣ୍ଟ୍ ଆଲୋକ, ଇଞ୍ଜିନିୟର୍ମାନେ CO28 ବୁଦ୍ଧିମାନ ସ୍କ୍ରିନ୍ OS କୋର ମାଧ୍ୟମରେ WS2812 ଫାଣ୍ଟମ୍ ଲାଇଟ୍ ବେଲ୍ଟକୁ ପ୍ରତ୍ୟେକ ଲ୍ୟାମ୍ପ୍ ବିଡ୍ ରଙ୍ଗକୁ ସଠିକ୍ ଭାବରେ ନିୟନ୍ତ୍ରଣ କରିବା ପାଇଁ ଆପଣଙ୍କ ପାଇଁ ଏହି ସମସ୍ୟା | ବେଲ୍ଟର ଗତିଶୀଳ ପ୍ରଭାବଗୁଡିକ |
1.UI ସାମଗ୍ରୀ
![vcsd (1)](https://ecdn6.globalso.com/upload/p/1355/source/2024-03/65f96b9c62fae40443.jpg)
3. C51 ପ୍ରକଳ୍ପ
IO ପୋର୍ଟ ମାଧ୍ୟମରେ ଆଲୋକର ରଙ୍ଗକୁ ନିୟନ୍ତ୍ରଣ କରିବା ପାଇଁ ଡ୍ରାଇଭର କୋଡ୍ ନିମ୍ନଲିଖିତ ଅଟେ:
ଶୂନ୍ୟ WS2812_Write_RGB ()
{
u8 i, j, a;
EA = 0;
ପାଇଁ (j = 0; j
{
a = RGB_One [j];
ପାଇଁ (i = 0; i
{
WS2812_DI = 1;
_nop _ (); _ nop _ (); _ nop _ (); _ nop _ (); _ nop _ (); _ nop _ (); _ nop _ (); _ nop _ (); _ nop _ (); _ nop _ (); _ nop _ (); _ nop _ (); _ nop _ (); ); _ nop _ (); _ nop _ (); _ nop_ ();
_nop _ (); _ nop _ (); _ nop _ (); _ nop _ (); _ nop _ (); _ nop _ (); _ nop _ (); _ nop _ (); _ nop _ (); _ nop _ (); _ nop _ (); _ nop _ (); _ nop _ (); ); _ nop _ (); _ nop _ (); _ nop_ ();
WS2812_DI = (a & 0x80);
_nop _ (); _ nop _ (); _ nop _ (); _ nop _ (); _ nop _ (); _ nop _ (); _ nop _ (); _ nop _ (); _ nop _ (); _ nop _ (); _ nop_ ();
_nop _ (); _ nop _ (); _ nop _ (); _ nop _ (); _ nop _ (); _ nop _ (); _ nop _ (); _ nop _ (); _ nop _ (); _ nop _ (); _ nop_ ();
_nop _ (); _ nop _ (); _ nop _ (); _ nop _ (); _ nop _ (); _ nop _ (); _ nop _ (); _ nop _ (); _ nop _ (); _ nop _ (); _ nop_ ();
_nop _ (); _ nop _ (); _ nop _ (); _ nop _ (); _ nop _ (); _ nop _ (); _ nop _ (); _ nop _ (); _ nop _ (); _ nop _ (); _ nop_ ();
_nop _ (); _ nop _ (); _ nop _ (); _ nop _ (); _ nop _ (); _ nop _ (); _ nop _ (); _ nop _ (); _ nop _ (); _ nop _ (); _ nop_ ();
_nop _ (); _ nop _ (); _ nop _ (); _ nop _ (); _ nop _ (); _ nop _ (); _ nop _ (); _ nop _ (); _ nop _ (); _ nop _ (); _ nop_ ();
_nop _ (); _ nop _ (); _ nop _ (); _ nop _ (); _ nop _ (); _ nop _ (); _ nop _ (); _ nop _ (); _ nop _ (); _ nop _ (); _ nop_ ();
_nop _ (); _ nop _ (); _ nop _ (); _ nop _ (); _ nop _ (); _ nop _ (); _ nop _ (); _ nop _ (); _ nop _ (); _ nop _ (); _ nop_ ();
_nop _ (); _ nop _ (); _ nop _ (); _ nop _ (); _ nop _ (); _ nop _ (); _ nop _ (); _ nop _ (); _ nop _ (); _ nop _ (); _ nop_ ();
_nop _ (); _ nop _ (); _ nop _ (); _ nop _ (); _ nop _ (); _ nop _ (); _ nop _ (); _ nop _ (); _ nop _ (); _ nop _ (); _ nop_ ();
_nop _ (); _ nop _ (); _ nop _ (); _ nop _ (); _ nop _ (); _ nop _ (); _ nop _ (); _ nop _ (); _ nop _ (); _ nop _ (); _ nop_ ();
_nop _ (); _ nop _ (); _ nop _ (); _ nop _ (); _ nop _ (); _ nop _ (); _ nop _ (); _ nop _ (); _ nop _ (); _ nop _ (); _ nop_ ();
_nop _ (); _ nop _ (); _ nop _ (); _ nop _ (); _ nop _ (); _ nop _ (); _ nop _ (); _ nop _ (); _ nop _ (); _ nop _ (); _ nop_ ();
_nop _ (); _ nop _ (); _ nop _ (); _ nop _ (); _ nop _ (); _ nop _ (); _ nop _ (); _ nop _ (); _ nop _ (); _ nop _ (); _ nop_ ();
_nop _ (); _ nop _ (); _ nop _ (); _ nop _ (); _ nop _ (); _ nop _ (); _ nop _ (); _ nop _ (); _ nop _ (); _ nop _ (); _ nop_ ();
_nop _ (); _ nop _ (); _ nop _ (); _ nop _ (); _ nop _ (); _ nop _ (); _ nop _ (); _ nop _ (); _ nop _ (); _ nop _ (); _ nop_ ();
a
WS2812_DI = 0;
}
WS2812_DI = 0;
}
EA = 1;
}
ଶୂନ୍ୟ WS2812_RST ()
{
WS2812_DI = 0;
sys_delay_ms (1);
}
ଶୂନ୍ୟ WS2812_DIS_1 () // ପ୍ରଭାବ 1, ରଙ୍ଗ ସୁଇଚ୍, ସମସ୍ତ ଏଲଇଡି ରଙ୍ଗ, ସମୁଦାୟ 7 ମ basic ଳିକ ରଙ୍ଗ |
{
ସ୍ଥାୟୀ u8 j = 1;
u16 i = 0;
ଯଦି (j & 0X01) RGB_One [1] = 10; ଅନ୍ୟଥା RGB_One [1] = 0;
ଯଦି (j & 0X02) RGB_One [0] = 10; ଅନ୍ୟଥା RGB_One [0] = 0;
ଯଦି (j & 0X04) RGB_One [2] = 10; ଅନ୍ୟଥା RGB_One [2] = 0;
j% = 7;
j ++;
ପାଇଁ (i = 0; i
WS2812_Write_RGB ();
WS2812_RST ();
sys_delay_ms (1000);
}
ପୋଷ୍ଟ ସମୟ: ଜାନ -31-2024 |