This repository has been archived on 2022-01-28. You can view files and clone it, but cannot push or open issues or pull requests.
Marlin-Artillery-M600/Marlin
AnHardt 56c42b572c 3 ms speedup for ST7920 and delay for BOARD_3DRAG
and saving ~1k memory
by limiting the `#pragma GCC optimize (3)` optimisation to `ultralcd_st7920_u8glib_rrd.h`. These optimisation was and is not done for all the other displays, is the reason for the big additionally use of memory, because the complete 'ultralcd.cpp' and 'dogm_lcd_implementation.h' was optimised (sadly i did not observe a change in speed).

Unrolling the loop in `ST7920_SWSPI_SND_8BIT()`, what i expected the optimiser to do, by hand, saved some speed by eliminating the loop variable (i) compares and increases. Every CPU cycle in this loop costs at least 0.5ms per display update because it's executed more than 1k times/s.

The delays are now pre-filled with the calculated values for 4.5V driven ST7920.
A way to simply add __your__ timing into the configuration was made.

At 4.5V
1.) The CLK signal needs to be at least 200ns high and 200ns low.
2.) The DAT pin needs to be set at least 40ns before CLK goes high and must stay at this value until 40ns after CLK went high.

A nop takes one processor cycle.
For 16MHz one nop lasts 62.5ns.
For 20MHz one not lasts 50ns.

To fulfill condition 1.) we need 200/62.5 = 3.2 => 4 cycles (200/50 = 4 => 4). For the low phase, setting the pin takes much longer. For the high phase we (theoretically) have to throw in 2 nops, because changing the CLK takes only 2 cycles.

Condition 2.) is always fulfilled because the processor needs two cycles (100 - 125ns) for switching the CLK pin.


Needs tests and feedback.
Especially i cant test 20MHz, 3DRAG and displays supplied wit less than 5V.
Are the delays right? Please experiment with longer or shorter delays. And give feedback.

