oled 1.0
OLED Graphics Control Library
Loading...
Searching...
No Matches
Display Clock Command

Command and options for configuring the OLED display clock timing and frequency. More...

Macros

#define OLED_CMD_SET_DISPLAY_CLOCK   0xD5
#define OLED_CMD_SET_DISPLAY_CLOCK_DIVIDE_RATIO   0x00
#define OLED_CMD_SET_DISPLAY_CLOCK_FREQUENCY   0x80

Detailed Description

Command and options for configuring the OLED display clock timing and frequency.

The OLED_CMD_SET_DISPLAY_CLOCK macro defines the command byte used to configure the display's internal clock.

Note
The options allow adjustment of the clock divide ratio and oscillator frequency, which determine the timing and refresh rate of the OLED display.

Possible frequency settings:

  • Oscillator frequency setting bits can range from 0x00 to 0xF0 (higher nibble of the byte).
  • Common base oscillator frequency options include:
    • 0x00: Lowest frequency
    • 0x0F: Highest frequency (see display datasheet for exact mapping)

Possible clock divide ratios:

  • Divide ratio can be set from 0x00 (divide by 1) up to 0x0F (divide by 16)
  • Lower divide ratios result in higher frame rates; higher divide ratios can reduce current consumption at the expense of slower updates.

Macros:

  • OLED_CMD_SET_DISPLAY_CLOCK_DIVIDE_RATIO (default: 0x00, divide by 1)
  • OLED_CMD_SET_DISPLAY_CLOCK_FREQUENCY (default: 0x80, typical frequency setting)

Usage Example: To set the display clock, send the command OLED_CMD_SET_DISPLAY_CLOCK followed by the desired divide ratio and frequency setting ()OLED_CMD_SET_DISPLAY_CLOCK_DIVIDE_RATIO | OLED_CMD_SET_DISPLAY_CLOCK_FREQUENCY).

Macro Definition Documentation

◆ OLED_CMD_SET_DISPLAY_CLOCK

#define OLED_CMD_SET_DISPLAY_CLOCK   0xD5

◆ OLED_CMD_SET_DISPLAY_CLOCK_DIVIDE_RATIO

#define OLED_CMD_SET_DISPLAY_CLOCK_DIVIDE_RATIO   0x00

Clock divide ratio setting

◆ OLED_CMD_SET_DISPLAY_CLOCK_FREQUENCY

#define OLED_CMD_SET_DISPLAY_CLOCK_FREQUENCY   0x80

Oscillator frequency setting