I am also using pins 8 and 9 for relays and I'd like to add a second MAX and wondering what pins to use for it. Can I double up on the pins 2 and 3 to power both MAX cards?
Can I use pins 10,11,12 for the second one? I have read that pin-10 can have conflicts in some cases. So, will this work?
I would think you could parallel the CLK and DO pins and use another pin for the second MAX6675's CS pin then select the MAX6675 you want to read by pulling it's CS pin LOW, (not both at the same time of course).
Why are you powering the MAX6675 with I/O pins?
756E6C:
Why are you powering the MAX6675 with I/O pins?
Thanks for the help, much appreciated. I am using pins to power it as all of the sample code I found online for the MAX6675 did that. I am not all the knowledgeable with electronics, so do as I am told.
I figured that since three different sketches did it, it must be for a good reason. If it ain't broke...
I have two more MAX boards coming so will try your suggestion for doubling up the CLK and DO pins, also may get brave and plug Vcc and Gnd into the 5vdc rail on the breadboard.
Right now I do not want to break anything with the currently working project, so will wait to mess with the two new boards coming this week. If I fry one or both, not to big a deal.
Ooops, just realized I need to be reading both of the temps all the time so pulling one Low when needed is probably not the best plan. It would constantly need to toggle between the two.
To keep it simple, I have the pins to spare on the Nano so both need to be autonomous.
756E6C:
But you still can't read both at the same time.
Thanks and I am not questioning you, just trying to understand.
I meant sequentially and having to constantly alternate pulling the CS-Pin Low for each, read, then put the CS-Pin back to High, seems to over-complicate the issue if I have spare pins to use for each one.
Am I missing something here since the pins are available, doesn't it make for a more simple approach?
I am all for making programs easy to read six months down the line when making changes or adding features.
SalineSolution:
Ooops, just realized I need to be reading both of the temps all the time so pulling one Low when needed is probably not the best plan. It would constantly need to toggle between the two.
Saying "both all the time" is pretty arbitrary. One microcontroller only ever does one thing at any time.
Toggling a CS pin on an SPI bus is pretty normal and intended for a situation like this.
Chagrin:
Toggling a CS pin on an SPI bus is pretty normal and intended for a situation like this.
Your login name reminds me of, umm, well, er.. how I feel about getting answers to Originally Posted questions on this board. Threads are sidetracked almost immediately.
To wit, I asked " So, will this work," and so far this has remained unanswered.
Why, oh why is it so hard to get straight answers?