OLED SPI display stops working when adding an SPI DAC

Hi,

I am new to this and to this forum so I apologies if this type of issue has been covered elsewhere and I will take any advice on where to look if I am in the wrong place.

My project uses an OLED SPI display (SH1106 7 wires version) and also an MCP4922 dac connected to a NANO.

I first connected my the display and developed the code using the U8glib library and everything seems to work about OK. Nothing fancy but the text displays OK.
On the NANO I am using :
OLED_SCK 13
OLED_MOSI 11
OLED_CS 10
OLED_DC 9
OLED_RES 8

I then connected the DAC MCP4922 and used the library MCP492X (Arduino-MCP492x-master found on Github). Same as above but no Reset pin and CS=3.

As soon as I declare an instance of the DAC, the Display stops working.
However the DAC works fine and does what it is supposed to.
As soon as I remove the DAC declaration, the display starts working again.

I have been struggling to debug this and need some help I think!

Any idea what may cause this and how it can be fixed?

Could you draw a diagram of your circuit? Pen and paper drawing, photo taken with your smartphone will be fine.

Also a short example code that shows the behavior would be useful. Otherwise we will need to guess.

An easy issue could be that the chip selects are not handled properly. Do you have an oscilloscope or logic analyzer to look at the signals?

Hi Klaus,

Thank you so much for your response. I was in the process of drawing schematics and looking at the code when I noticed there was another version of the library U8glib called U8g2lib available.

I have installed it and ... problem solved!! (at least that one :wink: .

Many thanks for your help attempt, it was truly appreciated!

Kind regards