Sn74hc125 tristate required for between each SPI device? And how do you check this?

Status
Not open for further replies.

Bastiaan

Well-known member
Hi guys,

I still haven’t solved the problem yet, and have been googling the problem with the max31855 and other devices on the same SPI.

All show similar problems with clearly Mosi problems and hard CS pin select detection.
Still I was wondering if something like this could be solved by software?

I came accross: https://github.com/UnexpectedMaker/ReflowMaster/blob/master/Code/Reflow_Master/Reflow_Master.ino
He uses preprocessor statements and tells the void setup who’s first.

So two questions: is it in gerneral advisable to use for every SPI device a tristate buffer?
Second does it make any difference if preprocessing code is used instead of simple if statements?

Sorry to bother you with more trivial questions.

Best regards

Bastiaan
 
Since the MAX31855 has no data input I fail to see what a tristate buffer on MOSI will do for it.

You can run into problems with devices that use the same pins to support either I2C or SPI. These commonly use the CS signal to select between them and also have the ability to disable I2C by writing to a device control register. So if you disable I2C early they usually get along well with others.
 
@UhClem did you mean to say MAX31855 has no data out pin?

On SPI only those devices that have output pins that don't properly tri-state would require the 74hc125 (or similar) buffer.

@Bastiaan Do you also use 10K pull-ups on the CS lines so there is no (possible) bus contention when the Teensy is powering up and defining pin states. I don't know what devices are on your SPI bus, but I have found there is sometimes an order for device initialization such as SDcard before Ethernet to put the SDcard into SPI mode.
 
@UhClem did you mean to say MAX31855 has no data out pin?

No. It has no input and only output. (A sensor that you can't read is a poor sort of sensor.) Since the data sheet shows CS to output enable and disable times, there should be no conflict with other devices so long as you manage the CS signals correctly.

A pullup on the MISO pin can be helpful since it makes sure the bus doesn't float.
 
@UhClem did you mean to say MAX31855 has no data out pin?

On SPI only those devices that have output pins that don't properly tri-state would require the 74hc125 (or similar) buffer.

@Bastiaan Do you also use 10K pull-ups on the CS lines so there is no (possible) bus contention when the Teensy is powering up and defining pin states. I don't know what devices are on your SPI bus, but I have found there is sometimes an order for device initialization such as SDcard before Ethernet to put the SDcard into SPI mode.

Hi, I use 4.7 k resistors pull-ups on my CS pins of the max31855.
I used on the hx8357 featherwing 3.5 inch also a 4.7k on the CS to vcc. I had to remove that, because the scope images show not a max pull to gnd if CS was pulled low.

If I didn’t use the serial monitor, I could check on the bus content With a voltage divider 10k to see it was floating without any actions( high or Low) I have an extensive post with Kurt E about this.
Both libraries are set by the SPI.H, also written in the extensive post.

Does the screen require a tristate?

Best regards

Bastiaan
 
Status
Not open for further replies.
Back
Top