Hello!
What am I doing wrong?
Can't display text.
Do you have a working example?
program ILI9341VTest;
// TFT module connections
var TFT_DataPort : word at GPIOB_ODR;
TFT_RST : sbit at GPIOB_ODR.B4; // RESET
TFT_RS : sbit at GPIOB_ODR.B5; // DC/RS
TFT_CS : sbit at GPIOB_ODR.B3;
TFT_RD : sbit at GPIOB_ODR.B7; // SDO(MISO)
TFT_WR : sbit at GPIOB_ODR.B6; // SDI(MOSI)
TFT_BLED : sbit at GPIOB_ODR.B8;
// End TFT module connections
{ Declarations section }
procedure Init_MCU();
begin
SPI1_Init_Advanced(_SPI_FPCLK_DIV64, _SPI_MASTER OR _SPI_8_BIT OR _SPI_CLK_IDLE_LOW OR
_SPI_FIRST_CLK_EDGE_TRANSITION OR _SPI_MSB_FIRST OR _SPI_SS_DISABLE OR _SPI_SSM_ENABLE OR
_SPI_SSI_1, @_GPIO_MODULE_SPI1_PA567);
Delay_100ms();
TFT_Init_ILI9341_8bit(320, 240);
end;
begin
Init_MCU();
SPI1_Init();
TFT_Fill_Screen(CL_TEAL);
TFT_Write_Text('TEST', 75, 80);
while TRUE do
begin
TFT_Set_Brush(1, CL_RED, 0, 0, 0, 0);
TFT_Circle(160, 114, 40);
TFT_Write_Text('ILI9341', 136, 106);
end;
end.
ILI9341V STM32F103C8
ILI9341V STM32F103C8
- Attachments
-
- 20201114_102807.jpg (3.61 MiB) Viewed 3373 times
Re: ILI9341V STM32F103C8
Hi.
I think ME do not has SPI library for this TFT LCD.
Please ask users for right library.
I think ME do not has SPI library for this TFT LCD.
Please ask users for right library.
Re: ILI9341V STM32F103C8
Hello!
Thanks for the answer.
Other developers have all sorts of libraries for displays, such as ST7920, or ILI9341.
ME do not want to do send to libstock before asking I was already there. They do everything for their boards.
They think if a person needs to let him do it himself. Good examples in Pascal AVR.
Maybe there is a library for ILI9431, share.
Thanks.
Thanks for the answer.
Other developers have all sorts of libraries for displays, such as ST7920, or ILI9341.
ME do not want to do send to libstock before asking I was already there. They do everything for their boards.
They think if a person needs to let him do it himself. Good examples in Pascal AVR.
Maybe there is a library for ILI9431, share.
Thanks.
Re: ILI9341V STM32F103C8
Hi.
You can try to modify lib.
Read here : viewtopic.php?f=162&t=56427&start=45
I have leave this compiler, and did only one project.
Best Wishes.
You can try to modify lib.
Read here : viewtopic.php?f=162&t=56427&start=45
I have leave this compiler, and did only one project.
Best Wishes.
Re: ILI9341V STM32F103C8
Thank you, I'm working with him now.
They want 270$ for this compiler, but they don't want to do what people ask.
They want 270$ for this compiler, but they don't want to do what people ask.
Re: ILI9341V STM32F103C8
Thank you so much rares.porutiu
- Attachments
-
- 20201116_170017.jpg (3.82 MiB) Viewed 3323 times
Re: ILI9341V STM32F103C8
Good Job!
And thanks again to rares.porutiu!
-1 to ME team.
And thanks again to rares.porutiu!
-1 to ME team.
Re: ILI9341V STM32F103C8
Thanks
And more thanks aCkO.
-10 to ME team.
And more thanks aCkO.
-10 to ME team.
Re: ILI9341V STM32F103C8
Hello!
If anyone knows how to refresh the display?
If anyone knows how to refresh the display?
- Attachments
-
- ILI9341V.PNG (188.09 KiB) Viewed 3277 times
Re: ILI9341V STM32F103C8
Hello!
How do I use DMA? The help is not written.
Can an example.
How do I use DMA? The help is not written.
Can an example.
Re: ILI9341V STM32F103C8
Code: Select all
program ILI9341VTest;
Uses TestFont_resources;
// TFT module connections
var TFT_DataPort : word at GPIOB_ODR;
TFT_RST : sbit at GPIOB_ODR.B10; // RESET
TFT_RS : sbit at GPIOB_ODR.B1; // DC/RS
TFT_CS : sbit at GPIOB_ODR.B0;
TFT_RD : sbit at GPIOA_ODR.B13;
TFT_WR : sbit at GPIOA_ODR.B12;
TFT_BLED : sbit at GPIOB_ODR.B11;
// End TFT module connections
{
A0 - Reset
A1 - DC
A2 - CS
--- SPI1 ---
A5 - SCK
A6 - MISO
A7 - MOSI
}
var
VRef:real;
ADC_V:word;
Vtxt: string[23];
procedure VoltMeter;
begin
ADC_V := ADC1_Get_Sample (0);
Average:= ADC_V;
Ref := 3.305 / 4096;
V := (ADC_V) * Real(Ref) * 11;
FloatToStr(V, Vtxt);
Vtxt[4]:=0;
TFT_Write_Text('V:'+Vtxt, 80, 100);
end;
procedure Init_MCU();
begin
GPIO_Digital_Input(@GPIOA_ODR, _GPIO_PINMASK_0);
ADC_Set_Input_Channel(_ADC_CHANNEL_0);
ADC1_Init();
GPIO_Config(@GPIOB_BASE,_GPIO_PINMASK_11,_GPIO_CFG_MODE_OUTPUT or _GPIO_CFG_SPEED_MAX or _GPIO_CFG_OTYPE_PP);
TFT_BLED:= 0;
// Initialize SPI module used with PortExpander
SPI1_Init_Advanced(_SPI_FPCLK_DIV2, _SPI_MASTER or _SPI_8_BIT or
_SPI_CLK_IDLE_LOW or _SPI_FIRST_CLK_EDGE_TRANSITION or
_SPI_MSB_FIRST or _SPI_SS_DISABLE or _SPI_SSM_ENABLE or _SPI_SSI_1,
@_GPIO_MODULE_SPI1_PA567);
end;
begin
SPI1_init();
Init_MCU();
// --------------- SYSTEM -------------------------------------
TFT_Rotate_180(1);
//initialize the TFT with my modified version on ILI9341 that assigns SPI versions to the output routine pointers, see modified __Lib_TFT_Defs.mpas
TFT_Init_ILI9341_8bit_Custom_SPI(320,240);
TFT_Fill_Screen(CL_BLUE);//$FFFF);CL_GRAY
TFT_BLED:= 1;
//--------------- END SYSTEM ---------------------------------
TFT_Set_Font(@Arial42x51_Bold, CL_WHITE, FO_HORIZONTAL);
while TRUE do
begin
VoltMeter;
end;
end.
-
- Posts: 137
- Joined: 02 Jan 2020 19:00
Re: ILI9341V STM32F103C8
The pictures show that TFT_Write_Text writes only the pixels of the character.
To erase the previous characters, you need to display them again with the background color.
Or paint over a rectangle with a background color.
To erase the previous characters, you need to display them again with the background color.
Or paint over a rectangle with a background color.
Re: ILI9341V STM32F103C8
The background color does not work, the rectangular flickers strongly.