hi everyone,
i got some trouble when connecting 2 spi parts (tft screen,max6635 thermcouple)to arduino board.
After connecting, both parts was not operated: TFT can not show the print, TC only show 0.0
I had reviewed some of information about the spi communication and its seems the chip selecting ( cs ) issue, please help and suggest a solution, many thanks!
I am sorry from the description of your issue, I am unable to reproduce your code or draw a schematic of your project. Perhaps you'd be so kind as to post your code IN CODE TAGS, and post a schematic? Please.
Why do this? The individual drivers will handle CS functions.
Did you get a single max to work before trying to get the 2nd one to work?
You are connecting 3 SPI devices not 2, as a note.
Double entry?
Leaving the other devices connected, if you comment out the TFT code and one t-couple are you able to get prints of the other t-couples data out put?
You know the ESP32 has 2 SPI ports? The SPI ports are VSPI and HSPI. You are using VSPI for all 3 devices. You might consider putting the t-couples on the HSPI bus.
Do you get error messages? Be a bit more descriptive of your problem.
Besides the mentions above, I do not see anything glaring obviously wrong with your code. There are a few things I'd do differently, like GPIO pin choices. The pins you used should work fine.
So right now that your code looks good I require more input .
I strongly recommend you use the other SPI buss for the t-couple thingies. I have, in the past, ran into the display units that use extra pins sometimes do not play nice with the SPI buss.