Since I need 8 thermocouples measurments, I stacked 2 CN0391 shields on a Arduino Mega 2560 card.
In order to test the cards separately, I keeped the cards stacked and only changed the jumper position of the second card to position 3-4 accordingly to the user guide.
I also changed the #define CS_PIN to 9 in the communication.h in order to be consistent with the hardware configuration.
In that case, the measured temperatures are about 210°C on the channels instead of about 21°C. When testing with a single board and same jumper configuration (pin 9, J1 on 3-4) everything works fine...
I think I have missed something on the SPI configuration but have no idea on where is the problem. Do you have any idea ?
Thanks in advance
You are probably close to getting things working, but I have never tried stacking 2 of these boards on top of each other, nor have I used the Arduino Mega for this project, so there is…
You are probably close to getting things working, but I have never tried stacking 2 of these boards on top of each other, nor have I used the Arduino Mega for this project, so there is probably just a software issue you are running into.
Do you have an Arduino Uno R3 that you can try this on? That way we would eliminate any potential issues that are occurring with the MCU board.
You are going to need to set JP1 on the first CN0391 between pins 1 and 2, then you are going to need to set JP2 on the second CN0391 between pins 3 and 4. From a hardware setup perspective that should be all you need to do.
From a software perspective you are going to have to add a few things to make both run at the same time. Adding a second CS_PIN2 and set that to pin 10, initializing the second AD7124 is also something else you'll have to do. Can you share the code you are using so we can better help you? Did you make any other changes to the software?
Has this issue been solved? If so, could you post the resolution?