- DWIN dörediji forumyndan
Bu mesele, DWIN Öndürijiler Forumynyň - DWIN ekrany dolandyryş WS2812 daşky yşyklandyryş, DWIN ekran gözegçiligi, COF akylly ekran OS ýadrosy arkaly inersenerler, her çyra monjuk reňkini WS2812 fantom çyra kemerine takyk gözegçilik etmek, reňk çalşygyny gazanmak üçin kemeriň dinamiki täsirleri.
1.UI materialy
![vcsd (1)](https://ecdn6.globalso.com/upload/p/1355/source/2024-03/65f96b9c62fae40443.jpg)
3. C51 Taslamasy
IO porty arkaly ýagtylygyň reňkini dolandyrmak üçin sürüjiniň kody aşakdaky ýaly:
boş WS2812_Write_RGB ()
{
u8 i, j, a;
EA = 0;
üçin (j = 0; j
{
a = RGB_One [j];
üçin (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_ ();
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;
}
boş WS2812_RST ()
{
WS2812_DI = 0;
sys_delay_ms (1);
}
boş WS2812_DIS_1 () // Effekt 1, reňk çalyşmagy, ähli LED reňkler, jemi 7 esasy reňk
{
statik u8 j = 1;
u16 i = 0;
eger (j & 0X01) RGB_One [1] = 10; başga RGB_One [1] = 0;
eger (j & 0X02) RGB_One [0] = 10; başga RGB_One [0] = 0;
eger (j & 0X04) RGB_One [2] = 10; başga RGB_One [2] = 0;
j% = 7;
j ++;
üçin (i = 0; i
WS2812_Write_RGB ();
WS2812_RST ();
sys_delay_ms (1000);
}
Iş wagty: -20anwar-31-2024