This is a really weird situation.
The design is an Arduino Mega 2560 Pro-mini board that, amongst other SPI peripherals, drives .96" OLEDs. To reduce current draw on the original OLED's, I decided to use the Data(MOSI) & Clock on the 3.3V side of a BSS138 type level shifter.
The level was required to connect a Flash Chip (25Q128). The 5V side is connected to a microchip SRAM (1Mbit) which requires that voltage.
I have reproduced this circuit (on PC Cart PCBs) a couple of dozen times with no problems at all.
I then had to order more OLED's to make more units and once those arrived started having problems. More than once I had to re-route the Data & Clock direct to the 5V SPI side to make it work.
Shortly after this I ran out of 2560 Pro-mini boards so ordered more of those. Now the combination of new 2560 boards and new OLED's doesn't work at all! The OLED is wired to the 3.3V side as was always.
The odd thing is, if I use an old 2560 board with a new OLED or a new 2560 board with an old OLED, they both work!! Old & old also work, just new & new won't work properly or sometimes at all.
Connected to the 5 Volt SPI direct, the OLED will start up but only once the pro-mini board or BSS-138 level shifter circuit is warmed up for a while. If cold (room temperature) then appears to start as speckles on the screen but seems to cause errors on the SPI as the Flash chip won't load properly.
Then, as it warms up, the Flash starts to load properly but there are glitches in the display as it is updated. Once all toasty (from the reg heating up) everything works, but only with the 5 Volt Data & clock modification.
The OLED parts are identical AFAIK but from different sources ( and time + 1year ) in China. I have some more on order so hopefully this solves the problem or I am going to have to brick the whole 3 year project ![]()
--As a side note, when the clock & data are on the 3.3 volt side I can pull up (1K to 5V) the clock and the OLED will work for a short while, but then the flash memory on the SPI bus starts to error which causes erroneous behavior of the whole system.
--Another note, I have tried 3 2560 boards and 6 or 7 OLED's from that batch, same result. Totally baffled!
If anyone has any suggestions, thoughts, or ideas I would greatly appreciate it.