floyd-fish / st7789-stm32 Goto Github PK
View Code? Open in Web Editor NEWusing STM32's Hardware SPI to drive a ST7789 based IPS displayer
License: GNU General Public License v3.0
using STM32's Hardware SPI to drive a ST7789 based IPS displayer
License: GNU General Public License v3.0
hello all,
I would want to read by SPI the configuration of ST7789 as for example RDDID or RDDCOLMOD, but i don't see any function to perform this kind of operation.
Can you provide us these functions by DMA or interuption ?
Thx
I tried exactly same code you shared but I have only black screen.I added 4.7k pull-up resistor on SCK and MOSI but it did not work.What might be problem?Thanks.
Hello,
I am trying to show pictures and videos on an st7789 screen with stm32f103c8. I wanted to try your code but my Keil uVision version does not support (L6047U: The size of this image (49960 bytes) exceeds the maximum allowed for this version of the linker) such long codes or such big codes. Can you give me any advice or hint? I need to show pictures as one function and show videos as a second one.
Best regards
hi,it is necessary to display the ADC value or any int16_t digit value by what function it can be done,i dont find it in library if i use
int16_t adc ;
//for example adc=120;
ST7789_WriteString(0,160,adc,Font_16x26,WHITE,BLACK);
or
ST7789_WriteChar(0,160,adc,Font_16x26,WHITE,BLACK);
its dont work,show only not correct characters
help me please,thanks.
你好,最近入手了一个 ST7789 硬件怎么没有你的那么多引脚?想问一下你的具体硬件引脚连接是什么??
so all in all...not useful at all ....
Thanks for the useful code.
I would like to use this code, however could not find any license statement.
Would it be possible to add it?
佬们,我用image2lcd转的数组似乎无法填入ST7789_DrawImage函数呀,我要如何把图片编码成数组呢?
Hi i have ST7789 which has no CS pin. This library does not work for me. Is there anybody who faced with that issue and solved?
Hello, @Floyd-Fish,
I've bought the 240x320 display based on ST7789 driver faced the problem that in the ST7789_ROTATION == 3 mode the start of the coordinates is in the top left part of the display.
To test the true coordinates, I've used this part of code to get the visual identification where the begin and end of coordinates are located:
ST7789_DrawCircle(0, 0, 5, RED);
ST7789_DrawCircle(0, 239, 5, CYAN);
ST7789_DrawCircle(319, 0, 5, MAGENTA);
Here is the photo with some mark-up from my side:
Could you please explain/provide solution how to set 0,0 to the left bottom side of display?
I'm using a modified version of this library and I'm just wondering where you get the fonts in this format? I'm hoping to find one a bit larger but when I tried to implement modified fonts from other libraries all I seem to get is nonsense on screen.
memset will not set uint16_t type. it will only set first byte.
use this instead:
uint16_t* memset16(uint16_t *m, uint16_t val, size_t count) {
uint16_t *buf = m;
while (count--)
*buf++ = val;
return m;
}
Hi,
I have tested your code but it only works with SPI 2MHz. Is there any place you can help?
经过我的测试,一些屏幕支持README中配置的CPAH和CPOL极性(1Edge,High)
其中分两种情况:
有一部分屏幕支持CPAH和CPOL极性(1Edge,High)与(2Edge,High),
有一部仅支持(2Edge,High)。
目前测试了四五款ST7789 240*240屏幕,其差异性与制造商有关,暂不知道具体原因。
另外 在STM32F103系列中,SPI1和SPI2在HAL库的使用也表现出差异性
在测试时使用(1Edge,High)配置SPI1和SPI2,在部分屏幕测试上仅SPI2可以点亮屏幕,怀疑HAL库在配置时,对CPAH和CPOL处理稍有问题。尽管在逻辑分析仪上看起来两个SPI外设生成的波形近乎一模一样,但是在部分屏幕测试上仅SPI2可以点亮屏幕。
我使用的版本为CubeMX6.8.0
SPI1
SPI2
Sorry Sir. Can you help me with the Draw Image function formart. Seem like i can get display to show right color with format R5G6B5. Can you help me?
Can you transplant an example of TF card loading jpg pictures?
I've been trying to get a ST7789 display running using the STM32H7 and this driver but it seems like it doesn't work for the H7.
library not work at all
I try your lib for st32f407 but i dont get action, only black screen :(
i connected;
PA1 for ST7789_DC
PA3 for ST7789_RST
PA4 for ST7789_CS
and i use sp1 as transmission only master.
but dont work.
its my project repo; https://github.com/nesetaydinn/tftSurucuTest
please help me
Hello,
function ST7789_Fill_Color is not correct because memset is not working with uint16_t data, and the uint16_t buffer should be swap 2 byte high and low . So, we have to modify this function to working correct:
`void MemsetBuffer(uint16_t buf, uint16_t data, uint32_t size)
{
while(size--)
{
buf++ = data;
}
}
/
Given this repository seems dead, I forked and further enhanced it.
could you tell me how you made fonts
which software used to make these fonts?
How I CANT TO CREATE FONTS
I tried to install this from the zip file into the Arduino IDE and got the error message:
"Specified folder/zip file does not contain a valid library"
Is this not meant to work with the Arduino IDE?
Hello,
In the fill colour function you are using memset to set the colour but memset will set the memory to only the first byte, if for example you try green, in 565 it's 0x07E0, it will set each memory element in the array with E0, use this instead:
static void memset_pattern2(void *b, const void *pattern2, size_t len)
{
char * start = (char *)b;
char * p = (char *)b;
while ((start + len) - p >= 2) {
memmove(p, pattern2, 2);
p += 2;
}
if ((start + len) - p != 0) {
memmove(p, pattern2, (start + len) - p);
}
}
and in the fill colour function :
memset_pattern2(disp_buf, &color, sizeof(disp_buf));
kind regards
Vlad
Hello,
I can run normally with your driver, but now I need to change the ASCII font size, Chinese character set and modify the picture. I would like to ask what software you use for module extraction and generation, could you tell me the specific software and procedures of module extraction? Thank you very much!
Hi and thank you for sharing the library.
Can I use this library for 2.8 inch lcd?
if yes, what changes I have make in the code?
If no, why?
Is there any difference between st7789 and st7789v and st7789h2?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.