Commit Graph

41 Commits

Author SHA1 Message Date
Markus Hitter 042d9ddfc2 Move temp_all_zero() to heaters_all_zero().
We need the power supply for the heaters, after all, not for
the temperature sensors. Some heaters (e.g. fans) don't even have
a temp sensor.
2013-01-03 15:34:47 +01:00
Markus Hitter 28a366fc48 Handle power_on() for heaters in heater.c.
This removes some instances in gcode_process.c and saves 26 bytes.
2013-01-03 15:34:45 +01:00
Markus Hitter 6f2ec09837 Make temperature sensor type TT_NONE obsolete.
The requirement was simply neither obvious nor intuitive. Drawback
is, the indices of temperature sensors can now differ from these
of the heaters. That's easier to recognize for newbies, though.
2013-01-03 15:34:41 +01:00
David Forrest e65526f9da heater.c: increase timer4 slow PWM from 15 Hz to 61 Hz. 2012-12-03 19:49:26 +01:00
Markus Hitter be560aaa01 Allow slow PWM on 10 bit timers.
Another contribution by DaveX, thank you.
http://forums.reprap.org/read.php?147,33082,165415#msg-165415
2012-12-03 19:48:45 +01:00
Markus Hitter 4510a02d7e A number of teensy-related fine-adjustments. Mostly comments. 2012-11-08 16:36:22 +01:00
Markus Hitter 86e89dbac6 heater.c: review on/off behaviour again.
D'oh, this wasn't compiling without BANG_BANG.
2012-11-08 16:25:16 +01:00
Markus Hitter f455f6f709 heater.c: fix on/off when BANG_BANG is used. 2012-11-08 16:25:04 +01:00
Markus Hitter 8d91312991 heaters: allow to disable PWM on PWM-able pins.
This is not only handy for debugging non-PWM mode, it may also
help those who run a heated bed attached to a solid state relay.

This way it was found out connecting heaters to non-PWM pins
works just fine and did so for a loooong time.

Not yet distributed to all the config.h templates.
2012-11-08 16:24:53 +01:00
Markus Hitter 5a2677f685 Even more fixes for the ATmega32U4.
Patch contributed by DaveX, see
http://forums.reprap.org/read.php?147,33082,159254#msg-159254
2012-11-08 16:23:55 +01:00
Markus Hitter d3af5460f1 Move heater initialisation from mendel.c to heater.c.
This enhances encapsulation.

An attempt to initialise only the timers in use was abandoned.
This isn't only unneccessary, as pins are still in normal
operation mode unless their bits in TCCR0A/TCCR2A/... are set,
even with the timer behind the pins running, it's also at least
tricky to sort pins and their timer bits at compile time. Doing
the sorting at runtime would cause additional binary size.
2012-11-08 16:22:46 +01:00
David Forrest 52ce6b5f52 More enablement of ATmega32U chip.
- ATmega32U timer 4 register handling differs from other AVRs:
  Change heater.c and mendel.c.
