Hello David,
i'm not sure if it is difficult to add some lcd-support to the RADDS-firmware? There is a free adapter on thingiverse with some documentation. I'm especially interested for a support of the reprapdiscount smart controller (20x4). What do you think?
Regards
Steffen
Reprapdiscount Smart Controller (20x4)
http://reprap.org/wiki/RepRapDiscount_Smart_Controller
RADDS2LCD:
http://www.thingiverse.com/thing:1740725
[[language]]
RADDS2LCD in Repetier-Firmware for DEV-version (1.x.x)
======================================================
Hardware
--------
Box Header: pin 1 = red conductor from ribbon cable -> side is marked with "rt" on RADDS2LCD.u / RADDS2LCD.o
on RADDS: red conductor towards MOS-FETs and screw terminals
Repetier.h
----------
at end of block beginning with:
##################################
#define NO_CONTROLLER 0
add these lines:
#########
#define CONTROLLER_RADDS_LCD_16X2 997
#define CONTROLLER_RADDS_LCD_20X4 998
#define CONTROLLER_RADDS_FGSC 999
Configuration.h
--------------
replace this:
#####################
#define FEATURE_CONTROLLER ...
by this:
######
/*
which display ???
- full graphics smart controller is tested!
- row / column display is NOT TESTED - use with own testing ;)
*/
//#define FEATURE_CONTROLLER CONTROLLER_RADDS_LCD_16X2 // RADDS2LCD -> LCD with 16 columns and 2 rows
//#define FEATURE_CONTROLLER CONTROLLER_RADDS_LCD_20X4 // RADDS2LCD -> LCD with 20 columns and 4 rows
#define FEATURE_CONTROLLER CONTROLLER_RADDS_FGSC // RADDS2LCD -> Full Graphics Smart Controller
ui.h
----
after these lines
#######
#if FEATURE_CONTROLLER == CONTROLLER_RAMBO
...
#endif
add these lines
###############
// RADDS + RADDS2LCD + Full Graphics Smart Controller / other 4-bit LCD
#if (FEATURE_CONTROLLER == CONTROLLER_RADDS_FGSC || FEATURE_CONTROLLER == CONTROLLER_RADDS_LCD_16X2 || FEATURE_CONTROLLER == CONTROLLER_RADDS_LCD_20X4)
#undef SDCARDDETECT
#define SDCARDDETECT -1
#undef SDSUPPORT
#define SDSUPPORT 1
#endif // FEATURE_CONTROLLER == CONTROLLER_RADDS_FGSC
DisplayList.h
------
before or after these lines:
###################
#if FEATURE_CONTROLLER == CONTROLLER_RADDS
#undef SDSS
...
void uiCheckSlowKeys(uint16_t &action) {}
#endif
add these lines
##############
#if (FEATURE_CONTROLLER == CONTROLLER_RADDS_FGSC || FEATURE_CONTROLLER == CONTROLLER_RADDS_LCD_16X2 || FEATURE_CONTROLLER == CONTROLLER_RADDS_LCD_20X4)
#undef SDSS
#define SDSS 10
#undef SPI_PIN
#define SPI_PIN 77
#undef SPI_CHAN
#define SPI_CHAN 0
#define UI_HAS_KEYS 1
#define UI_HAS_BACK_KEY 0
// decide which lcd is used
#if (FEATURE_CONTROLLER == CONTROLLER_RADDS_FGSC)
#define UI_DISPLAY_TYPE DISPLAY_U8G
#define U8GLIB_ST7920
#define UI_LCD_WIDTH 128
#define UI_LCD_HEIGHT 64
//select font size
#define UI_FONT_6X10 //default font
#ifdef UI_FONT_6X10
#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
#define UI_ANIMATION false // Animations are too slow
#endif
//calculate rows and cols available with current font
#define UI_COLS (UI_LCD_WIDTH/UI_FONT_WIDTH)
#define UI_ROWS (UI_LCD_HEIGHT/UI_FONT_HEIGHT)
#define UI_DISPLAY_CHARSET 3
#elif (FEATURE_CONTROLLER == CONTROLLER_RADDS_LCD_16X2)
#define UI_DISPLAY_TYPE DISPLAY_4BIT
#define UI_COLS 16
#define UI_ROWS 2
#else (FEATURE_CONTROLLER == CONTROLLER_RADDS_LCD_20X4)
#define UI_DISPLAY_TYPE DISPLAY_4BIT
#define UI_COLS 20
#define UI_ROWS 4
#endif
#define UI_DISPLAY_CHARSET 3
#define BEEPER_TYPE 1
#undef BEEPER_PIN
#define BEEPER_PIN 41
#define UI_DISPLAY_RS_PIN 42
#define UI_DISPLAY_RW_PIN -1
#define UI_DISPLAY_ENABLE_PIN 43
#define UI_DISPLAY_D0_PIN 44
#define UI_DISPLAY_D1_PIN 45
#define UI_DISPLAY_D2_PIN 46
#define UI_DISPLAY_D3_PIN 47
#define UI_DISPLAY_D4_PIN 44
#define UI_DISPLAY_D5_PIN 45
#define UI_DISPLAY_D6_PIN 46
#define UI_DISPLAY_D7_PIN 47
// swap these two numbers to invert rotary encoder scroll direction
#define UI_ENCODER_A 50
#define UI_ENCODER_B 52
#define UI_ENCODER_CLICK 48
#define UI_RESET_PIN -1
#define UI_DELAYPERCHAR 50
#define UI_INVERT_MENU_DIRECTION 0
#define UI_BUTTON_BACK 71 // -1
#ifdef UI_MAIN
void uiInitKeys() {
UI_KEYS_INIT_CLICKENCODER_LOW(UI_ENCODER_A, UI_ENCODER_B); // click encoder on pins 47 and 45\. Phase is connected with gnd for signals.
UI_KEYS_INIT_BUTTON_LOW(UI_ENCODER_CLICK); // push button, connects gnd to pin
UI_KEYS_INIT_BUTTON_LOW(UI_BUTTON_BACK);
}
void uiCheckKeys(uint16_t &action) {
UI_KEYS_CLICKENCODER_LOW(UI_ENCODER_A, UI_ENCODER_B); // click encoder on pins 47 and 45\. Phase is connected with gnd for signals.
UI_KEYS_BUTTON_LOW(UI_ENCODER_CLICK, UI_ACTION_OK); // push button, connects gnd to pin
UI_KEYS_BUTTON_LOW(UI_BUTTON_BACK, UI_ACTION_BACK);
}
inline void uiCheckSlowEncoder() {}
void uiCheckSlowKeys(uint16_t &action) {}
#endif
#endif // controller RADDS2LCD
DisplayList.h - (optional)
--------------------------
if you want to swap rotary encoder scroll direction (count clock / clockwise rotation)
then swap
##########################################
#if FEATURE_CONTROLLER == CONTROLLER_RADDS_FGSC
...
#define UI_ENCODER_A 52
#define UI_ENCODER_B 50
##########################################
to
##########################################
#if FEATURE_CONTROLLER == CONTROLLER_RADDS_FGSC
...
#define UI_ENCODER_A 50
#define UI_ENCODER_B 52
##########################################