Merge pull request #3092 from thinkyhead/rc_2860_printrbot_lcd

Fix Printrboard with LCD (redo)
This commit is contained in:
Scott Lahteine 2016-03-06 00:14:29 -08:00
commit 1e20949afb
4 changed files with 34 additions and 9 deletions

View File

@ -631,6 +631,13 @@ void servo_init() {
* status LEDs * status LEDs
*/ */
void setup() { void setup() {
#ifdef DISABLE_JTAG
// Disable JTAG on AT90USB chips to free up pins for IO
MCUCR = 0x80;
MCUCR = 0x80;
#endif
setup_killpin(); setup_killpin();
setup_filrunoutpin(); setup_filrunoutpin();
setup_powerhold(); setup_powerhold();

View File

@ -15,6 +15,9 @@
#define LARGE_FLASH true #define LARGE_FLASH true
// Disable JTAG pins so they can be used for the Extrudrboard
#define DISABLE_JTAG true
#define X_STEP_PIN 0 #define X_STEP_PIN 0
#define X_DIR_PIN 1 #define X_DIR_PIN 1
#define X_ENABLE_PIN 39 #define X_ENABLE_PIN 39
@ -64,7 +67,7 @@
////LCD Pin Setup//// ////LCD Pin Setup////
#define SDPOWER -1 #define SDPOWER -1
#define SDSS 8 #define SDSS 26
#define LED_PIN -1 #define LED_PIN -1
#define PS_ON_PIN -1 #define PS_ON_PIN -1
#define KILL_PIN -1 #define KILL_PIN -1
@ -79,15 +82,29 @@
#if ENABLED(ULTRA_LCD) && ENABLED(NEWPANEL) #if ENABLED(ULTRA_LCD) && ENABLED(NEWPANEL)
//we have no buzzer installed //we have no buzzer installed
#define BEEPER_PIN -1 #define BEEPER_PIN -1
//LCD Pins //LCD Pins
#if ENABLED(LCD_I2C_PANELOLU2) #if ENABLED(LCD_I2C_PANELOLU2)
#define BTN_EN1 27 //RX1 - fastio.h pin mapping 27 #define BTN_EN1 27 //RX1 - fastio.h pin mapping 27
#define BTN_EN2 26 //TX1 - fastio.h pin mapping 26 #define BTN_EN2 26 //TX1 - fastio.h pin mapping 26
#define BTN_ENC 43 //A3 - fastio.h pin mapping 43 #define BTN_ENC 43 //A3 - fastio.h pin mapping 43
#define SDSS 40 //use SD card on Panelolu2 (Teensyduino pin mapping) #define SDSS 40 //use SD card on Panelolu2 (Teensyduino pin mapping)
#else
#define BTN_EN1 16
#define BTN_EN2 17
#define BTN_ENC 18//the click
#endif // LCD_I2C_PANELOLU2 #endif // LCD_I2C_PANELOLU2
//not connected to a pin //not connected to a pin
#define SD_DETECT_PIN -1 #define SD_DETECT_PIN -1
#define LCD_PINS_RS 9
#define LCD_PINS_ENABLE 8
#define LCD_PINS_D4 7
#define LCD_PINS_D5 6
#define LCD_PINS_D6 5
#define LCD_PINS_D7 4
#endif // ULTRA_LCD && NEWPANEL #endif // ULTRA_LCD && NEWPANEL
#if ENABLED(VIKI2) || ENABLED(miniVIKI) #if ENABLED(VIKI2) || ENABLED(miniVIKI)
@ -104,7 +121,6 @@
#define SDSS 45 #define SDSS 45
#define SD_DETECT_PIN -1 // FastIO (Manual says 72 I'm not certain cause I can't test) #define SD_DETECT_PIN -1 // FastIO (Manual says 72 I'm not certain cause I can't test)
#if ENABLED(TEMP_STAT_LEDS) #if ENABLED(TEMP_STAT_LEDS)
#define STAT_LED_RED 12 //Non-FastIO #define STAT_LED_RED 12 //Non-FastIO
#define STAT_LED_BLUE 10 //Non-FastIO #define STAT_LED_BLUE 10 //Non-FastIO

View File

@ -887,12 +887,14 @@ void tp_init() {
SET_OUTPUT(HEATER_BED_PIN); SET_OUTPUT(HEATER_BED_PIN);
#endif #endif
#if HAS_FAN #if HAS_FAN
SET_OUTPUT(FAN_PIN); #if ENABLED(FAST_PWM_FAN) || ENABLED(FAN_SOFT_PWM)
#if ENABLED(FAST_PWM_FAN) SET_OUTPUT(FAN_PIN);
setPwmFrequency(FAN_PIN, 1); // No prescaling. Pwm frequency = F_CPU/256/8 #if ENABLED(FAST_PWM_FAN)
#endif setPwmFrequency(FAN_PIN, 1); // No prescaling. Pwm frequency = F_CPU/256/8
#if ENABLED(FAN_SOFT_PWM) #endif
soft_pwm_fan = fanSpeedSoftPwm / 2; #if ENABLED(FAN_SOFT_PWM)
soft_pwm_fan = fanSpeedSoftPwm / 2;
#endif
#endif #endif
#endif #endif

View File

@ -1584,7 +1584,7 @@ void lcd_init() {
#endif//!NEWPANEL #endif//!NEWPANEL
#if ENABLED(SDSUPPORT) && PIN_EXISTS(SD_DETECT) #if ENABLED(SDSUPPORT) && PIN_EXISTS(SD_DETECT)
pinMode(SD_DETECT_PIN, INPUT); SET_INPUT(SD_DETECT_PIN);
WRITE(SD_DETECT_PIN, HIGH); WRITE(SD_DETECT_PIN, HIGH);
lcd_sd_status = 2; // UNKNOWN lcd_sd_status = 2; // UNKNOWN
#endif #endif