- LUFA USB recognition expanded in Makefile.
- Add section for __AVR_ATmega32U4__ in arduino.h.
2012-10-14 22:56:09 +02:00
Markus Hitter 305ef7a347 Fix compilation with HEATER_SANITY_CHECK defined.
The issue was introduced together with temperature sensor type
TT_NONE, in commit f9a4495aa1.
2012-07-02 12:33:44 +02:00
Markus Hitter 18f63ccf8e Add support for the ATmega1284/1284P.
As we don't need exclusive features of these chips, simply re-use
the definitions for the ATmega644.
2012-05-13 20:14:12 +02:00
Markus Hitter f9a4495aa1 Introduce TEMP_NONE, a "sensor" just storing the target temperature.
This is useful when operation a milling spindle. In this case,
set the spindle speed with M104 Sxxx, where xxx is 1..255.
M104 S0 turns the spindle off.
2011-09-01 19:03:33 +02:00
Michael Moon 43b5c0f0b4 force heater to remain off when target is zero 2011-06-14 23:16:14 +10:00
Jim McGee 85a9f63dfb Pretest DEBUG_X constants for non-zero and && the test with all existing
& tests of the debug_flags. Currently the compiler is able to eliminate
the block and the & operation when the constant is zero, but since
the debug_flags variable is a volatile the compiler does not eliminate
the load of the variable. By pretesting and shortcutting the load is
eliminated. Saves a small number of bytes when the debug build is
disabled and costs nothing when it is enabled.
2011-05-15 09:56:33 +10:00
Michael Moon 2822721a59 improve and simplify heater pin initialisation by moving to io_init[mendel.c] and using macro magic with DEFINE_HEATER 2011-05-05 00:02:06 +10:00
Michael Moon c54c964fc0 initialise heaters on timers 3/4/5 2011-04-11 11:22:09 +10:00
Markus Amsler be18eb90b8 Convert TEMP_HYSTERESIS to Celsius. 2011-04-04 09:12:54 +10:00
Markus Amsler 093d20481e heater: fix residency compare.
labs requires a signed int.
2011-04-04 09:12:54 +10:00
Michael Moon dba60ba1eb fix error: lvalue required as unary '&' operand when heater pin is not a PWMable pin. 2011-04-04 09:10:25 +10:00
Michael Moon 3c3624542f simplify heater configuration by using arduino_*.h more effectively with DEFINE_HEATER macro 2011-03-28 18:45:28 +11:00
Michael Moon 0dc7d77885 Massive Doxygen documentation addition
'make doc' then point your browser at doc/html/

Needs plenty of cleanup and polishing, but the main bulk is here

even documents your configuration! ;)
2011-03-22 01:34:36 +11:00
Michael Moon 815ff7ba19 lots of other files in extruder desynced, needed to wrap an ifdef around heater_print 2011-02-28 09:44:29 +11:00
Michael Moon 31634c6a8f Add M136 (DEBUG) to read back PID values, add heater_print function 2011-02-20 17:30:07 +11:00
Michael Moon 8540be950a use CRC16 to verify heater PID settings in eeprom 2011-02-20 17:13:09 +11:00
Architect 65a1846955 bang-bang heater toggle is wrong way around
Signed-off-by: Michael Moon <triffid.hunter@gmail.com>
2011-02-20 11:02:18 +11:00
Michael Moon 71eafbf96b keep power on when heaters are active
Reported-by: Jacky2K@forums.reprap.org
2011-02-09 08:16:15 +11:00
Michael Moon 5df49c2d3e allow DEBUG and BANG_BANG at the same time 2011-02-08 14:49:22 +11:00
Michael Moon 553f3a50a6 some config templates, also bang-bang heater support to reduce code size 2011-02-07 20:48:57 +11:00
Stephan Walter f1b526696b forgot to rename type 2011-02-01 19:40:28 +11:00
Stephan Walter fcaa76d3c0 Simpler definition of temp sensors and heaters. 2011-02-01 19:40:27 +11:00
Michael Moon 096d7dfdf3 Merge release-candidate-triffid branch 2011-01-07 23:09:13 +11:00
Stephan Walter 3028b297f3 Add simulation code: use "make sim" 2010-10-21 11:05:55 +11:00
Markus Hitter 2391dc2901 If there's no HEATER_PIN, there's no heater, so disable the
heater code. Also remove the temp_achieved() declaration
in heater.h, which has no definition in heater.c.

If you wonder about what might be the use of not having a heater,
think about a paste dispenser or an externally heated extruder :-)

Having no heater removes a whopping 1200 bytes of program size.
2010-10-07 23:43:46 +02:00
Markus Hitter 68f4610e79 heater.h/.c: remove a few obsolete #includes. 2010-10-07 23:43:36 +02:00
Michael Moon e78381c56d Move configuration to config.h.dist 2010-09-27 09:20:07 +10:00
Michael Moon f037bb5320 removed unused ABS_DELTA 2010-09-17 10:29:27 +10:00
Michael Moon 9e21f6c811 move temp_residency back to temp.h 2010-09-12 16:07:28 +10:00
Michael Moon 273d63f242 splitting heater stuff out into a separate file 2010-09-12 14:47:49 +10:00