Is there a way to detect the start of the OLED screen refresh cycle (V-SYNC) on the SparkFun MicroView? There is no code for this functionality in the Arduino library; in fact it looks like the Arduino library is only set up to send data over SPI to the display, and not receive any data/status back.

Do you know how to access the internal state of the OLED screen directly, by polling some kind of status bit over SPI?

The only datasheet I can find of this OLED screen does not have SPI command details.

Update: here's a movie taken with an iPhone on "slo-mo" video, showing a full screen (all pixels on). There is clearly a screen refresh going on, which interlaces with the video frame rate.

enter image description here

  • What do you need that for? I'm not even sure "screen refresh" is a term that applies to OLED displays. – Gerben Aug 22 '19 at 8:48
  • 1
    @Gerben when I photograph the screen with a fast shutter speed, it is clear that there is a periodic refresh going on. I'd like to synchronize some things with that. – Roman Aug 22 '19 at 8:57

The scenario you describe is called the Tear Effect. On the SSD1306, which the device you are interested in is based around, a Frame Synchronisation pulse can be emitted on the FR pin.

However it would appear that the specific SSD in use by SparkFun does not provide this pin from the SSD1306 on the external FPC connector, so there is no way of getting it. Probably owing to the small size of the display a reduced size connector without extra pins like FR was used.

So no, you can't combat the Tear Effect with that display.

There is nothing you can do over SPI, either. That is simply because SPI is just too slow for such things. You would use the FR pin because it's instantaneous. With SPI you would have to make a request to read a register, then read that register's value back. In that time, coupled with the question of exactly when would the register say it was at the start of a frame, the information would be completely meaningless anyway.

| improve this answer | |
  • Thanks @Majenko, I learned a lot today. For completeness here's the SSD1306 datasheet. It turns out that this controller is write-only over SPI, so no status queries possible anyway. There is a section in the datasheet about FR synchronization (section 8.4) so maybe for the next bigger project this will be a possibility. Cheers! – Roman Aug 23 '19 at 6:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.