Cant get my graphic display to work
Dear people,
I'm a completely noob in the repetier and arduino world. But in the mean time I have read tons of sites/video's/forum etc but I cant solve the problem....
I have a new Megatronic v3 board with the 128x64 full graphical LCD (SPI) screen.
The screen and encoder work good with Marlin. But because of its limitations I want to try repetier (because the milling possibilities).
So I downloaded the repetier firmware today with the web-configuration tool.
I had a working Arduino IDE (1.8) installed, but for repetier I tried version 1.6.5 too (the config file has comments that it is optimised for v0.92).
I also read about the "FEATURE_CONTROLLER 11" had to be defined in the configuration.h file, but that is already the case.
During compiling do not appear any errors.
But whatever I try, the graphics screen stays blank, no tekst or sign of life. Except for its LED
What do I have to do next?
I hope you can help me, cause I'm totally out of options by now.....
Thnks! Frank
I'm a completely noob in the repetier and arduino world. But in the mean time I have read tons of sites/video's/forum etc but I cant solve the problem....
I have a new Megatronic v3 board with the 128x64 full graphical LCD (SPI) screen.
The screen and encoder work good with Marlin. But because of its limitations I want to try repetier (because the milling possibilities).
So I downloaded the repetier firmware today with the web-configuration tool.
I had a working Arduino IDE (1.8) installed, but for repetier I tried version 1.6.5 too (the config file has comments that it is optimised for v0.92).
I also read about the "FEATURE_CONTROLLER 11" had to be defined in the configuration.h file, but that is already the case.
During compiling do not appear any errors.
But whatever I try, the graphics screen stays blank, no tekst or sign of life. Except for its LED
What do I have to do next?
I hope you can help me, cause I'm totally out of options by now.....
Thnks! Frank
Comments
I studied for hours today, but have no clue.
I did found out that the graphics screen is recognised as FEATURE_CONTROLLER == CONTROLLER_REPRAPDISCOUNT_GLCD
That seems oke, since it is a graphic display from reprapworld.
The megatronics V3 board is from reprapworld too.
In the repetier firmware I downloaded is no "displayList.h" available, so I have no clue what you told me to do?.
So now I'm really getting confused: with the repetier firmware are not all pin numbers mentioned (anyway, I cant find them, partially commented but uncommenting has no effect).
Within the Marlin firmware I cant find the complete IO's too, but there the screen works fine
So I can only ask: how to deal with it now?
I collected the settings for the screen and board, with the following pin numbers:
Keypad header:
1. 5V
2. GND
3. Encoder A (D45)
4. Encoder Switch (D33)
5. Encoder B (D44)
6. Tactile button (D34)
7. N/C (D43)
8. SD Detect (D35)
9. N/C (D42)
10. N/C (D36)
SPI header (at the display = SDOUT header at Megatronics board)
1. 5V
2. N/C
3. MISO (MISO pin, D50)
4. MOSI (MOSI pin, D51)
5. SCK (SCK pin, D52)
6. CS SD (SS pin, D53)
7. GND
8. SD Detect (N/C)
Configuration.h:
This file is optimized for version 0.92
generator: http://www.repetier.com/firmware/v092/
#define NUM_EXTRUDER 0
#define MOTHERBOARD 703
#include "pins.h"
#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
#ifndef SDSUPPORT // Some boards have sd support on board. These define the values already in pins.h
#define SDSUPPORT 0
#undef SDCARDDETECT
#define SDCARDDETECT -1
#define SDCARDDETECTINVERTED 0
#endif
#define SD_EXTENDED_DIR 1 /** Show extended directory including file length. Don't use this with Pronterface! */
#define SD_RUN_ON_STOP ""
#define SD_STOP_HEATER_AND_MOTORS_ON_STOP 1
#define ARC_SUPPORT 1
#define FEATURE_MEMORY_POSITION 1
#define FEATURE_CHECKSUM_FORCED 0
#define FEATURE_FAN_CONTROL 1
#define FEATURE_FAN2_CONTROL 0
#define FEATURE_CONTROLLER 11
#define ADC_KEYPAD_PIN -1
#define LANGUAGE_EN_ACTIVE 1
#define LANGUAGE_DE_ACTIVE 1
#define LANGUAGE_NL_ACTIVE 1
#define LANGUAGE_PT_ACTIVE 0
#define LANGUAGE_IT_ACTIVE 0
#define LANGUAGE_ES_ACTIVE 0
#define LANGUAGE_FI_ACTIVE 0
#define LANGUAGE_SE_ACTIVE 0
#define LANGUAGE_FR_ACTIVE 0
#define LANGUAGE_CZ_ACTIVE 0
#define LANGUAGE_PL_ACTIVE 0
#define LANGUAGE_TR_ACTIVE 0
#define UI_PRINTER_NAME "RepRap"
#define UI_PRINTER_COMPANY "Frankly"
#define UI_PAGES_DURATION 4000
#define UI_ANIMATION 1
#define UI_SPEEDDEPENDENT_POSITIONING 0
#define UI_DISABLE_AUTO_PAGESWITCH 0
#define UI_AUTORETURN_TO_MENU_AFTER 360000
#define FEATURE_UI_KEYS 0
#define UI_ENCODER_SPEED 1
#define UI_REVERSE_ENCODER 0
#define UI_KEY_BOUNCETIME 10
#define UI_KEY_FIRST_REPEAT 500
#define UI_KEY_REDUCE_REPEAT 50
#define UI_KEY_MIN_REPEAT 50
#define FEATURE_BEEPER 0
#define CASE_LIGHTS_PIN -1
#define CASE_LIGHT_DEFAULT_ON 1
#define UI_START_SCREEN_DELAY 1000
#define UI_DYNAMIC_ENCODER_SPEED 1
/**
Beeper sound definitions for short beeps during key actions
and longer beeps for important actions.
Parameter is delay in microseconds and the secons is the number of repetitions.
Values must be in range 1..255
*/
#define BEEPER_SHORT_SEQUENCE 2,2
#define BEEPER_LONG_SEQUENCE 8,8
#define UI_SET_PRESET_HEATED_BED_TEMP_PLA 60
#define UI_SET_PRESET_EXTRUDER_TEMP_PLA 190
#define UI_SET_PRESET_HEATED_BED_TEMP_ABS 110
#define UI_SET_PRESET_EXTRUDER_TEMP_ABS 240
#define UI_SET_MIN_HEATED_BED_TEMP 0
#define UI_SET_MAX_HEATED_BED_TEMP 0
#define UI_SET_MIN_EXTRUDER_TEMP 0
#define UI_SET_MAX_EXTRUDER_TEMP 260
#define UI_SET_EXTRUDER_FEEDRATE 2
#define UI_SET_EXTRUDER_RETRACT_DISTANCE 3
#define NUM_MOTOR_DRIVERS 0
#endif
/* Below you will find the configuration string, that created this Configuration.h
========== Start configuration string ==========
Settings in Pins.h:
/****************************************************************************************
* MegaTronics v3.0
*
****************************************************************************************/
#if MOTHERBOARD == 703
#define KNOWN_BOARD 1
#ifndef __AVR_ATmega2560__
#error Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu.
#endif
#define ORIG_X_STEP_PIN 58
#define ORIG_X_DIR_PIN 57
#define ORIG_X_ENABLE_PIN 59
#define ORIG_X_MIN_PIN 37
//2 //Max endstops default to disabled "-1", set to commented value to enable.
#define ORIG_X_MAX_PIN 40
#define ORIG_Y_STEP_PIN 5
#define ORIG_Y_DIR_PIN 17
#define ORIG_Y_ENABLE_PIN 4
#define ORIG_Y_MIN_PIN 41
#define ORIG_Y_MAX_PIN 38
#define ORIG_Z_STEP_PIN 16
#define ORIG_Z_DIR_PIN 11
#define ORIG_Z_ENABLE_PIN 3
#define ORIG_Z_MIN_PIN 18
#define ORIG_Z_MAX_PIN 19
#define ORIG_E0_STEP_PIN 28
#define ORIG_E0_DIR_PIN 27
#define ORIG_E0_ENABLE_PIN 29
#define ORIG_E1_STEP_PIN 25
#define ORIG_E1_DIR_PIN 24
#define ORIG_E1_ENABLE_PIN 26
#define ORIG_E2_STEP_PIN 22
#define ORIG_E2_DIR_PIN 60
#define ORIG_E2_ENABLE_PIN 23
#define ORIG_SDCARDDETECT -1 // Ramps does not use this port
#define SDPOWER -1
#define SDSS 53
#define LED_PIN 13
#define ORIG_FAN_PIN 6
#define ORIG_FAN2_PIN 7
#define ORIG_PS_ON_PIN 12
//#define KILL_PIN -1
// EXTRUDER 0 - changed 10-9-2015
#define HEATER_0_PIN 2
// EXTRUDER 1 - changed 10-9-2015
#define HEATER_2_PIN 9
// EXTRUDER 2 - changed 10-9-2015
#define HEATER_3_PIN 8
// heater bed
#define HEATER_1_PIN 10
/*
Temperature sensors
ANALOG NUMBERING!
Thermistors
T0=15
T1=14
T2=13
T3=12
Thermocouple
S0=11
S1=10
S2(ext)=8
S3(ext)=9
*/
// Extruder 1 - Thermistor 1
#define TEMP_0_PIN 15
// Extruder 2 - Thermistor 2
#define TEMP_2_PIN 14
// Extruder 3 - Thermistor 3
#define TEMP_3_PIN 13
// Heated bed - Thermistor 4
#define TEMP_1_PIN 12
#define THERMOCOUPLE_0_PIN 11
#define THERMOCOUPLE_1_PIN 10
#define THERMOCOUPLE_2_PIN 8
#define THERMOCOUPLE_3_PIN 9
// Beeper on AUX-4
#define BEEPER_PIN 61
#define SDSUPPORT 1 // sd card reader on board
//#define UI_DISPLAY_RS_PIN 32
//#define UI_DISPLAY_ENABLE_PIN 31
//#define UI_DISPLAY_D4_PIN 14
//#define UI_DISPLAY_D5_PIN 30
//#define UI_DISPLAY_D6_PIN 39
//#define UI_DISPLAY_D7_PIN 15
//buttons are directly attached using AUX-2
//// encoder A 59
//// encoder B 64
////encoder click 33 //the click
#define SCK_PIN 52
#define MISO_PIN 50
#define MOSI_PIN 51
#define E0_PINS ORIG_E0_STEP_PIN,ORIG_E0_DIR_PIN,ORIG_E0_ENABLE_PIN,
#define E1_PINS ORIG_E1_STEP_PIN,ORIG_E1_DIR_PIN,ORIG_E1_ENABLE_PIN,
#define E2_PINS ORIG_E2_STEP_PIN,ORIG_E2_DIR_PIN,ORIG_E2_ENABLE_PIN,
#endif
I really didnt understand the dev part, but I understand now I think
So I downloaded this version, but nothing on the screen.
I see what is going wrong I think:.
I wrote that I have the Megatronics V3 board and GLCD screen.
In the dev version is only mentioned pins belonging to the V3.0 board, but I have V3.1 board
As I understand, SPI is a serial comm bus, instead of the straight pins in the V3.0 board.
What profile is going to used I dont understand, while in more then one places in DisplayList.h are more places the same motherboard (703) is mentioned (all after "#elif"), but some are taken over, others are not ??
So I tried to copy a LCD setup from another board and I got some tekst on the screen
It is still not correct, since I dont understand well what parameters to use.
E.g. the SD card on the screen is not correct: it detects a SD card (message in the display), but then the system "freezes".
In the listing (from the manual in my previous post) I gave the settings in the manual, but what parameters do I have to use with what name?
Specialli the SPI settings of course, like MISO (50), MOSI (51), SCK (52), CS SD (SS pin, 53),
but also the Tactile button (34)?
Underneath the settings I used (but not correct, but as a start):
#elif MOTHERBOARD == 703 // Megatronics v3.0
//Undefined by FrankV for Megatronics v3.1
//#define UI_DISPLAY_RS_PIN 32
//#define UI_DISPLAY_RW_PIN -1
#define UI_DISPLAY_ENABLE_PIN 31
//#define UI_DISPLAY_D0_PIN -1
//#define UI_DISPLAY_D1_PIN -1
//#define UI_DISPLAY_D2_PIN -1
//#define UI_DISPLAY_D3_PIN -1
#define UI_DISPLAY_D4_PIN 14
#define UI_DISPLAY_D5_PIN 30
#define UI_DISPLAY_D6_PIN 39
#define UI_DISPLAY_D7_PIN 15
#define UI_ENCODER_A 45
#define UI_ENCODER_B 44
#define UI_ENCODER_CLICK 33
#define UI_INVERT_MENU_DIRECTION 1
#define UI_RESET_PIN 34 //Changed for megatronic v3.1+GLCD screen
// Added FrankV for Megatronics v3.1
#define SDCARDDETECT 35 //This is not correct - D35=Keypad shift LD??
#define UI_HAS_KEYS 1
#define UI_HAS_BACK_KEY 0
#define UI_DISPLAY_TYPE DISPLAY_U8G
//#define U8GLIB_ST7920
//#define U8GLIB_ST7565_NHD_C2832_HW_SPI
#define UI_LCD_WIDTH 128
#define UI_LCD_HEIGHT 64
//select font size
#define UI_FONT_6X10 //default font
#define UI_FONT_WIDTH 6
#define UI_FONT_HEIGHT 10
#define UI_FONT_SMALL_HEIGHT 7
#define UI_FONT_DEFAULT repetier_6x10
#define UI_FONT_SMALL repetier_5x7
#define UI_FONT_SMALL_WIDTH 5 //smaller font for status display
#undef UI_ANIMATION
#define UI_ANIMATION 0 // Animations are too slow
//calculate rows and cols available with current font
#define UI_COLS (UI_LCD_WIDTH/UI_FONT_SMALL_WIDTH)
#define UI_ROWS (UI_LCD_HEIGHT/UI_FONT_HEIGHT)
#define UI_DISPLAY_CHARSET 3
#define UI_INVERT_MENU_DIRECTION 0
#undef UI_ENCODER_SPEED
#define UI_ENCODER_SPEED 2
//#define SDCARDDETECT -1
//#define UI_DISPLAY_RW_PIN -1
//#define UI_ROTATE_180
#define BEEPER_TYPE 1
// SCK Pin:
#define UI_DISPLAY_D4_PIN 52 //Not possible, since is D4 is D14??
// Mosi Pin:
#define UI_DISPLAY_ENABLE_PIN 51
// What about MISO (50)??
// What about SCK (52) - what is SCK??
// What about CS SD (SS pin, D53)??
// CD Pin:
#define UI_DISPLAY_RS_PIN 56
//einde FrankV
It does indeed stop there with an error, so "my code" is included.
I'm sure it is SPI now with the v3.1 board. It is written in the manual too:
https://reprapworld.nl/documentation/graphicallcd_10.pdf
https://reprapworld.com/documentation/datasheet megatronicsv3.pdf
(these are the manuals I got the portsettings wrong - but they are not correct in that manual I think)
I have a LCD-test programm too, that describes the SPI ("test software") at https://reprapworld.nl/products/printers_printing/autonoom_printen/graphical_lcd_screen_v1_0/ :
I can "translate" te encoder part to Repetier parameters, but the others are a complete riddle to me:
From SPI.h:
#ifdef MEGATRONICS
/* megatronics */
#define SDSC 53
#define SW_BACK 34
#define SW_ENC 33
#define ENCA 44
#define ENCB 45
#define LCDSC 56
From SD.h (I suppose for the SD card):
#ifdef MEGATRONICS
/* megatronics */
#define SDSC 53
#define SW_BACK 34
#define SW_ENC 33
#define ENCA 44
#define ENCB 45
#define LCDSC 56
U8GLIB_ST7920_128X64_4X u8g(LCDSC);
#define SERIALTYPE Serial
#endif
problem smart adapter . I removed the plastic housing from the smart adapter and changed the orientation.
uniconfig.h //#define U8GLIB_ST7565_NHD_C2832_HW_SPI // unmarked
there is an image on my screen but no menu.
Are you now using hardware SPI? That can easily cause interference with sd card. Maybe that causes the hang.In next firmeare version we therefore want to switch completely to arduino SPI library instead of having a mix.