Skip to content

Commit

Permalink
Support SMART RAMPS 1.4 with Mega2560 (#21059)
Browse files Browse the repository at this point in the history
  • Loading branch information
kpishere authored and thinkyhead committed Apr 29, 2021
1 parent 4d75c2e commit 54f4015
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions Marlin/src/pins/sam/pins_RAMPS_SMART.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@
* (Search the web for "Arduino DUE Board Pinout" to see the correct header.)
*/

#if NOT_TARGET(__SAM3X8E__)
#error "Oops! Select 'Arduino Due' in 'Tools > Board.'"
#if NOT_TARGET(__SAM3X8E__, __AVR_ATmega2560__)
#error "Oops! Select 'Arduino Due' or 'Mega 2560' in 'Tools > Board.'"
#endif

#define BOARD_INFO_NAME "RAMPS-SMART"
Expand All @@ -72,6 +72,18 @@
#define I2C_EEPROM
#define MARLIN_EEPROM_SIZE 0x1000

#define SDA_PIN 20
#define SCL_PIN 21

// See EEPROM device datasheet for the following values. These are for 24xx256
#define EEPROM_SERIAL_ADDR 0x50 // 7 bit i2c address (without R/W bit)
#define EEPROM_PAGE_SIZE 64 // page write buffer size
#define EEPROM_PAGE_WRITE_TIME 7 // page write time in milliseconds (docs say 5ms but that is too short)

#define TWI_CLOCK_FREQ 400000
#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
#define EEPROM_AVAILABLE EEPROM_I2C

#define RESET_PIN 42 // Resets the board if the jumper is attached

//
Expand All @@ -97,6 +109,7 @@
//
// LCD / Controller
//

// Support for AZSMZ 12864 LCD with SD Card 3D printer smart controller control panel
#if ENABLED(AZSMZ_12864)
#define BEEPER_PIN 66 // Smart RAMPS 1.42 pinout diagram on RepRap WIKI erroneously says this should be pin 65
Expand Down

0 comments on commit 54f4015

Please sign in to comment.