I recently tried to get the library that adfruit has for this lcd http://www.adafruit.com/products/250&zenid=f161b6e7bd3181d0d16cfd50ec1cfcba
the issue its not working with so ide and i was wondering if anyone knows a fix?
adfruit spi lcd
(15 posts) (8 voices)-
Posted 4 years ago #
-
Most Arduino libraries will not work for the Maple without some modification.
In this case, the ST7565 library uses a software-based bit-bang SPI interface which should work on the Maple, however I have not looked at the library in great detail.
Are you receiving any compilation errors?
Posted 4 years ago # -
I have converted the Adafruit library for the ST7735 to the Maple. It is probably similar to the ST7565. As I recall, the main changes had to do with including <stdint.h>, using hardware SPI, and to remove the AVR I/O bit banging it was doing and replacing these with digitalWrites. If you send me an email (PeterRArcher@hotmail.com) I will send you a copy. It may help.
Posted 4 years ago # -
how did this pan out? did you get the LCD working?
Posted 4 years ago # -
No progress yet because i dont have the lcd yet.
Posted 4 years ago # -
Huge bump but I would also like to know if this worked out. I am temped to email Pra, but do not want invade his publicly posted email and be sent to the spam folder. lol Currently trying to play with ST7565 on a maple mini r3.
EDIT: Also for those unfamiliar with the Library.
https://github.com/adafruit/ST7565-LCD/tree/master/ST7565
http://forums.leaflabs.com/topic.php?id=986
currently trying what was said in ^this post but im having troubles understanding all the things I need to modify. Also trying to port over something similar to "pgm_read_byte()"
Posted 2 years ago # -
Also, can anyone verify the relevance of this?
https://bitbucket.org/dinau/glcdst7565maple/src/27bc72a2cedc?at=v02Posted 2 years ago # -
Sh33p - ARM Cortex-M3, as in the Maples STM32F103, has a single address space, so pgm_read_byte(address) is unnecessary. So
#define pgm_read_byte(address) (*((*unsigned char)address))
Posted 2 years ago # -
Sh33p - go ahead and email me and I'll send you what code I have (I'll keep an eye on Junk Mail incase hotmail thinks you are a spammer :-))
Posted 2 years ago # -
Just an FYI. I got Hello world working with this library.
https://bitbucket.org/dinau/glcdst7565maple/downloads/GlcdSt7565Maple_v04_201301.zipCredit goes to this website
http://avr.paslog.jp/article/2169338.htmlYou need to drop it all in the IDE library folder. To make it work for the mini, you need to set up the AD-12864-SPI config file in the config folder to the correct pins for which ever SPI you are using. I am using SPI2 so the pins are
GLCD pin: LED_A | GND | 3.3V | SDI | SCK | A0 | RST || CS1
Maple pin: D11 D13 D10 D9 D8
*/
# define glcdRES 21 // Reset Bit RST
# define glcdCS1 22 // chip sel CS1
# define glcdDI 31 // A0/DI
# define SPI_CLOCK_VALUE SPI_2_25MHZ // SPI_562_500KHZ, SPI_2_25MHZ, SPI_4_5MHZ,SPI_9MHZ, SPI_18MHZ
#endifIll have pics up if anyone really wants to see.
Posted 2 years ago # -
Welp, now I need to figure out why the graphics are messed up. The top half of the screen output is on the bottom, and the bottom half is on the top. Left and right are fine. Must be some define in the library I hope.
Posted 2 years ago # -
Hi Sh33p,
Would you try this modification,
Open [GLCD_lib_dir]/device/st7565_Device.h
Change line 131
from:
Lcd_Cmd(0x40 +0 );
to:
Lcd_Cmd( 0x40 + N );N=0...63
This command is used to specify the display start line address of the display data RAM.Regards
dinau
Posted 2 years ago # -
Thank you Dinau! That fixed it. Now I need to wait for my new screen since the one I have has a bad RED back LED. lol
Also, I tried checking all the library files, but is there function already created for controlling contrast or do I need to force a contrast command through the serial in hex bytes?
Posted 2 years ago # -
I cant succeed using pra st7735 library for the maple:
here is the compilation error when I use examples provided
C:\Users\Admin\AppData\Local\Temp\build453063468411327688.tmp\ST7735.o: In function `ST7735':
C:\Users\Admin\AppData\Local\Temp\build453063468411327688.tmp/ST7735.cpp:15: multiple definition of `ST7735::ST7735(unsigned char, unsigned char, unsigned char)'
C:\Users\Admin\AppData\Local\Temp\build453063468411327688.tmp\ST7735.o:C:\Users\Admin\AppData\Local\Temp\build453063468411327688.tmp/ST7735.cpp:15: first defined here
Obviously the function is not defined several times...what can I do???
Posted 7 months ago # -
@efarant - Please post the code.
We need to see exactly the code you are using. Otherwise we are unlikely to be able to help.You could post the code at https://gist.github.com/
or similar places.Posted 7 months ago #
Reply
You must log in to post.