Browse Source

Merge pull request #467 from kiyoshigawa/Marlin_v1

Support for Elefu RA Board
ErikZalm 11 years ago
parent
commit
e36d31a3b7
3 changed files with 898 additions and 748 deletions
  1. 12
    0
      Marlin/Configuration.h
  2. 129
    0
      Marlin/pins.h
  3. 757
    748
      Marlin/ultralcd_implementation_hitachi_HD44780.h

+ 12
- 0
Marlin/Configuration.h View File

48
 // 90 = Alpha OMCA board
48
 // 90 = Alpha OMCA board
49
 // 91 = Final OMCA board
49
 // 91 = Final OMCA board
50
 // 301 = Rambo
50
 // 301 = Rambo
51
+// 21 = Elefu Ra Board (v3)
51
 
52
 
52
 #ifndef MOTHERBOARD
53
 #ifndef MOTHERBOARD
53
 #define MOTHERBOARD 7
54
 #define MOTHERBOARD 7
361
 //#define REPRAPWORLD_KEYPAD
362
 //#define REPRAPWORLD_KEYPAD
362
 //#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0 // how much should be moved when a key is pressed, eg 10.0 means 10mm per click
363
 //#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0 // how much should be moved when a key is pressed, eg 10.0 means 10mm per click
363
 
364
 
365
+// The Elefu RA Board Control Panel
366
+// http://www.elefu.com/index.php?route=product/product&product_id=53
367
+// REMEMBER TO INSTALL LiquidCrystal_I2C.h in your ARUDINO library folder: https://github.com/kiyoshigawa/LiquidCrystal_I2C
368
+//#define RA_CONTROL_PANEL
369
+
364
 //automatic expansion
370
 //automatic expansion
365
 #if defined (REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
371
 #if defined (REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
366
  #define DOGLCD
372
  #define DOGLCD
377
   #define NEWPANEL
383
   #define NEWPANEL
378
   #define ULTIPANEL
384
   #define ULTIPANEL
379
 #endif
385
 #endif
386
+#if defined(RA_CONTROL_PANEL)
387
+ #define ULTIPANEL
388
+ #define NEWPANEL
389
+ #define LCD_I2C_TYPE_PCA8574
390
+ #define LCD_I2C_ADDRESS 0x27   // I2C Address of the port expander
391
+#endif
380
 
392
 
381
 //I2C PANELS
393
 //I2C PANELS
382
 
394
 

+ 129
- 0
Marlin/pins.h View File

53
 
53
 
54
 #endif /* 99 */
54
 #endif /* 99 */
55
 
55
 
