Hello,
I'm new to the field and I'd like you to help me with my school project.
I have to use 2 Arduino boards and a DAC MCP4922 to simulate an electrocardiogram and a peacemaker. my real problem is in the wiring. pins 10, 11, and 13 of the two boards have to be connected to pins 3, 4, and 5 of the DAC. so I was wondering how to differentiate the input data on the DAC.
I know that my English is not perfect but I hope you were able to pinpoint my problem and I would also be very happy if you have links to projects that go in this direction.
It is not possible to make two Masters on the SPI bus. That causes a shortcut between the signals. Even with extra logic hardware there will be a shortcut sooner or later.
Connect the MCP4922 to one Arduino board and send data to the other Arduino board. For example with Serial Rx/Tx signals.
one Arduino has to simulate the ECG and the other one simulates the peacemaker. The Arduino that simulates the peacemaker has to work according to the data it receives from the ECG. A bit like the peacemaker works in our body. when the heart encounters functioning problems the peacemaker stimulates it to start beating again. and the DAC has to be there to transform the digital values into analogs so that they can be observed on an oscilloscope.