--Kuvana Ihuriro ryabateza imbere DWIN
Iki kibazo kuri wewe kugirango usunikire ibihembo byatsindiye isoko yisoko rya DWIN Iterambere - DWIN igenzura WS2812 igenzura amatara y’ibidukikije, injeniyeri binyuze muri COF yubwenge bwa ecran ya OS kugirango igenzure neza umukandara wa WS2812 urumuri rwamatara buri tara ryamatara, kugirango uhindure amabara y'ingaruka z'umukandara.
1.UI Ibikoresho
![vcsd (1)](https://ecdn6.globalso.com/upload/p/1355/source/2024-03/65f96b9c62fae40443.jpg)
3. Umushinga C51
Kode ya shoferi yo kugenzura ibara ryumucyo unyuze ku cyambu cya IO niyi ikurikira:
ubusa WS2812_Wandika_RGB ()
{
u8 i, j, a;
EA = 0;
kuri (j = 0; j
{
a = RGB_Umwe [j];
kuri (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 _ (); _ 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;
}
ubusa WS2812_RST ()
{
WS2812_DI = 0;
sys_delay_ms (1);
}
ubusa WS2812_DIS_1 () // Ingaruka 1, guhinduranya amabara, amabara yose ya LED, yose hamwe 7 y'ibanze
{
static u8 j = 1;
u16 i = 0;
niba (j & 0X01) RGB_Umwe [1] = 10; ikindi RGB_One [1] = 0;
niba (j & 0X02) RGB_Umwe [0] = 10; ikindi RGB_One [0] = 0;
niba (j & 0X04) RGB_Umwe [2] = 10; ikindi RGB_One [2] = 0;
j% = 7;
j ++;
kuri (i = 0; i
WS2812_Wandika_RGB ();
WS2812_RST ();
sys_delay_ms (1000);
}
Igihe cyo kohereza: Mutarama-31-2024