Advertisement
Guest User

config.h

a guest
Sep 29th, 2016
23
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 24.70 KB
  1.  
  2. // Configuration for controller board.
  3. /***************************************************************************\
  4. *                                                                           *
  5. * 1. CPU                                                                    *
  6. *                                                                           *
  7. \***************************************************************************/
  8.  
  9. /** \def CPU_TYPE
  10.   CPU types a user should be able to choose from in configtool. All
  11.   commented out.
  12. */
  13. //#define CPU_TYPE lpc1114
  14.  
  15. /** \def CPU
  16.   CPU actually present on the board.
  17. */
  18. #define CPU                      lpc1114
  19.  
  20. /** \def F_CPU_OPT
  21.   CPU clock frequencies a user should be able to choose from in configtool.
  22.   All commented out.
  23. */
  24. //#define F_CPU_OPT 12000000UL
  25.  
  26. /** \def F_CPU
  27.   Actual CPU clock rate. #ifndef required for Arduino compatibility.
  28. */
  29. #ifndef F_CPU
  30. #define F_CPU                    12000000UL
  31. #endif
  32.  
  33. /** \def MOTHERBOARD
  34.   This is the motherboard, as opposed to the extruder. See extruder/ directory
  35.   for GEN3 extruder firmware.
  36. */
  37. #define MOTHERBOARD
  38.  
  39.  
  40. /***************************************************************************\
  41. *                                                                           *
  42. * 2. PINOUTS                                                                *
  43. *                                                                           *
  44. \***************************************************************************/
  45.  
  46. //#define TX_ENABLE_PIN            xxxx
  47. //#define RX_ENABLE_PIN            xxxx
  48.  
  49. #define X_STEP_PIN               PIO1_5
  50. #define X_DIR_PIN                PIO1_4
  51. #define X_MIN_PIN                PIO1_8
  52. //#define X_MAX_PIN                PIO1_8
  53. //#define X_ENABLE_PIN             xxxx
  54. //#define X_INVERT_DIR
  55. //#define X_INVERT_MIN
  56. //#define X_INVERT_MAX
  57. //#define X_INVERT_ENABLE
  58.  
  59. #define Y_STEP_PIN               PIO1_3
  60. #define Y_DIR_PIN                PIO1_2
  61. #define Y_MIN_PIN                PIO1_8
  62. //#define Y_MAX_PIN                PIO1_8
  63. //#define Y_ENABLE_PIN             xxxx
  64. //#define Y_INVERT_DIR
  65. //#define Y_INVERT_MIN
  66. //#define Y_INVERT_MAX
  67. //#define Y_INVERT_ENABLE
  68.  
  69. #define Z_STEP_PIN               PIO0_1
  70. #define Z_DIR_PIN                PIO0_2
  71. #define Z_MIN_PIN                PIO1_8
  72. //#define Z_MAX_PIN                PIO1_8
  73. //#define Z_ENABLE_PIN             xxxx
  74. //#define Z_INVERT_DIR
  75. //#define Z_INVERT_MIN
  76. //#define Z_INVERT_MAX
  77. //#define Z_INVERT_ENABLE
  78.  
  79. #define E_STEP_PIN               PIO0_3
  80. #define E_DIR_PIN                PIO0_7
  81. //#define E_ENABLE_PIN             xxxx
  82. //#define E_INVERT_DIR
  83. //#define E_INVERT_ENABLE
  84.  
  85. #define PS_ON_PIN                PIO0_4
  86. //#define PS_INVERT_ON
  87. //#define PS_MOSFET_PIN            xxxx
  88. #define STEPPER_ENABLE_PIN       PIO0_4
  89. #define STEPPER_INVERT_ENABLE
  90.  
  91. /** \def DEBUG_LED_PIN
  92.  
  93.   Enable flashing of a LED during motor stepping.
  94.  
  95.   Disabled by default. Uncommenting this makes the binary a few bytes larger
  96.   and adds a few cycles to the step timing interrrupt in timer.c. Also used
  97.   for precision profiling (profiling works even without actually having such
  98.   a LED in hardware), see
  99.   http://reprap.org/wiki/Teacup_Firmware#Doing_precision_profiling
  100. */
  101. //#define DEBUG_LED_PIN            PIO1_9
  102.  
  103. /** \def SD_CARD_SELECT_PIN
  104.  
  105.   Chip Select pin of the SD card.
  106.  
  107.   SD cards work over SPI and have a Chip Select or Slave Select (SS) pin.
  108.   Choose this pin according to where on the board your SD card adapter is
  109.   connected. Disabling this pin also disables SD card support and makes the
  110.   firmware binary about 4.5 kB smaller.
  111.  
  112.   Connecting a device to SPI actually uses 4 signal lines, the other three
  113.   pins are choosen by Teacup automatically.
  114. */
  115. //#define SD_CARD_SELECT_PIN       xxxx
  116.  
  117. /** \def MCP3008_SELECT_PIN
  118.  
  119.   Chip Select pin of the MCP3008 ADC.
  120.  
  121.   MCP3008/4 analog-digital converter works over SPI and has a Chip Select pin.
  122.   Choose this pin according to where the MCP3008 is connected. Setting this
  123.   pin is required only if at least one temperature sensor of type MCP3008 is
  124.   configured. Else it's ignored.
  125. */
  126. //#define MCP3008_SELECT_PIN       xxxx
  127.  
  128.  
  129. /***************************************************************************\
  130. *                                                                           *
  131. * 3. TEMPERATURE SENSORS                                                    *
  132. *                                                                           *
  133. \***************************************************************************/
  134.  
  135. #ifndef DEFINE_TEMP_SENSOR
  136.   #define DEFINE_TEMP_SENSOR(...)
  137. #endif
  138.  
  139. /** \def TEMP_MAX6675 TEMP_THERMISTOR TEMP_AD595 TEMP_PT100 TEMP_INTERCOM
  140.     \def TEMP_MCP3008
  141.  
  142.   Which temperature sensor types are you using? Leave all used ones
  143.   uncommented, comment out all others to save binary size and enhance
  144.   performance.
  145. */
  146. //#define TEMP_MAX6675
  147. #define TEMP_THERMISTOR
  148. //#define TEMP_AD595
  149. //#define TEMP_PT100
  150. //#define TEMP_INTERCOM
  151. //#define TEMP_MCP3008
  152.  
  153. /** \def TEMP_SENSOR_PIN
  154.   Temperature sensor pins a user should be able to choose from in configtool.
  155.   All commented out.
  156. */
  157. //#define TEMP_SENSOR_PIN PIO1_0
  158. //#define TEMP_SENSOR_PIN PIO1_1
  159.  
  160. /** \def DEFINE_TEMP_SENSOR
  161.   Define your temperature sensors here. One line for each sensor, only
  162.   limited by the number of available ATmega pins.
  163.  
  164.   Name must match the name of the corresponding heater. If a heater "extruder"
  165.   exists, a temperature sensor of that name has to exist as well. Same for
  166.   heater "bed". There can be one sensor without corresponding heater, name it
  167.   "noheater".
  168.  
  169.   Types are same as TEMP_ list above - TT_MAX6675, TT_THERMISTOR, TT_AD595,
  170.   TT_PT100, TT_INTERCOM, TT_MCP3008. See list in temp.c.
  171.  
  172.   The "additional" field is used for TT_THERMISTOR and TT_MCP3008 only. It
  173.   defines the name of the table(s) in thermistortable.h to use. This name is
  174.   arbitrary, often used names include THERMISTOR_EXTRUDER and THERMISTOR_BED.
  175.   Also, several sensors can share the same table, which saves binary size.
  176.  
  177.   For a GEN3 set temp_type to TT_INTERCOM and temp_pin to AIO0. The pin
  178.   won't be used in this case.
  179. */
  180. //DEFINE_TEMP_SENSORS_START
  181. //                 name      type           pin    additional
  182. DEFINE_TEMP_SENSOR(extruder, TT_THERMISTOR, PIO1_1,THERMISTOR_EXTRUDER)
  183. DEFINE_TEMP_SENSOR(bed,      TT_THERMISTOR, PIO1_0,THERMISTOR_BED)
  184.  
  185. // Beta algorithm      r0      beta  r2    vadc
  186. // Steinhart-Hart      rp      t0    r0      t1    r1      t2    r2
  187. //TEMP_TABLE EXTRUDER (100000, 4092, 1000, 5.0)
  188. //TEMP_TABLE BED      (100000, 4092, 4700, 5.0)
  189. //DEFINE_TEMP_SENSORS_END
  190.  
  191.  
  192. /***************************************************************************\
  193. *                                                                           *
  194. * 4. HEATERS                                                                *
  195. *                                                                           *
  196. \***************************************************************************/
  197.  
  198. #ifndef DEFINE_HEATER
  199.   #define DEFINE_HEATER(...)
  200. #endif
  201.  
  202. /** \def HEATER_PIN
  203.   Heater pins a user should be able to choose from in configtool. All
  204.   commented out.
  205. */
  206. //#define HEATER_PIN PIO0_10
  207. //#define HEATER_PIN PIO1_9
  208.  
  209. /** \def DEFINE_HEATER
  210.   Define your heaters and devices here.
  211.  
  212.   To attach a heater to a temp sensor above, simply use exactly the same
  213.   name - copy+paste is your friend. Some common names are 'extruder',
  214.   'bed', 'fan', 'motor', ... names with special meaning can be found
  215.   in gcode_process.c. Currently, these are:
  216.     HEATER_extruder   (M104)
  217.     HEATER_bed        (M140)
  218.     HEATER_fan        (M106)
  219.  
  220.   Devices don't neccessarily have a temperature sensor, e.g. fans or
  221.   milling spindles. Operate such devices by setting their power (M106),
  222.   instead of setting their temperature (M104).
  223.  
  224.   Also note, the index of a heater (M106 P#) can differ from the index of
  225.   its attached temperature sensor (M104 P#) in case sensor-less devices
  226.   are defined or the order of the definitions differs. The first defined
  227.   device has the index 0 (zero).
  228.  
  229.   Set 'invert' to 0 for normal heaters. Setting it to 1 inverts the pin signal
  230.   for this pin, e.g. for a MOSFET with a driver.
  231.  
  232.   Set 'pwm' to ...
  233.     frequency  in Hertz (Hz) on ARM based controllers to set PWM frequency of
  234.                this pin's output. Frequency isn't always accurate, Teacup
  235.                will choose the closest possible one. FAST_PWM is ignored
  236.                on such controllers. Valid range is 2 to 200'000 Hz.
  237.     1          on AVR based controllers for using Pulse Width Modulation (PWM)
  238.                on a pin supporting it. PWM frequency can be influenced only
  239.                somewhat and only globally with FAST_PWM.
  240.     0          for using a PWM-able pin in on/off mode.
  241.  
  242.   Using PWM usually gives smoother temperature control but can conflict
  243.   with slow switches, like solid state relays. A too high frequency can
  244.   overheat MOSFETs; a too low frequency can make your heater to emit audible
  245.   noise; so choose wisely.
  246.  
  247.   Pins which don't allow PWM are always operated in on/off mode.
  248. */
  249. //DEFINE_HEATERS_START
  250. //            name      pin      invert  pwm
  251. DEFINE_HEATER(extruder, PIO0_10, 0,      20000)
  252. DEFINE_HEATER(bed,      PIO1_9,  1,      10)
  253.  
  254. #define HEATER_EXTRUDER HEATER_extruder
  255. #define HEATER_BED HEATER_bed
  256. //DEFINE_HEATERS_END
  257.  
  258.  
  259. /***************************************************************************\
  260. *                                                                           *
  261. * 5. COMMUNICATION OPTIONS                                                  *
  262. *                                                                           *
  263. \***************************************************************************/
  264.  
  265. /** \def BAUD
  266.   Baud rate for the serial RS232 protocol connection to the host. Usually
  267.   115200, other common values are 19200, 38400 or 57600. Ignored when USB_SERIAL
  268.   is defined.
  269. */
  270. #define BAUD                     115200
  271.  
  272. /** \def XONXOFF
  273.   Xon/Xoff flow control.
  274.  
  275.   Redundant when using RepRap Host for sending G-code, but mandatory when
  276.   sending G-code files with a plain terminal emulator, like GtkTerm (Linux),
  277.   CoolTerm (Mac) or HyperTerminal (Windows).
  278. */
  279. //#define XONXOFF
  280.  
  281. /** \def USB_SERIAL
  282.   Define this for using USB instead of the serial RS232 protocol. Works on
  283.   USB-equipped ATmegas, like the ATmega32U4, only.
  284. */
  285. //#define USB_SERIAL
  286.  
  287.  
  288. /***************************************************************************\
  289. *                                                                           *
  290. * 6. DISPLAY SUPPORT                                                        *
  291. *                                                                           *
  292. \***************************************************************************/
  293.  
  294. /** \def DISPLAY_BUS_4BIT DISPLAY_BUS_8BIT DISPLAY_BUS_I2C DISPLAY_BUS_SPI
  295.  
  296.   The bus used to connect the display to the controller. This is a property
  297.   of the display. With most displays there can be only one correct choice.
  298.  
  299.   Comment in the one in use, comment out all others. If there is no display,
  300.   comment out all of them to remove display code for better performance.
  301. */
  302. //#define DISPLAY_BUS_4BIT
  303. //#define DISPLAY_BUS_8BIT
  304. //#define DISPLAY_BUS_I2C
  305. //#define DISPLAY_BUS_SPI
  306.  
  307. /** \def DISPLAY_RS_PIN DISPLAY_RW_PIN DISPLAY_E_PIN
  308.     \def DISPLAY_D4_PIN DISPLAY_D5_PIN DISPLAY_D6_PIN DISPLAY_D7_PIN
  309.  
  310.   Pins necessary for the 4-bit parallel display bus. Taken into account with
  311.   DISPLAY_BUS_4BIT defined, only.
  312. */
  313. //#define DISPLAY_RS_PIN           xxxx
  314. //#define DISPLAY_RW_PIN           xxxx
  315. //#define DISPLAY_E_PIN            xxxx
  316. //#define DISPLAY_D4_PIN           xxxx
  317. //#define DISPLAY_D5_PIN           xxxx
  318. //#define DISPLAY_D6_PIN           xxxx
  319. //#define DISPLAY_D7_PIN           xxxx
  320.  
  321. /** \def DISPLAY_TYPE_SSD1306 DISPLAY_TYPE_HD44780
  322.  
  323.   The type of display in use. There can be only one choice. Taken into account
  324.   only if one of DISPLAY_BUS_xxx is defined.
  325.  
  326.   Comment in the display in use, comment out all others. If there is no
  327.   display, comment out all of DISPLAY_BUS_xxx.
  328. */
  329. //#define DISPLAY_TYPE_SSD1306
  330. //#define DISPLAY_TYPE_HD44780
  331.  
  332. // Configuration for printer board.
  333. /***************************************************************************\
  334. *                                                                           *
  335. * 6. MECHANICAL/HARDWARE                                                    *
  336. *                                                                           *
  337. \***************************************************************************/
  338.  
  339. /** \def KINEMATICS_STRAIGHT KINEMATICS_COREXY
  340.  
  341.   This defines the type of kinematics your printer uses. That's essential!
  342.  
  343.   Valid values (see dda_kinematics.h):
  344.  
  345.   KINEMATICS_STRAIGHT
  346.     Motors move axis directions directly. This is the
  347.     traditional type, found in many printers, including
  348.     Mendel, Prusa i3, Mendel90, Ormerod, Mantis.
  349.  
  350.   KINEMATICS_COREXY
  351.     A bot using CoreXY kinematics. Typical for CoreXY
  352.     are long and crossing toothed belts and a print head
  353.     moving on the X-Y-plane.
  354. */
  355. #define KINEMATICS_STRAIGHT
  356. //#define KINEMATICS_COREXY
  357.  
  358. /** \def STEPS_PER_M_X STEPS_PER_M_Y STEPS_PER_M_Z STEPS_PER_M_E
  359.   Steps per meter ( = steps per mm * 1000 ), calculate these values
  360.   appropriate for your machine.
  361.  
  362.   All numbers are integers, so no decimal point, please :-)
  363.  
  364.     Valid range: 20 to 4'0960'000 (0.02 to 40960 steps/mm)
  365. */
  366. #define STEPS_PER_M_X            80000
  367. #define STEPS_PER_M_Y            80000
  368. #define STEPS_PER_M_Z            1000000
  369. #define STEPS_PER_M_E            47619
  370.  
  371. /** \def MAXIMUM_FEEDRATE_X MAXIMUM_FEEDRATE_Y MAXIMUM_FEEDRATE_Z MAXIMUM_FEEDRATE_E
  372.   Used for G0 rapid moves and as a cap for all other feedrates.
  373. */
  374. #define MAXIMUM_FEEDRATE_X       6000
  375. #define MAXIMUM_FEEDRATE_Y       6000
  376. #define MAXIMUM_FEEDRATE_Z       200
  377. #define MAXIMUM_FEEDRATE_E       6000
  378.  
  379. /** \def SEARCH_FEEDRATE_X SEARCH_FEEDRATE_Y SEARCH_FEEDRATE_Z
  380.   Used when doing precision endstop search and as default feedrate. No
  381.   SEARCH_FEEDRATE_E, as E can't be searched.
  382. */
  383. #define SEARCH_FEEDRATE_X        200
  384. #define SEARCH_FEEDRATE_Y        200
  385. #define SEARCH_FEEDRATE_Z        50
  386.  
  387. /** \def ENDSTOP_CLEARANCE_X ENDSTOP_CLEARANCE_Y ENDSTOP_CLEARANCE_Z
  388.  
  389.   When hitting an endstop, Teacup properly decelerates instead of doing an
  390.   aprupt stop to save your mechanics. Ineviteably, this means it overshoots
  391.   the endstop trigger point by some distance.
  392.  
  393.   To deal with this, Teacup adapts homing movement speeds to what your
  394.   endstops can deal with. The higher the allowed acceleration ( = deceleration,
  395.   see #define ACCELERATION) and the more clearance the endstop comes with,
  396.   the faster Teacup will do homing movements.
  397.  
  398.   Set here how many micrometers (mm * 1000) your endstop allows the carriage
  399.   to overshoot the trigger point. Typically 1000 or 2000 for mechanical
  400.   endstops, more for optical ones. You can set it to zero, in which case
  401.   SEARCH_FEEDRATE_{XYZ} is used, but expect very slow homing movements.
  402.  
  403.     Units: micrometers
  404.     Sane values: 0 to 20000   (0 to 20 mm)
  405.     Valid range: 0 to 1000000
  406. */
  407. #define ENDSTOP_CLEARANCE_X      1000
  408. #define ENDSTOP_CLEARANCE_Y      1000
  409. #define ENDSTOP_CLEARANCE_Z      100
  410.  
  411. /** \def X_MIN X_MAX Y_MIN Y_MAX Z_MIN Z_MAX
  412.   Soft axis limits. Define them to your machine's size relative to what your
  413.   G-code considers to be the origin (typically the bed's center or the bed's
  414.   front left corner).
  415.  
  416.   Note that relocating the origin at runtime with G92 will also relocate these
  417.   limits.
  418.  
  419.   Not defining them at all will disable limits checking and make the binary
  420.   about 250 bytes smaller. Enabling only some of them is perfectly fine.
  421.  
  422.     Units: millimeters
  423.     Sane values: according to printer build room size
  424.     Valid range: -1000.0 to 1000.0
  425. */
  426. //#define X_MIN                    0.0
  427. #define X_MAX                    180
  428.  
  429. //#define Y_MIN                    0.0
  430. #define Y_MAX                    180
  431.  
  432. //#define Z_MIN                    0.0
  433. #define Z_MAX                    220
  434.  
  435. /** \def E_ABSOLUTE
  436.   Some G-code creators produce relative length commands for the extruder,
  437.   others absolute ones. G-code using absolute lengths can be recognized when
  438.   there are G92 E0 commands from time to time. If you have G92 E0 in your
  439.   G-code, define this flag.
  440.  
  441.   This is the startup default and can be changed with M82/M83 while running.
  442. */
  443. #define E_ABSOLUTE
  444.  
  445. /** \def ACCELERATION_REPRAP ACCELERATION_RAMPING ACCELERATION_TEMPORAL
  446.   Choose optionally one of ACCELERATION_REPRAP, ACCELERATION_RAMPING or
  447.   ACCELERATION_TEMPORAL. With none of them defined, movements are done
  448.   without acceleration. Recommended is ACCELERATION_RAMPING.
  449. */
  450. //#define ACCELERATION_REPRAP
  451. #define ACCELERATION_RAMPING
  452. //#define ACCELERATION_TEMPORAL
  453.  
  454. /** \def ACCELERATION
  455.   How fast to accelerate when using ACCELERATION_RAMPING. Start with 10 for
  456.   milling (high precision) or 1000 for printing.
  457.  
  458.     Units: mm/s^2
  459.     Useful range: 1 to 10'000
  460. */
  461. #define ACCELERATION             1000
  462.  
  463. /** \def LOOKAHEAD
  464.   Define this to enable look-ahead during *ramping* acceleration to smoothly
  465.   transition between moves instead of performing a dead stop every move.
  466.   Enabling look-ahead requires about 3600 bytes of flash memory.
  467. */
  468. #define LOOKAHEAD
  469.  
  470. /** \def MAX_JERK_X MAX_JERK_Y MAX_JERK_Z MAX_JERK_E
  471.   When performing look-ahead, we need to decide what an acceptable jerk to the
  472.   mechanics is. Look-ahead attempts to instantly change direction at movement
  473.   crossings, which means instant changes in the speed of the axes participating
  474.   in the movement. Define here how big the speed bumps on each of the axes is
  475.   allowed to be.
  476.  
  477.   If you want a full stop before and after moving a specific axis, define
  478.   MAX_JERK of this axis to 0. This is often wanted for the Z axis. If you want
  479.   to ignore jerk on an axis, define it to twice the maximum feedrate of this
  480.   axis.
  481.  
  482.   Having these values too low results in more than neccessary slowdown at
  483.   movement crossings, but is otherwise harmless. Too high values can result
  484.   in stepper motors suddenly stalling. If angles between movements in your
  485.   G-code are small and your printer runs through entire curves full speed,
  486.   there's no point in raising the values.
  487.  
  488.     Units: mm/min
  489.     Sane values: 0 to 400
  490.     Valid range: 0 to 65535
  491. */
  492. #define MAX_JERK_X               200
  493. #define MAX_JERK_Y               200
  494. #define MAX_JERK_Z               0
  495. #define MAX_JERK_E               200
  496.  
  497.  
  498. /***************************************************************************\
  499. *                                                                           *
  500. * 7. MISCELLANEOUS OPTIONS                                                  *
  501. *                                                                           *
  502. \***************************************************************************/
  503.  
  504. /** \def USE_INTERNAL_PULLUPS
  505.   The ATmega has internal pullup resistors on it's input pins which are
  506.   counterproductive with the commonly used eletronic endstops, so they should
  507.   be switched off. For other endstops, like mechanical ones, you may want to
  508.   uncomment this.
  509. */
  510. //#define USE_INTERNAL_PULLUPS
  511.  
  512. /** \def Z_AUTODISABLE
  513.   Automatically disable Z axis when not in use. This is useful for printers
  514.   with a self-locking Z axis, e.g. the various Mendel derivates.
  515.  
  516.   Other printers have a heavy Z axis or a not self-locking spindle. In that
  517.   case you should not activate this.
  518.  
  519.   This option has no effect on controllers with a common stepper enable pin.
  520. */
  521. #define Z_AUTODISABLE
  522.  
  523. /** \def TEMP_HYSTERESIS
  524.   Actual temperature must be target +/- this hysteresis before target
  525.   temperature is considered to be achieved. Also, BANG_BANG tries to stay
  526.   within half of this hysteresis.
  527.  
  528.     Unit: degree Celsius
  529. */
  530. #define TEMP_HYSTERESIS          8
  531.  
  532. /** \def TEMP_RESIDENCY_TIME
  533.   Actual temperature must be close to target (within set temperature
  534.   +- TEMP_HYSTERESIS) for this long before target is achieved (and a M116
  535.   succeeds).
  536.  
  537.     Unit: seconds
  538. */
  539. #define TEMP_RESIDENCY_TIME      60
  540.  
  541. /** \def TEMP_EWMA
  542.   Smooth noisy temperature sensors. Good hardware shouldn't be noisy. Set to
  543.   1.0 for unfiltered data (and a 140 bytes smaller binary).
  544.  
  545.   Instrument Engineer's Handbook, 4th ed, Vol 2 p126 says values of
  546.   0.05 to 0.1 are typical. Smaller is smoother but slower adjusting, larger is
  547.   quicker but rougher. If you need to use this, set the PID parameter to zero
  548.   (M132 S0) to make the PID loop insensitive to noise.
  549.  
  550.     Valid range: 0.001 to 1.0
  551. */
  552. #define TEMP_EWMA                1.0
  553.  
  554. /** \def REPORT_TARGET_TEMPS
  555.   With this enabled, M105 commands will return the current temperatures along
  556.   with the target temps, separated by a slash: ok T:xxx.x/xxx.x B:xxx.x/xxx.x
  557.   With this disabled, only temps will be returned: ok T:xxx.x B:xxx.x
  558.   Enabling adds 78 bytes to the image.
  559. */
  560. #define REPORT_TARGET_TEMPS
  561.  
  562. /** \def HEATER_SANITY_CHECK
  563.   Check if heater responds to changes in target temperature, disable and spit
  564.   errors if not largely untested, please comment in forum if this works, or
  565.   doesn't work for you!
  566. */
  567. //#define HEATER_SANITY_CHECK
  568.  
  569. /** \def EECONFIG
  570.   Enable EEPROM configuration storage.
  571.  
  572.   Enabled by default. Commenting this out makes the binary several hundred
  573.   bytes smaller, so you might want to disable EEPROM storage on small MCUs,
  574.   like the ATmega168.
  575. */
  576. #define EECONFIG
  577.  
  578. /** \def BANG_BANG
  579.   Drops PID loop from heater control, reduces code size significantly
  580.   (1300 bytes!).
  581. */
  582. //#define BANG_BANG
  583.  
  584. /** \def BANG_BANG_ON
  585.   PWM value for Bang Bang 'on'.
  586. */
  587. //#define BANG_BANG_ON             200
  588.  
  589. /** \def BANG_BANG_OFF
  590.   PWM value for Bang Bang 'off'.
  591. */
  592. //#define BANG_BANG_OFF            45
  593.  
  594. /** \def MOVEBUFFER_SIZE
  595.   Move buffer size, in number of moves.
  596.  
  597.   Note that each move takes a fair chunk of ram (107 bytes as of this writing),
  598.   so don't make the buffer too big. However, a larger movebuffer will probably
  599.   help with lots of short consecutive moves, as each move takes a bunch of
  600.   math (hence time) to set up so a longer buffer allows more of the math to
  601.   be done during preceding longer moves.
  602. */
  603. #define MOVEBUFFER_SIZE          8
  604.  
  605. /** \def DC_EXTRUDER DC_EXTRUDER_PWM
  606.   If you have a DC motor extruder, configure it as a "heater" above and define
  607.   this value as the index or name. You probably also want to comment out
  608.   E_STEP_PIN and E_DIR_PIN in the Pinouts section above.
  609. */
  610. //#define DC_EXTRUDER              HEATER_motor
  611. //#define DC_EXTRUDER_PWM          180
  612.  
  613. /** \def USE_WATCHDOG
  614.   Teacup implements a watchdog, which has to be reset every 250ms or it will
  615.   reboot the controller. As rebooting (and letting the GCode sending
  616.   application trying to continue the build with a then different Home point)
  617.   is probably even worse than just hanging, and there is no better restore
  618.   code in place, this is disabled for now.
  619. */
  620. //#define USE_WATCHDOG
  621.  
  622. /** \def TH_COUNT
  623.   Temperature history count. This is how many temperature readings to keep in
  624.   order to calculate derivative in PID loop higher values make PID derivative
  625.   term more stable at the expense of reaction time.
  626. */
  627. #define TH_COUNT                 8
  628.  
  629. /** \def FAST_PWM
  630.   Teacup offers two PWM frequencies, 76(61) Hz and 78000(62500) Hz on a
  631.   20(16) MHz electronics. The slower one is the default, as it's the safer
  632.   choice and reduces MOSFET heating. Drawback is, in a quiet environment you
  633.   might notice the heaters and your power supply humming.
  634.  
  635.   Uncomment this option if you want to get rid of this humming and can afford
  636.   a hotter MOSFET or want faster PWM for other reasons.
  637.  
  638.   See also: http://reprap.org/wiki/Gen7_Research#MOSFET_heat_and_PWM
  639. */
  640. //#define FAST_PWM
  641.  
  642. /** \def PID_SCALE
  643.   This is the scaling of internally stored PID values. 1024L is a good value.
  644. */
  645. #define PID_SCALE                1024L
  646.  
  647. /** \def ENDSTOP_STEPS
  648.   Number of steps to run into the endstops intentionally. As endstops trigger
  649.   false alarm sometimes, Teacup debounces them by counting a number of
  650.   consecutive positives.
  651.  
  652.   Use 4 or less for reliable endstops, 8 or even more for flaky ones.
  653.  
  654.     Valid range: 1...255.
  655. */
  656. #define ENDSTOP_STEPS            5
  657.  
  658. /** \def CANNED_CYCLE
  659.   G-code commands in this string will be executed over and over again, without
  660.   user interaction or even a serial connection. It's purpose is e.g. for
  661.   exhibitions or when using Teacup for other purposes than printing. You can
  662.   add any G-code supported by Teacup.
  663.  
  664.   Note: don't miss these newlines (\n) and backslashes (\).
  665. */
  666. /*
  667. #define CANNED_CYCLE "G1 X100 F3000\n" \
  668. "G4 P500\n" \
  669. "G1 X0\n" \
  670. "G4 P500\n"
  671. */
Advertisement
Advertisement
Advertisement
RAW Paste Data Copied
Advertisement