Talk:M-codes for EEPROM config

From RepRap
Revision as of 04:59, 28 March 2011 by Triffid hunter (talk | contribs) (Teacup firmware: new section)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Alexa,

I'd like to help you get the code for this into the "main stream" Reprap firmware. When you have some code for this ( no matter how bad you think it is, and no matter how well it works or doesn't), please email me: davidbuzz at gmail dot com

Buzz. ( reprap core team )

Teacup firmware

Teacup Firmware now has a branch named "eeconfig" with work to implement these gcodes. Some of the codes conflicted with some debug stuff I had added, so I simply renumbered the debug stuff.

How teacup already does some of these things:

Teacup already saved heater PID settings to eeprom, using M-codes 130 through 133 to set P, I, D, I limit respectively, and M134 to save to eeprom. Each of M130-M133 used S word to select a heater and P to provide the value.

Teacup referred to "head stabilisation delay" as "temperature residency time". Teacup also sports a hysteresis value, as temperature is unlikely to stay exactly on target for any period of time even in a well tuned system.

Suggestions:

  • restrict the number of different words used. Teacup saves a bit of memory by only allocating ram for common words (GMXYZEFSPN), and then only enough to hold the usual datatypes for these words. Introducing I, L, etc in commands that don't use all of XYZEFSP requires more memory and code for no tangible improvement in communication.

Suggestions for some more codes:

  • save provided settings (ie write to eeprom) so we don't write every time we receive a setting, and we can start with a known-good configuration and try stuff out without committing to memory
  • switch to selected baud now, instead of waiting for reset. Allows trying a new baud rate and only having to reset to return to a known good one
  • debug read arbitrary memory (Saddress Plength)
  • debug write arbitrary memory (Saddress Pdata) (8 bit only in teacup, could support 16 bits with another debug word perhaps)
  • temperature hysteresis (complements "head stabilisation delay"/temperature residency time)