Unify AVR90USB: Pins remap to Arduino
This commit is contained in:
161
Marlin/pins_TEENSYLU.h
Normal file → Executable file
161
Marlin/pins_TEENSYLU.h
Normal file → Executable file
@ -21,54 +21,46 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* rev B 30 DEC 2016
|
||||
* Rev C 2 JUN 2017
|
||||
*
|
||||
* The original version of this file did NOT result in a useful program because:
|
||||
* 1. The pin numbers assumed that the "#define AT90USBxx_TEENSYPP_ASSIGNMENTS" line
|
||||
* in FASTIO.h was commented out. There wasn't an Arduino IDE 1.6.x extension/package
|
||||
* that supported this pin map so the latest Marlin wouldn't compile.
|
||||
* 2. The silkscreen for the four end stops don't agree with the schematic. Activating
|
||||
* the X endstop would tell the software that the Y endstop just went active.
|
||||
* 3. The thermistor inputs also had heater names assigned to them. The result was
|
||||
* thermistor inputs that were set to digital outputs.
|
||||
* Converted to Arduino pin numbering
|
||||
*/
|
||||
|
||||
/**
|
||||
* There are two Arduino IDE extensions that are compatible with this board
|
||||
* and with the mainstream Marlin software. All have been used with Arduino 1.6.12
|
||||
*
|
||||
* Rev B corrects the above problems by:
|
||||
* 1. The "Marlin_AT90USB" extension/package was developed. This extension enables the
|
||||
* latest Marlin software to compile using Arduino IDE 1.6.x and 1.80.
|
||||
* 2. The endstop pin numbers in this file were changed to match the silkscreen. This
|
||||
* makes it a little confusing when trying to correlate the schematic with the pin
|
||||
* numbers used in this file.
|
||||
* 3. The offending heater names were deleted.
|
||||
* Teensyduino - http://www.pjrc.com/teensy/teensyduino.html
|
||||
* Select Teensy++ 2.0 in Arduino IDE from the 'Tools -> Boards' menu
|
||||
*
|
||||
* To create a useable image for Teensylu do the following:
|
||||
* a) Install the Marlin_AT90USB extension with either of the following methods:
|
||||
* Automatic - paste this URL into preferences and then use Boards manager
|
||||
* https://rawgit.com/Bob-the-Kuhn/Marlin_AT90USB/master/package_MARLIN_AT90USB_index.json
|
||||
* Manual:
|
||||
* 1. Copy the following URL into Go to "https://github.com/Bob-the-Kuhn/Marlin_AT90USB",
|
||||
* click on the "Clone or Download" button and then click on "Download ZIP" button.
|
||||
* 2. Unzip the file, find the "Marlin_AT90USB" directory and then copy it to the
|
||||
* hardware directory in Arduino. The Arduino hardware directory will probably be
|
||||
* located in a path similar to this: C:\Program Files (x86)\Arduino\hardware
|
||||
* b) Connect the USBtinyISP to the board.
|
||||
* c) In the Arduino IDE select the "AT90USB1286_STANDARD" board in the of the "Marlin_AT90USB"
|
||||
* section and select the "USBtinyISP" programmer.
|
||||
* d) In the Arduino IDE click on "burn bootloader". Don't worry about the "verify
|
||||
* failed at 1F000" error message.
|
||||
* e) The USBtinyISP programmer is no longer needed. Remove it.
|
||||
* f) In FASTIO.h comment out the "#define AT90USBxx_TEENSYPP_ASSIGNMENTS" line.
|
||||
* g) To upload a sketch do the following:
|
||||
* 1. remove the jumper
|
||||
* 2. press reset
|
||||
* 3. click on the "upload" button in the Arduino IDE
|
||||
* 4. wait until the upload finishes (less than a minute)
|
||||
* 5. put the jumper back on
|
||||
* 6. press the reset button
|
||||
* Installation instructions are at the above URL. Don't bother loading the
|
||||
* libraries - they are not used with the Marlin software.
|
||||
*
|
||||
* Printrboard - https://github.com/scwimbush/Printrboard-HID-Arduino-IDE-Support
|
||||
* This is basically Teensyduino but with a bootloader that can handle image sizes
|
||||
* larger than 64K.
|
||||
*
|
||||
* NOTE - the "Marlin_AT90USB" pin maps make PWM0A available rather than the usual PWM1C.
|
||||
* These PWMs share the same physical pin. Marlin uses TIMER1 to generate
|
||||
* interrupts and sets it up such that PWM1A, PWM1B & PWM1C can't be used.
|
||||
* Installation:
|
||||
*
|
||||
* 1. Go to the above URL, click on the "Clone or Download" button and then
|
||||
* click on "Download ZIP" button.
|
||||
* 2. Unzip the file, find the "printrboard" directory and then copy it to the
|
||||
* hardware directory in Arduino. The Arduino hardware directory will probably
|
||||
* be located in a path similar to this: C:\Program Files (x86)\Arduino\hardware.
|
||||
* 3. Restart Arduino.
|
||||
* 4. Select "Printrboard" from the 'Tools -> Boards' menu.
|
||||
*
|
||||
* Teensyduino is the most popular option. Printrboard is used if your board doesn't have
|
||||
* the Teensyduino bootloader on it.
|
||||
*/
|
||||
|
||||
/**
|
||||
* To burn the bootloader that comes with Printrboard:
|
||||
*
|
||||
* 1. Connect your programmer to the board.
|
||||
* 2. In the Arduino IDE select "Printrboard" and then select the programmer.
|
||||
* 3. In the Arduino IDE click on "burn bootloader". Don't worry about the "verify failed at 1F000" error message.
|
||||
* 4. The programmer is no longer needed. Remove it.
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -81,13 +73,8 @@
|
||||
* The pin assignments in this file match the silkscreen.
|
||||
*/
|
||||
|
||||
|
||||
#if !defined(__AVR_AT90USB1286__) && !defined(__AVR_AT90USB1286P__)
|
||||
#error "Oops! Make sure you have 'AT90USB1286_STANDARD' selected from the 'Tools -> Boards' menu."
|
||||
#endif
|
||||
|
||||
#if ENABLED(AT90USBxx_TEENSYPP_ASSIGNMENTS)
|
||||
#error "please disable (comment out) the AT90USBxx_TEENSYPP_ASSIGNMENTS flag in FASTIO.h "
|
||||
#error "Oops! Make sure you have 'Teensy++ 2.0' or 'Printrboard' selected from the 'Tools -> Boards' menu."
|
||||
#endif
|
||||
|
||||
#define BOARD_NAME "Teensylu"
|
||||
@ -97,60 +84,60 @@
|
||||
|
||||
|
||||
//
|
||||
// Limit Switche definitions that match the SCHEMATIC
|
||||
// Limit Switch definitions that match the SCHEMATIC
|
||||
//
|
||||
//#define X_STOP_PIN 13
|
||||
//#define Y_STOP_PIN 14
|
||||
//#define Z_STOP_PIN 15
|
||||
//#define E_STOP_PIN 36
|
||||
//#define X_STOP_PIN 25 // B5
|
||||
//#define Y_STOP_PIN 26 // B6
|
||||
//#define Z_STOP_PIN 27 // B7
|
||||
//#define E_STOP_PIN 36 // E4
|
||||
|
||||
|
||||
//
|
||||
// Limit Switch definitions that match the SILKSCREEN
|
||||
//
|
||||
#define X_STOP_PIN 14
|
||||
#define Y_STOP_PIN 15
|
||||
#define Z_STOP_PIN 36
|
||||
//#define E_STOP_PIN 13
|
||||
#define X_STOP_PIN 26 // B6
|
||||
#define Y_STOP_PIN 27 // B7
|
||||
#define Z_STOP_PIN 36 // E4
|
||||
//#define E_STOP_PIN 25 // B5
|
||||
|
||||
//
|
||||
// Steppers
|
||||
//
|
||||
#define X_STEP_PIN 0
|
||||
#define X_DIR_PIN 1
|
||||
#define X_ENABLE_PIN 39
|
||||
#define X_STEP_PIN 28 // A0
|
||||
#define X_DIR_PIN 29 // A1
|
||||
#define X_ENABLE_PIN 19 // E7
|
||||
|
||||
#define Y_STEP_PIN 2
|
||||
#define Y_DIR_PIN 3
|
||||
#define Y_ENABLE_PIN 38
|
||||
#define Y_STEP_PIN 30 // A2
|
||||
#define Y_DIR_PIN 31 // A3
|
||||
#define Y_ENABLE_PIN 18 // E6
|
||||
|
||||
#define Z_STEP_PIN 4
|
||||
#define Z_DIR_PIN 5
|
||||
#define Z_ENABLE_PIN 23
|
||||
|
||||
#define E0_STEP_PIN 6
|
||||
#define E0_DIR_PIN 7
|
||||
#define E0_ENABLE_PIN 19
|
||||
#define Z_STEP_PIN 32 // A4
|
||||
#define Z_DIR_PIN 33 // A5
|
||||
#define Z_ENABLE_PIN 17 // C7
|
||||
|
||||
#define E0_STEP_PIN 34 // A6
|
||||
#define E0_DIR_PIN 35 // A7
|
||||
#define E0_ENABLE_PIN 13 // C3
|
||||
|
||||
//
|
||||
// Temperature Sensors
|
||||
|
||||
#define TEMP_0_PIN 7 // Analog Input (Extruder)
|
||||
#define TEMP_BED_PIN 6 // Analog Input (Bed)
|
||||
//
|
||||
#define TEMP_0_PIN 7 // Analog Input (Extruder)
|
||||
#define TEMP_BED_PIN 6 // Analog Input (Bed)
|
||||
|
||||
//
|
||||
// Heaters / Fans
|
||||
//
|
||||
#define HEATER_0_PIN 21 // Extruder
|
||||
#define HEATER_BED_PIN 20
|
||||
#define HEATER_0_PIN 15 // C5 PWM3B - Extruder
|
||||
#define HEATER_BED_PIN 14 // C4 PWM3C
|
||||
|
||||
#define FAN_PIN 22
|
||||
#define FAN_PIN 16 // C6 PWM3A
|
||||
|
||||
//
|
||||
// Misc. Functions
|
||||
//
|
||||
#define SDSS 8
|
||||
#define CASE_LIGHT_PIN 24
|
||||
#define SDSS 20 // B0 JP31-6
|
||||
#define CASE_LIGHT_PIN 0 // D0 IO-14 PWM0B
|
||||
|
||||
//
|
||||
// LCD / Controller
|
||||
@ -160,11 +147,11 @@
|
||||
#define BEEPER_PIN -1
|
||||
|
||||
#if ENABLED(LCD_I2C_PANELOLU2)
|
||||
#define BTN_EN1 27
|
||||
#define BTN_EN2 26
|
||||
#define BTN_ENC 43
|
||||
#define SDSS 40 // use SD card on Panelolu2
|
||||
#endif // LCD_I2C_PANELOLU2
|
||||
#define BTN_EN1 3 // D3 IO-8
|
||||
#define BTN_EN2 2 // D2 IO-10
|
||||
#define BTN_ENC 41 // F3 IO-7
|
||||
#define SDSS 38 // F0 IO-13 use SD card on Panelolu2
|
||||
#endif
|
||||
|
||||
#define SD_DETECT_PIN -1
|
||||
|
||||
@ -173,6 +160,6 @@
|
||||
//
|
||||
// M3/M4/M5 - Spindle/Laser Control
|
||||
//
|
||||
#define SPINDLE_LASER_PWM_PIN 12 // MUST BE HARDWARE PWM
|
||||
#define SPINDLE_LASER_ENABLE_PIN 41 // Pin should have a pullup!
|
||||
#define SPINDLE_DIR_PIN 42
|
||||
#define SPINDLE_LASER_PWM_PIN 24 // B4 IO-3 PWM2A - MUST BE HARDWARE PWM
|
||||
#define SPINDLE_LASER_ENABLE_PIN 39 // F1 IO-11 - Pin should have a pullup!
|
||||
#define SPINDLE_DIR_PIN 40 // F2 IO-9
|
||||
|
Reference in New Issue
Block a user