56
+
56
 /****************************************************************************************
57
 /****************************************************************************************
57
 * Gen7 v1.1, v1.2, v1.3 pin assignment
58
 * Gen7 v1.1, v1.2, v1.3 pin assignment
58
 *
59
 *
572
 #endif
573
 #endif
573
 
574
 
574
 /****************************************************************************************
575
 /****************************************************************************************
576
+* Elefu RA Board Pin Assignments
577
+*
578
+****************************************************************************************/
579
+#if MOTHERBOARD == 21
580
+#define	KNOWN_BOARD 1
581
+
582
+#ifndef __AVR_ATmega2560__
583
+ #error Oops!  Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu.
584
+#endif
585
+
586
+
587
+#define X_STEP_PIN		     49
588
+#define X_DIR_PIN			     13
589
+#define X_ENABLE_PIN		   48
590
+#define X_MIN_PIN			     35
591
+#define X_MAX_PIN			     -1 //34
592
+
593
+#define Y_STEP_PIN         11
594
+#define Y_DIR_PIN          9
595
+#define Y_ENABLE_PIN       12
596
+#define Y_MIN_PIN          33
597
+#define Y_MAX_PIN          -1 //32
598
+
599
+#define Z_STEP_PIN         7
600
+#define Z_DIR_PIN          6
601
+#define Z_ENABLE_PIN       8
602
+#define Z_MIN_PIN          31
603
+#define Z_MAX_PIN          -1 //30
604
+
605
+#define E2_STEP_PIN        43
606
+#define E2_DIR_PIN         47
607
+#define E2_ENABLE_PIN      42
608
+
609
+#define E1_STEP_PIN        18
610
+#define E1_DIR_PIN         19
611
+#define E1_ENABLE_PIN      38
612
+
613
+#define E0_STEP_PIN        40
614
+#define E0_DIR_PIN         41
615
+#define E0_ENABLE_PIN      37
616
+
617
+#define SDPOWER            -1
618
+#define LED_PIN            -1 //Use +12V Aux port for LED Ring
619
+
620
+#define FAN_PIN            16 //5V PWM
621
+
622
+#define PS_ON_PIN          10 //Set to -1 if using a manual switch on the PWRSW Connector
623
+#define SLEEP_WAKE_PIN		 26 //This feature still needs work
624
+
625
+#define HEATER_0_PIN       45	//12V PWM1
626
+#define HEATER_1_PIN       46	//12V PWM2
627
+#define HEATER_2_PIN       17	//12V PWM3
628
+#define HEATER_BED_PIN     44	//DOUBLE 12V PWM
629
+#define TEMP_0_PIN         3	//ANALOG NUMBERING
630
+#define TEMP_1_PIN         2 	//ANALOG NUMBERING
631
+#define TEMP_2_PIN         1 	//ANALOG NUMBERING
632
+#define TEMP_BED_PIN       0	//ANALOG NUMBERING
633
+
634
+#define BEEPER 		         36
635
+
636
+#define KILL_PIN           -1
637
+
638
+// M240  Triggers a camera by emulating a Canon RC-1 Remote
639
+// Data from: http://www.doc-diy.net/photo/rc-1_hacked/
640
+#define PHOTOGRAPH_PIN     29
641
+
642
+#ifdef RA_CONTROL_PANEL
643
+
644
+  #define SDSS             53
645
+  #define SDCARDDETECT     28
646
+
647
+  #define BTN_EN1          14
648
+  #define BTN_EN2          39
649
+  #define BTN_ENC          15  //the click
650
+    
651
+  #define BLEN_C           2
652
+  #define BLEN_B           1
653
+  #define BLEN_A           0
654
+    
655
+  //encoder rotation values
656
+  #define encrot0          0
657
+  #define encrot1          2
658
+  #define encrot2          3
659
+  #define encrot3          1
660
+  
661
+#endif //RA_CONTROL_PANEL
662
+
663
+#ifdef RA_DISCO
664
+  //variables for which pins the TLC5947 is using
665
+  #define TLC_CLOCK_PIN    25
666
+  #define TLC_BLANK_PIN    23
667
+  #define TLC_XLAT_PIN     22
668
+  #define TLC_DATA_PIN     24
669
+
670
+  //We also need to define pin to port number mapping for the 2560 to match the pins listed above. If you change the TLC pins, update this as well per the 2560 datasheet!
671
+  //This currently only works with the RA Board.
672
+  #define TLC_CLOCK_BIT 3 //bit 3 on port A
673
+  #define TLC_CLOCK_PORT &PORTA //bit 3 on port A
674
+  
675
+  #define TLC_BLANK_BIT 1 //bit 1 on port A
676
+  #define TLC_BLANK_PORT &PORTA //bit 1 on port A
677
+
678
+  #define TLC_DATA_BIT 2 //bit 2 on port A
679
+  #define TLC_DATA_PORT &PORTA //bit 2 on port A
680
+
681
+  #define TLC_XLAT_BIT 0 //bit 0 on port A
682
+  #define TLC_XLAT_PORT &PORTA //bit 0 on port A
683
+
684
+  //change this to match your situation. Lots of TLCs takes up the arduino SRAM very quickly, so be careful 
685
+  //Leave it at at least 1 if you have enabled RA_LIGHTING
686
+  //The number of TLC5947 boards chained together for use with the animation, additional ones will repeat the animation on them, but are not individually addressable and mimic those before them. You can leave the default at 2 even if you only have 1 TLC5947 module.
687
+  #define NUM_TLCS 2 
688
+
689
+  //These TRANS_ARRAY values let you change the order the LEDs on the lighting modules will animate for chase functions. 
690
+  //Modify them according to your specific situation.
691
+  //NOTE: the array should be 8 long for every TLC you have. These defaults assume (2) TLCs.
692
+  #define TRANS_ARRAY {0, 1, 2, 3, 4, 5, 6, 7, 15, 14, 13, 12, 11, 10, 9, 8} //forwards
693
+  //#define TRANS_ARRAY {7, 6, 5, 4, 3, 2, 1, 0, 8, 9, 10, 11, 12, 13, 14, 15} //backwards
694
+#endif //RA_LIGHTING
695
+
696
+
697
+#endif /* Ra Board */
698
+
699
+
700
+/****************************************************************************************
575
 * Gen6 pin assignment
701
 * Gen6 pin assignment
576
 *
702
 *
577
 ****************************************************************************************/
703
 ****************************************************************************************/
1847
                         _E0_PINS _E1_PINS _E2_PINS             \
1973
                         _E0_PINS _E1_PINS _E2_PINS             \
1848
                         analogInputToDigitalPin(TEMP_0_PIN), analogInputToDigitalPin(TEMP_1_PIN), analogInputToDigitalPin(TEMP_2_PIN), analogInputToDigitalPin(TEMP_BED_PIN) }
1974
                         analogInputToDigitalPin(TEMP_0_PIN), analogInputToDigitalPin(TEMP_1_PIN), analogInputToDigitalPin(TEMP_2_PIN), analogInputToDigitalPin(TEMP_BED_PIN) }
1849
 #endif
1975
 #endif
1976
+
1977
+
1978
+

+ 757
- 748
Marlin/ultralcd_implementation_hitachi_HD44780.h
File diff suppressed because it is too large
View File


Loading…
Cancel
Save