I will be building the electronics and communication between a AVR MCU (ATMEGA328P) with another device (lets call it In-situ device), which probably will be located in a electromagnetic-noisy environment (motors, inductors etc).
The In-situ device is used to build a system of In-situ monitoring of dry etching process:
Something like this: https://www.plasmionique.com/plasma-etching
The hookup is: PC -> ATMEGA_MCU -> In-situ device
I will make sure to build the PCB so that it will be as resistant as possible to EMI, but I will not be testing it to meet any ISO standards. I do not care about speed of data transmission, I would go with the lower speed possible to reduce the impact of noise in the communication.
I would use either CAN or Ethernet protocol for the communication, but the MCU does not have this feature build-in. So I want to try using its build-in features and see if there will be any issues with noise and disconnections (since this is not a critical or life-dependent project).
I read here, @r0ger101 says:
Since I2C tends to hang on noise on the bus, so you need timeout handlers to recovery the bus (disabling and reinitializing the I2C-hardware).
SPI needs very clever handshake managing to solve arbitration and to lose no data since SPI is unbuffered on the AVRs.
With this data only, I would go with the SPI. But:
Which of its other features (SPI or TWI/I2C) would be more noise-resistant?
Where would I look for data regarding the noise-resistance of these two protocols?