Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
LCD artifacts with RC7 #4994
Hello! I have the following problem with the RC7:
It's compiled for a Melzi board with IDE 1.6.9 and pragma optimize (3) commented in ultralcd_st7920_u8glib_rrd.h, the RC6 didn't have this problem so it shouldn't be the hardware. I did the following tests:
Do you have any idea?
Well, I found a solution: since the RC6 works well, I simply overwrite the ultralcd_st7920_u8glib_rrd.h from the RC6 and now the LCD works with the RC7. It seems that the new changes to the ST7920_SWSPI_SND_8BIT function don't work with a melzi board with a RRDS LCD, hope it helps
Did you find to try the optimised delays for your board and display combination?
This loop is called 1 time for every byte on the screen. The delays sum up. But since RC7 we can precisely adjust them and have not to hope for a better result with switching
We would be very glad if you could test the Melzi - RRDS combination in this way.
It's a pleasure for me to help you :) . I tried different combinations and the optimum seems these ones:
#define ST7920_DELAY_1 DELAY_0_NOP #define ST7920_DELAY_2 DELAY_1_NOP #define ST7920_DELAY_3 DELAY_1_NOP #define ST7920_DELAY_1 DELAY_0_NOP #define ST7920_DELAY_2 DELAY_0_NOP #define ST7920_DELAY_3 DELAY_2_NOP #define ST7920_DELAY_1 DELAY_0_NOP #define ST7920_DELAY_2 DELAY_2_NOP #define ST7920_DELAY_3 DELAY_0_NOP
My board is an Anet V1.0 (a Melzi 2.0 clone) with the classic RRDS full graphic LCD module and compiled with Arduino 1.6.9
Tested this with RAMPS 1.4 and RAMPS Plus boards with reprap original full lcd and 3 china copy and this works best for all of them:
Maybe this can be default for RepRap Full LCD...
PS: If you shield your cables and have ground shield around the LCD and cables you can tweak that value down to DELAY_1_NOP.
The delays for 16 and 20MHz are determined by the ST7920 datasheet and the disassembled Arduino code to fulfill the requirements. At 16MHz 0,0,0 is just a little to fast for the datasheet values but works usually flawlessly on a Arduino MEGA - RAMPS 1.4 - REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER combination with the original 200-300mm long cables.
For some common boards we have added exceptions in
in their configurations.
If 0,0,1 would not work for almost all 16MHz boards we'd have much more trouble with it.
Every nop counts! Each of the nops is used vor every pixel transferred to the display.
referenced this issue
Dec 6, 2016
The docs for the Einsy Rambo board suggested using a non-zero value for