Open sendel opened 3 years ago
why DELAY_US(1000); when Ardafruit use DELAY_US(10); ?
The DELAY_US(number); is dependent on #include "../../../../Marlin/src/HAL/shared/Delay.h" file. This header file has a MACRO definition for DELAY_US on the systick for the MCU it is running on. For the MCUs that Marlin Firmware run on, the DELAY_US(1000) allowed the MAX6675 to run properly without error.
This library "MAX6675-V1.1.0-Mod-M" was written for the use of 3D printers running Marlin code. It was not optimized for speed but reliability so that the 3D printer would not burn up or cause a fire.
If you want to use this library for reading temperatures at a very high rate or speed please feel free to adjust it as you want. But for 3D printers, a temperature change does not occur instantaneously. You are talking about 10 microseconds compared to 1 millisecond. Temperature changes on a 3D printer occur slower than every 1 millisecond,
Thank for your answerd. But I say about only SPI comunication, there are DELAY when read, datas may be distorted. And Its not about how often read temperature MarlinFW.
Thank for your answerd. But I say about only SPI comunication, there are DELAY when read, datas may be distorted. And Its not about how often read temperature MarlinFW.
If you are getting bad temperature reading then it is not due to the SPI protocol but due to noise on the data line. Try using a capacitor to filter out the noise
URL1: https://learn.adafruit.com/thermocouple/f-a-q#faq-2958381 URL2: https://3dprinting.stackexchange.com/questions/204/how-to-get-consistent-and-accurate-readings-from-thermocouples/355#355
why DELAY_US(1000); when Ardafruit use DELAY_US(10); ?