Already tested are 5 displays with 4.9V - 5.1V at 16MHz where no delays are needed.
2016-06-25 18:35:15 -07:00
..
example_configurations SERVO_DEACTIVATION_DELAY => SERVO_DELAY 2016-06-23 14:33:29 -07:00
fonts Rename README file for fonts 2016-04-18 20:09:03 -07:00
blinkm.cpp Further cleanup of comments, partial Doxygen-style 2016-03-25 00:45:56 -07:00
blinkm.h Further cleanup of comments, partial Doxygen-style 2016-03-25 00:45:56 -07:00
boards.h Cartesio UI Support 2016-06-15 21:46:54 -07:00
buzzer.h Heal the watchgog 2016-06-12 00:34:31 +02:00
cardreader.cpp Add an SD Card stop function, use in ultralcd 2016-06-17 18:27:14 -07:00
cardreader.h Add an SD Card stop function, use in ultralcd 2016-06-17 18:27:14 -07:00
circularqueue.h Non-blocking buzzer 2016-06-09 20:20:05 -07:00
Conditionals.h Define Z_SAFE_HOMING point when Z_PROBE_SLED is activated alone 2016-06-22 17:51:32 -07:00
Configuration.h SERVO_DEACTIVATION_DELAY => SERVO_DELAY 2016-06-23 14:33:29 -07:00
Configuration_adv.h Fix comments on EXPERIMENTAL_I2CBUS 2016-06-21 17:58:44 -07:00
configuration_store.cpp Tweak some feedrate vars 2016-06-22 03:27:31 -07:00
configuration_store.h Further cleanup of comments, partial Doxygen-style 2016-03-25 00:45:56 -07:00
dac_mcp4728.cpp Further cleanup of comments, partial Doxygen-style 2016-03-25 00:45:56 -07:00
dac_mcp4728.h Further cleanup of comments, partial Doxygen-style 2016-03-25 00:45:56 -07:00
digipot_mcp4451.cpp Further cleanup of comments, partial Doxygen-style 2016-03-25 00:45:56 -07:00
dogm_bitmaps.h SINGLENOZZLE: EXTRUDERS versus HOTENDS 2016-06-03 17:38:03 -07:00
dogm_custom_bitmaps.h Custom Splash Screen 2016-06-14 09:39:28 +02:00
dogm_font_data_6x9_marlin.h Further cleanup of comments, partial Doxygen-style 2016-03-25 00:45:56 -07:00
dogm_font_data_HD44780_C.h Further cleanup of comments, partial Doxygen-style 2016-03-25 00:45:56 -07:00
dogm_font_data_HD44780_J.h Update Kana font 2016-03-31 10:02:47 +09:00
dogm_font_data_HD44780_W.h Further cleanup of comments, partial Doxygen-style 2016-03-25 00:45:56 -07:00
dogm_font_data_ISO10646_1.h Further cleanup of comments, partial Doxygen-style 2016-03-25 00:45:56 -07:00
dogm_font_data_ISO10646_5_Cyrillic.h Further cleanup of comments, partial Doxygen-style 2016-03-25 00:45:56 -07:00
dogm_font_data_ISO10646_CN.h Further cleanup of comments, partial Doxygen-style 2016-03-25 00:45:56 -07:00
dogm_font_data_ISO10646_Kana.h Update Kana font 2016-03-31 10:02:47 +09:00
dogm_font_data_Marlin_symbols.h Further cleanup of comments, partial Doxygen-style 2016-03-25 00:45:56 -07:00
dogm_lcd_implementation.h Fixes somes compiler warnings 2016-06-23 03:12:55 +01:00
endstops.cpp This fix is not DELTA compatible 2016-06-02 17:16:19 -07:00
endstops.h Drop FORCE_INLINE from endstops.h 2016-05-30 17:08:56 -07:00
fastio.h Enclose all #error strings with apostrophes 2016-05-13 21:10:23 +09:00
language.h Output a message for SD read errors 2016-06-19 17:14:56 -07:00
language_an.h Cosmetic changes for language files 2016-06-21 21:13:25 +09:00
language_bg.h Cosmetic changes for language files 2016-06-21 21:13:25 +09:00
language_ca.h Cosmetic changes for language files 2016-06-21 21:13:25 +09:00
language_cn.h Cosmetic changes for language files 2016-06-21 21:13:25 +09:00
language_cz.h Cosmetic changes for language files 2016-06-21 21:13:25 +09:00
language_da.h Cosmetic changes for language files 2016-06-21 21:13:25 +09:00
language_de.h Cosmetic changes for language files 2016-06-21 21:13:25 +09:00
language_en.h XYZ unhomed 2016-05-17 17:02:53 -07:00
language_es.h Cosmetic changes for language files 2016-06-21 21:13:25 +09:00
language_eu.h Cosmetic changes for language files 2016-06-21 21:13:25 +09:00
language_fi.h Cosmetic changes for language files 2016-06-21 21:13:25 +09:00
language_fr.h Cosmetic changes for language files 2016-06-21 21:13:25 +09:00
language_gl.h Cosmetic changes for language files 2016-06-21 21:13:25 +09:00
language_hr.h Tweak Croatian language file heading 2016-06-16 16:09:57 -07:00
language_it.h Cosmetic changes for language files 2016-06-21 21:13:25 +09:00
language_kana.h Cosmetic changes for language files 2016-06-21 21:13:25 +09:00
language_kana_utf8.h Cosmetic changes for language files 2016-06-21 21:13:25 +09:00
language_nl.h Cosmetic changes for language files 2016-06-21 21:13:25 +09:00
language_pl.h Update language_pl.h 2016-05-20 13:24:34 +02:00
language_pt-br.h Cosmetic changes for language files 2016-06-21 21:13:25 +09:00
language_pt-br_utf8.h Cosmetic changes for language files 2016-06-21 21:13:25 +09:00
language_pt.h Cosmetic changes for language files 2016-06-21 21:13:25 +09:00
language_pt_utf8.h Cosmetic changes for language files 2016-06-21 21:13:25 +09:00
language_ru.h Cosmetic changes for language files 2016-06-21 21:13:25 +09:00
language_test.h Fix minor spelling in comments 2016-04-14 20:06:59 -07:00
M100_Free_Mem_Chk.cpp Remove redundant declarations from M100 code 2016-06-08 17:09:34 -07:00
macros.h Automatically set X2 stepper pins 2016-05-18 19:09:09 -07:00
Makefile Merge pull request #3224 from yarda/fix-melzi2-arduino-1.6.x 2016-05-08 19:33:37 -07:00
Marlin.h Tweak some feedrate vars 2016-06-22 03:27:31 -07:00
Marlin.ino Update U8glib URL 2016-03-30 14:26:28 +09:00
Marlin_main.cpp Merge pull request #4147 from thinkyhead/rc_fix_M48_raise 2016-06-25 18:15:33 -07:00
MarlinSerial.cpp Further cleanup of comments, partial Doxygen-style 2016-03-25 00:45:56 -07:00
MarlinSerial.h Enclose all #error strings with apostrophes 2016-05-13 21:10:23 +09:00
mesh_bed_leveling.cpp Use memset in mbl.reset to save 58 bytes 2016-06-08 16:05:18 -07:00
mesh_bed_leveling.h MBL: cel => cell 2016-06-07 19:10:39 -07:00
pins.h Cartesio UI Support 2016-06-15 21:46:54 -07:00
pins_3DRAG.h Updated multiple pins files 2016-04-24 05:21:17 +01:00
pins_5DPRINT.h Merge pull request #3702 from thinkyhead/rc_sensitive_fan_pins 2016-05-14 15:49:22 -07:00
pins_99.h Cleanup pins files, fixup analogtodigitalpin, etc. 2016-05-08 12:38:00 -07:00
pins_A4JP.h Merge pull request #3702 from thinkyhead/rc_sensitive_fan_pins 2016-05-14 15:49:22 -07:00
pins_AZTEEG_X1.h Further cleanup of comments, partial Doxygen-style 2016-03-25 00:45:56 -07:00
pins_AZTEEG_X3.h Further cleanup of comments, partial Doxygen-style 2016-03-25 00:45:56 -07:00
pins_AZTEEG_X3_PRO.h Use #undef in AZTEEG_X3_PRO for RAMPS overrides 2016-05-01 13:49:32 -07:00
pins_BAM_DICE_DUE.h Further cleanup of comments, partial Doxygen-style 2016-03-25 00:45:56 -07:00
pins_BQ_ZUM_MEGA_3D.h Fix BQ_LCD_SMART_CONTROLLER pin compiler warnings 2016-06-09 20:38:23 -07:00
pins_BRAINWAVE.h Merge pull request #3702 from thinkyhead/rc_sensitive_fan_pins 2016-05-14 15:49:22 -07:00
pins_BRAINWAVE_PRO.h Merge pull request #3702 from thinkyhead/rc_sensitive_fan_pins 2016-05-14 15:49:22 -07:00
pins_CHEAPTRONIC.h Merge pull request #3702 from thinkyhead/rc_sensitive_fan_pins 2016-05-14 15:49:22 -07:00
pins_CNCONTROLS_12.h FILRUNOUT => FIL_RUNOUT 2016-06-19 19:25:26 -07:00
pins_ELEFU_3.h Merge pull request #3702 from thinkyhead/rc_sensitive_fan_pins 2016-05-14 15:49:22 -07:00
pins_FELIX2.h Drop DISABLE_M(IN|AX)_ENDSTOPS, replace with individual endstop flags 2016-04-02 16:39:23 -07:00
pins_GEN3_MONOLITHIC.h Merge pull request #3702 from thinkyhead/rc_sensitive_fan_pins 2016-05-14 15:49:22 -07:00
pins_GEN3_PLUS.h Merge pull request #3702 from thinkyhead/rc_sensitive_fan_pins 2016-05-14 15:49:22 -07:00
pins_GEN6.h Merge pull request #3702 from thinkyhead/rc_sensitive_fan_pins 2016-05-14 15:49:22 -07:00
pins_GEN6_DELUXE.h Further cleanup of comments, partial Doxygen-style 2016-03-25 00:45:56 -07:00
pins_GEN7_12.h Merge pull request #3702 from thinkyhead/rc_sensitive_fan_pins 2016-05-14 15:49:22 -07:00
pins_GEN7_13.h Further cleanup of comments, partial Doxygen-style 2016-03-25 00:45:56 -07:00
pins_GEN7_14.h Merge pull request #3702 from thinkyhead/rc_sensitive_fan_pins 2016-05-14 15:49:22 -07:00
pins_GEN7_CUSTOM.h Merge pull request #3702 from thinkyhead/rc_sensitive_fan_pins 2016-05-14 15:49:22 -07:00
pins_K8200.h Updated multiple pins files 2016-04-24 05:21:17 +01:00
pins_LEAPFROG.h Merge pull request #3702 from thinkyhead/rc_sensitive_fan_pins 2016-05-14 15:49:22 -07:00
pins_MEGACONTROLLER.h SINGLENOZZLE: EXTRUDERS versus HOTENDS 2016-06-03 17:38:03 -07:00
pins_MEGATRONICS.h Non-blocking buzzer 2016-06-09 20:20:05 -07:00
pins_MEGATRONICS_2.h Merge pull request #3702 from thinkyhead/rc_sensitive_fan_pins 2016-05-14 15:49:22 -07:00
pins_MEGATRONICS_3.h Merge pull request #3702 from thinkyhead/rc_sensitive_fan_pins 2016-05-14 15:49:22 -07:00
pins_MELZI.h Further cleanup of comments, partial Doxygen-style 2016-03-25 00:45:56 -07:00
pins_MELZI_MAKR3D.h Further cleanup of comments, partial Doxygen-style 2016-03-25 00:45:56 -07:00
pins_MINIRAMBO.h Non-blocking buzzer 2016-06-09 20:20:05 -07:00
pins_MINITRONICS.h Merge pull request #3702 from thinkyhead/rc_sensitive_fan_pins 2016-05-14 15:49:22 -07:00
pins_MKS_13.h Support for MKS v1.3/1.4 and Sainsmart RAMPS 1.4 variants 2016-04-01 16:54:35 -07:00
pins_MKS_BASE.h Further cleanup of comments, partial Doxygen-style 2016-03-25 00:45:56 -07:00
pins_OMCA.h Merge pull request #3702 from thinkyhead/rc_sensitive_fan_pins 2016-05-14 15:49:22 -07:00
pins_OMCA_A.h Merge pull request #3702 from thinkyhead/rc_sensitive_fan_pins 2016-05-14 15:49:22 -07:00
pins_PRINTRBOARD.h Non-blocking buzzer 2016-06-09 20:20:05 -07:00
pins_PRINTRBOARD_REVF.h Merge pull request #3702 from thinkyhead/rc_sensitive_fan_pins 2016-05-14 15:49:22 -07:00
pins_RAMBO.h Non-blocking buzzer 2016-06-09 20:20:05 -07:00
pins_RAMPS_13.h Further cleanup of comments, partial Doxygen-style 2016-03-25 00:45:56 -07:00
pins_RAMPS_13_EFB.h Further cleanup of comments, partial Doxygen-style 2016-03-25 00:45:56 -07:00
pins_RAMPS_14.h FILRUNOUT => FIL_RUNOUT 2016-06-19 19:25:26 -07:00
pins_RAMPS_14_EFB.h Further cleanup of comments, partial Doxygen-style 2016-03-25 00:45:56 -07:00
pins_RAMPS_OLD.h Merge pull request #3702 from thinkyhead/rc_sensitive_fan_pins 2016-05-14 15:49:22 -07:00
pins_RIGIDBOARD.h Further cleanup of comments, partial Doxygen-style 2016-03-25 00:45:56 -07:00
pins_RUMBA.h SINGLENOZZLE: EXTRUDERS versus HOTENDS 2016-06-03 17:38:03 -07:00
pins_SAINSMART_2IN1.h Support for MKS v1.3/1.4 and Sainsmart RAMPS 1.4 variants 2016-04-01 16:54:35 -07:00
pins_SANGUINOLOLU_11.h Non-blocking buzzer 2016-06-09 20:20:05 -07:00
pins_SANGUINOLOLU_12.h Further cleanup of comments, partial Doxygen-style 2016-03-25 00:45:56 -07:00
pins_SAV_MKI.h Merge pull request #3702 from thinkyhead/rc_sensitive_fan_pins 2016-05-14 15:49:22 -07:00
pins_SETHI.h Merge pull request #3702 from thinkyhead/rc_sensitive_fan_pins 2016-05-14 15:49:22 -07:00
pins_STB_11.h Further cleanup of comments, partial Doxygen-style 2016-03-25 00:45:56 -07:00
pins_TEENSY2.h Merge pull request #3702 from thinkyhead/rc_sensitive_fan_pins 2016-05-14 15:49:22 -07:00
pins_TEENSYLU.h Merge pull request #3702 from thinkyhead/rc_sensitive_fan_pins 2016-05-14 15:49:22 -07:00
pins_ULTIMAIN_2.h Merge pull request #3702 from thinkyhead/rc_sensitive_fan_pins 2016-05-14 15:49:22 -07:00
pins_ULTIMAKER.h Merge pull request #3702 from thinkyhead/rc_sensitive_fan_pins 2016-05-14 15:49:22 -07:00
pins_ULTIMAKER_OLD.h Merge pull request #3702 from thinkyhead/rc_sensitive_fan_pins 2016-05-14 15:49:22 -07:00
planner.cpp Fixes somes compiler warnings 2016-06-23 03:12:55 +01:00
planner.h Fix feedrate in gcode_T (max_feedrate is mm/s) 2016-06-16 16:03:14 -07:00
planner_bezier.cpp Update comments, rename next_ping_ms, followup to #3797 2016-05-19 16:44:57 -07:00
planner_bezier.h Add BEZIER_CURVE_SUPPORT (G5 XYZEFIJPQ) 2016-05-14 14:52:08 -07:00
printcounter.cpp Closes #3826: SD printing will now pause and stop the print counter 2016-05-30 00:56:39 +01:00
printcounter.h Followup for #3813 2016-05-22 13:14:58 +01:00
qr_solve.cpp Further cleanup of comments, partial Doxygen-style 2016-03-25 00:45:56 -07:00
qr_solve.h Further cleanup of comments, partial Doxygen-style 2016-03-25 00:45:56 -07:00
SanityCheck.h SERVO_DEACTIVATION_DELAY => SERVO_DELAY 2016-06-23 14:33:29 -07:00
Sd2Card.cpp Enclose all #error strings with apostrophes 2016-05-13 21:10:23 +09:00
Sd2Card.h Converted all files on src to Unix file format 2016-04-26 21:23:39 +01:00
Sd2PinMap.h Enclose all #error strings with apostrophes 2016-05-13 21:10:23 +09:00
SdBaseFile.cpp 8.3-filenames second try 2016-05-02 15:58:04 +02:00
SdBaseFile.h Further cleanup of comments, partial Doxygen-style 2016-03-25 00:45:56 -07:00
SdFatConfig.h Further cleanup of comments, partial Doxygen-style 2016-03-25 00:45:56 -07:00
SdFatStructs.h Further cleanup of comments, partial Doxygen-style 2016-03-25 00:45:56 -07:00
SdFatUtil.cpp Further cleanup of comments, partial Doxygen-style 2016-03-25 00:45:56 -07:00
SdFatUtil.h Converted all files on src to Unix file format 2016-04-26 21:23:39 +01:00
SdFile.cpp Converted all files on src to Unix file format 2016-04-26 21:23:39 +01:00
SdFile.h Further cleanup of comments, partial Doxygen-style 2016-03-25 00:45:56 -07:00
SdInfo.h Converted all files on src to Unix file format 2016-04-26 21:23:39 +01:00
SdVolume.cpp Converted all files on src to Unix file format 2016-04-26 21:23:39 +01:00
SdVolume.h Further cleanup of comments, partial Doxygen-style 2016-03-25 00:45:56 -07:00
servo.cpp SERVO_DEACTIVATION_DELAY => SERVO_DELAY 2016-06-23 14:33:29 -07:00
servo.h SERVO_DEACTIVATION_DELAY => SERVO_DELAY 2016-06-23 14:33:29 -07:00
speaker.h Non-blocking buzzer 2016-06-09 20:20:05 -07:00
speed_lookuptable.h Further cleanup of comments, partial Doxygen-style 2016-03-25 00:45:56 -07:00
stepper.cpp Merge pull request #4125 from jbrazio/bugfix/planner-warning 2016-06-22 19:34:37 -07:00
stepper.h make motor_current_setting static and constexpr 2016-06-21 19:50:08 -07:00
stepper_dac.cpp Further cleanup of comments, partial Doxygen-style 2016-03-25 00:45:56 -07:00
stepper_dac.h Further cleanup of comments, partial Doxygen-style 2016-03-25 00:45:56 -07:00
stepper_indirection.cpp Further cleanup of comments, partial Doxygen-style 2016-03-25 00:45:56 -07:00
stepper_indirection.h Automatically set X2 stepper pins 2016-05-18 19:09:09 -07:00
stopwatch.cpp Fixes #3809 and adds several improvements to the Stopwatch and 2016-05-22 01:59:59 +01:00
stopwatch.h Fixes #3809 and adds several improvements to the Stopwatch and 2016-05-22 01:59:59 +01:00
temperature.cpp Fixes somes compiler warnings 2016-06-23 03:12:55 +01:00
temperature.h Fix compile error with watch_bed_next_ms 2016-06-21 02:13:41 -07:00
thermistortables.h Cosmetic changes and small fix for thermistortables.h 2016-06-21 21:19:47 +09:00
twibus.cpp Shrink debug code in TWIBus and disable by default 2016-04-20 12:44:30 -07:00
twibus.h Shrink debug code in TWIBus and disable by default 2016-04-20 12:44:30 -07:00
ultralcd.cpp MBL: Add support for max z endstop 2016-06-25 21:58:02 +02:00
ultralcd.h Show bootscreen later 2016-06-14 01:59:50 +02:00
ultralcd_implementation_hitachi_HD44780.h Introduce save_delay() 2016-06-15 18:11:55 +02:00
ultralcd_st7920_u8glib_rrd.h 3 ms speedup for ST7920 and delay for BOARD_3DRAG 2016-06-25 18:35:15 -07:00
utf_mapper.h Tweaks to some verbiage 2016-05-14 15:06:09 -07:00
vector_3.cpp Further cleanup of comments, partial Doxygen-style 2016-03-25 00:45:56 -07:00
vector_3.h Further cleanup of comments, partial Doxygen-style 2016-03-25 00:45:56 -07:00
Version.h Updated all example configuration files 2016-06-12 00:36:15 +01:00
watchdog.cpp Further cleanup of comments, partial Doxygen-style 2016-03-25 00:45:56 -07:00
watchdog.h Further cleanup of comments, partial Doxygen-style 2016-03-25 00:45:56 -07:00