, . IM ( ). CS, . , , .
, . IM ( ). CS, . , , .
, , , . , , . . , , . (=
ozforester,
ozforester, , , ( Arduino, ), , - . . , , , , , " " ...
veso74; 01.08.2025 11:03.
, ili9341 , , .:st7789_rst_low(); delay(1); st7789_rst_high(); delay(120); spi_buffer[0] = 0x11; // exit sleep mode st7789_command( spi_buffer, 1 ); delay(120); spi_buffer[0] = 0x29; // display on st7789_command( spi_buffer, 1 ); while(1) { spi_buffer[0] = (rgb >> 8) ; spi_buffer[1] = (rgb && 0xff) ; st7789_data( spi_buffer, 2) ; }
CASET 0x2A // (Column Address Set)
RASET 0x2B // (Row Address Set)
RAMWR 0x2C // RAM (Memory Write)
ST7789_SendCommand(S T7789_CASET); // X
ST7789_SendData(x >> 8); //
ST7789_SendData(x & 0xFF); //
ST7789_SendData(widt h >> 8); //
ST7789_SendData(widt h & 0xFF); //
ST7789_SendCommand(S T7789_RASET); // Y
ST7789_SendData(y >> 8); //
ST7789_SendData(y & 0xFF); //
ST7789_SendData(heig ht >> 8); //
ST7789_SendData(heig ht & 0xFF); //
, ILI
//
void ST7789_DrawPixel(uin t16_t x, uint16_t y, uint16_t color)
{
//
if (x > CurrentWidth || y > CurrentHeight) {return; /* , */}
//
ST7789_SetRegion(x, y, x, y);
//
ST7789_SendCommand(S T7789_RAMWR);
ST7789_SendData(colo r >> 8); //
ST7789_SendData(colo r & 0xFF); //
}
. ILI9341 . .
:st7789_pos( x1, x2, y1, y2 ); spi_buffer[0] = 0x2c; // ram write st7789_command( spi_buffer, 1 );
SPI ?
, ili9341 .
(, , , , )
ozforester; 01.08.2025 11:36.
: 1 (: 0 , : 1)