I hope this question is not a repeat of others on this stack exchange concerning SPI. I've been searching for at least an hour and have not found the same problem/answer.
My friends and I are attempting to get an OLED and rotary encoder working together using our own personal board. Right now, we just want the position on the encoder to show up on the OLED.
An absolute position rotary encoder is hooked up with a development board using the ATmega2560 chip. The 2560 is talking to the encoder with these SPI settings:
- Master Mode (SPI Mode 3)
- Phase: 1
- Polarity: 1
- SPI Prescaler at f_OSC / 128 (current CPU Freq = 16MHz)
OLED: Adafruit SSD1306, 1.3" 128x64
Encoder: iC-MU Absolute Position - iC-MU Position Encoder Datasheet
I have the current program set to read from one of the encoder's internal EEPROM registers every second. Although I'm not yet certain about addressing the EEPROM accurately, the problem I would like to address is different.
I wasn't getting a response from the encoder, so I hooked up an oscilloscope and checked all four SPI lines, as seen below. For some reason, the MOSI line never drops below ~3.50V. The receiving device would still consider this a HIGH signal.
I have tried tapping into the OLED SPI connections since the display itself works with SPI. Nothing new happened. I've double-checked that I still have a working board, constantly reconnecting the OLED and disconnecting the encoder. The board definitely still works.
What might be the problem with the SPI? Is there a specific name for this problem?