Преглед изворни кода

Support SMART RAMPS 1.4 with Mega2560 (#21059)

kpishere пре 4 година
родитељ
комит
7069d03ab2
No account linked to committer's email address
1 измењених фајлова са 15 додато и 2 уклоњено
  1. 15
    2
      Marlin/src/pins/sam/pins_RAMPS_SMART.h

+ 15
- 2
Marlin/src/pins/sam/pins_RAMPS_SMART.h Прегледај датотеку

60
  * (Search the web for "Arduino DUE Board Pinout" to see the correct header.)
60
  * (Search the web for "Arduino DUE Board Pinout" to see the correct header.)
61
  */
61
  */
62
 
62
 
63
-#if NOT_TARGET(__SAM3X8E__)
64
-  #error "Oops! Select 'Arduino Due' in 'Tools > Board.'"
63
+#if NOT_TARGET(__SAM3X8E__, __AVR_ATmega2560__)
64
+  #error "Oops! Select 'Arduino Due' or 'Mega 2560' in 'Tools > Board.'"
65
 #endif
65
 #endif
66
 
66
 
67
 #define BOARD_INFO_NAME "RAMPS-SMART"
67
 #define BOARD_INFO_NAME "RAMPS-SMART"
72
 #define I2C_EEPROM
72
 #define I2C_EEPROM
73
 #define MARLIN_EEPROM_SIZE                0x1000
73
 #define MARLIN_EEPROM_SIZE                0x1000
74
 
74
 
75
+#define SDA_PIN                               20
76
+#define SCL_PIN                               21
77
+
78
+// See EEPROM device datasheet for the following values. These are for 24xx256
79
+#define EEPROM_SERIAL_ADDR                  0x50  // 7 bit i2c address (without R/W bit)
80
+#define EEPROM_PAGE_SIZE                      64  // page write buffer size
81
+#define EEPROM_PAGE_WRITE_TIME                 7  // page write time in milliseconds (docs say 5ms but that is too short)
82
+
83
+#define TWI_CLOCK_FREQ                    400000
84
+#define EEPROM_ADDRSZ_BYTES TWI_MMR_IADRSZ_2_BYTE // TWI_MMR_IADRSZ_1_BYTE for 1 byte, or TWI_MMR_IADRSZ_2_BYTE for 2 byte
85
+#define EEPROM_AVAILABLE              EEPROM_I2C
86
+
75
 #define RESET_PIN                             42  // Resets the board if the jumper is attached
87
 #define RESET_PIN                             42  // Resets the board if the jumper is attached
76
 
88
 
77
 //
89
 //
97
 //
109
 //
98
 // LCD / Controller
110
 // LCD / Controller
99
 //
111
 //
112
+
100
 // Support for AZSMZ 12864 LCD with SD Card 3D printer smart controller control panel
113
 // Support for AZSMZ 12864 LCD with SD Card 3D printer smart controller control panel
101
 #if ENABLED(AZSMZ_12864)
114
 #if ENABLED(AZSMZ_12864)
102
   #define BEEPER_PIN                          66  // Smart RAMPS 1.42 pinout diagram on RepRap WIKI erroneously says this should be pin 65
115
   #define BEEPER_PIN                          66  // Smart RAMPS 1.42 pinout diagram on RepRap WIKI erroneously says this should be pin 65

Loading…
Откажи
Сачувај