I'm designing a shield for a mega2560, but I'd also like to be able to use it on a Due. It's almost all communications devices. For this first revision I'm using a lot of breakout boards. Here are the devices and their voltage tollerances.
- Serial 1 - Signals at same level as Vcc. Perfect. I wish they were all like this
- Serial2 - Again, signal = Vcc.
- Serial3 - 5v only. Would need level shifter with Due
- I2c #1 - 3v3 only, needs level shifter with Mega2560
- i2c#2 - 3v3 only, needs level shifter with Mega2560
- i2c#3 - Adafruit DS1307 RTC breakout board. Looks like 5v.
- i2c#4 - 5v only, leeds level shifter with Due.
- SPI - Adafruit uSD breakout. Says it will work at either voltage
Questions:
Do I power devices which can use either voltage from IOREF?
I know how to handle the I2C bus with two voltages by putting a level shifter between them, but what to do about the micro-controller needing to be on the low side of the bus (Due) to the high side? Jumpers/DIP switches?
For serial I was going to use a TXB0108 to convert from Serial3's 5v signal to a Due, but what about when it's 5V to 5V? Best I can come up with is pulling the breakout and replacing it with jumpers.