-
-
Notifications
You must be signed in to change notification settings - Fork 19.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Max6675 SPI conflicts #1227
Comments
related to #1226 |
one way to solve this one is to use the chip select pin.... if master do not use SPI it will not pull the chip select lines high... one line is needed for each device... when master wants a temp reading it will pull high the chip select line a and talk to the thermocouple... when done it puts the line low... http://en.wikipedia.org/wiki/Serial_Peripheral_Interface-bus |
https://www.sparkfun.com/datasheets/IC/MAX6675.pdf Both require CS to be pulled low (which they are) in order to communicate to |
Just pasting this here from an earlier discussion we had on IRC I also took a look at the Repetier code regarding this, they also do Bang Bang for MAX6675 and MAX31855 SPI emulation on the hardware SPI port. |
More pasting on the subject (from this forum) to back up the issue…
Speculation there on possible solutions, but no resolution. |
We have a suggestion from David Braam to move the MAX6675 code into the main thread ( |
Changes to temperature.cpp from Ultimaker fork, intended to address MarlinFirmware#1226 and MarlinFirmware#1227
Changes to temperature.cpp from Ultimaker fork, intended to address MarlinFirmware#1226 and MarlinFirmware#1227
on phone but i remember that spi stuff needs one digital line for each Den fredag den 6. marts 2015 skrev Scott Lahteine <notifications@github.com
|
with one device it does not matter but with 2 or more it does... so even Den fredag den 6. marts 2015 skrev Bo Herrmannsen <bo.herrmannsen@gmail.com
|
Actually https://github.com/marwijn contributed the patch to me. I know little more then that. |
Eek! Well, I have heard some interesting things about the new SPI libraries that come with Arduino 1.6. Worth looking into, perhaps. |
http://upload.wikimedia.org/wikipedia/commons/f/fc/SPI_three_slaves.svg SPI can be daisy chained but then a shift register is needed and i very So our first Q to ourselves is: Does spi stuff use a slave select line for if not we need to implement that so that we know what device we are doings 2015-03-07 0:11 GMT+01:00 Scott Lahteine notifications@github.com:
|
http://www.maximintegrated.com/en/app-notes/index.mvp/id/3947
|
and the purpose of the link? nothing new info in there that i have not 2015-03-07 18:38 GMT+01:00 scotty1024 notifications@github.com:
|
There is another device that uses the 1 wire protocol, which can easily be Alas I don't have one, nor have I got time to test the current development
|
I think that document's diagrams more clearly demonstrate that so long as you chain SPI devices properly there is no conflict: AVR -> Thermocouple -> Viki LCD.
|
yep... might get one of those thermocouple boards (got the thermocouple) so 2015-03-07 20:00 GMT+01:00 scotty1024 notifications@github.com:
|
I don't think the MAX31855 board is supported yet in Marlin. |
one that is know to cause issues so we can get it solved... 2015-03-08 22:33 GMT+01:00 Grogyan notifications@github.com:
|
@Grogyan I'd like to see your configuration files, specifically looking for any complex defines that might have calculations in them, but which don't have parentheses around them, just in case there's some code like |
Got my MAX6675 this morning but will not be able to connect before Monday. In the meanwhile one could set a jumper on the open (i suppose) analog temperature pins. |
Configuration.h Nothing special being done to the config file. |
Ok, with the MAX6657 this code snippet is questionable…
Which translates into:
So, perhaps that would be good to revert...? Or was 1.0.2 incorrect? |
I don't believe the MINTEMP error is actually referring to an error with the Temperature code. This is the output log of Repetier, note that I also get the error even with a thermistor Something getting lost with stuff loaded into EEPROM, even when EEPROM is not enabled? In my RAMPS setup, I did load factory settings into EEPROM a month or two ago, since then I have not enabled it again till this error is resolved. |
Partially good news for the SPI-SD-MAX6675-complex. Connected my new MAX6675 this morning and got good temperature readings but the MINTEMP-error. (Arduino 1.6.1 - current Marlin including merge #1675 - FULL_GRAPHICS_CONTROLLER) I'm confident that the SPI-SD-MAX6675 problem is solved when we have caught the MINTEMP bug. Going back to MINTEMP problem now. |
Her i come closer to the reason why MAX6675 gives a MINTEMP error.
|
Coooool bananas. |
Tried out the latest dev branch again, I still get the MINTEMP error, but then again I cannot see the actual changes very well, as there has been a lot of changes done from multiple issues around the temperature.cpp |
@Grogyan The most recent fix around temperature got rid of the test of the thermistor in cases where a MAX6675 is in use, and made sure the redundant temp sensor option had storage for the second thermistor. |
At the moment Marlin seems to be okay with simple thermocouple setups. This page is getting long and unwieldy, so let's start a new issue if there's more information to discuss, linking back to this one for all the useful links. |
I only just uploaded the new firmware as of 2 days ago. On Wed, Apr 1, 2015 at 1:41 AM, Scott Lahteine notifications@github.com
|
I know its closed, but for history sake in case someone finds himself with the same issue. I had extended the sensor with regular wire, however it picked up a lot of (motor?) noise that got into the mksgen1.4. Moving the sensor closer to the printhead\sensor and extending the spi solved it. |
Thanks for the tip! It has also been long recommended to use NC switches for endstops and avoid entangling them with stepper wires to avoid false endstop triggers due to induction. |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
The code for the Max6675 to communicate over the SPI bus assumes that no other devices are on the same bus, and so there is a conflict of communication.
A sanity check to ensure that the SPI bus is free before establishing communication is needed.
Max6675 SS is on pin 66
RAMPS 1.4
RepRap discount full graphic display
The text was updated successfully, but these errors were encountered: