CDM102 Bed clock part 2

Alright! Time for the 2nd part of CDM102 Bed clock. In this part, I will explain everything I know about CDM102.


The exact origin of CDM102 is unknown, But first appearance on the internet is back in around 2005 over : (The original thread still online, but I put here for the sake of future generations).

They took the display out of the old Ethernet switch. They didn’t mention the model / brand of the Switch. But according to This display was used in Bay stack 102 Network Hub (Network Hub, according to CNET link in above link). That’s probably the reason of number 102 in the LED display part number.

There’s also that digging deep into the protocol and op-codes of this LED display. This is probably my first website that I read about CDM102.

How Did I came across the CDM102

Short answer : Taobao. Long answer : Back in 2020. I was looking for LTL-7100M-HB. This is 4 segment bar graph LED made by Lite-On. The only place that I can still buy today is Taobao from the seller name bin0907.

I contacted him, asked him the price, and I’m ready to pay the money. But he said that he is never send item to outside China. So I ended up using Yoycart (Chinese taobao proxy) to “Help” me bought this LED.

After the order was placed. I have nothing to do so I just surfing around the net. Looking though bin0907’s store. And I came across a never-before-seen LED matrix display.

As I was mentioned in last blog post that I’m fascinated with LEDs since I’m a kid. The moment I saw CDM102. Dammit, I want it!

2 years later. After I’m more “experienced” in Electronics, microcontrollers and programming. I finally bought CDM102 !

Tested, Works!

Electrical characteristics

Since this LED is OEM product. Don’t ever expect datasheet unless someone leaks it. But According to those webs I mentioned earlier. This LED uses 5V supply. But strangely that it works with 3v3 (And yes, Image above that I used White supercap to run it, 3v3). But I’m assuming that the basic characteristics is no differ than the closest cousin. SCDV554X and SCDQ554X. So the digital protocol too.

Topology comparison

To make thing simple. This table is comparison of Display topology of SCDV SCDQ and CDM102.

LED configuration5 by 5 dots per single digit. Digits are align vertically. 5 by 5 dots per single digit. Digits are align horizontally12 by 5 dots. Divided to two 6 by 5 dots group. LED on 12 * 1 strip on the top is unpopulated and probably can’t be controlled.
LED colorSingle color. Available in Green, Red and Orange.Single color. Available in Green, Red and Orange.Green and Orange color in single pixel. Can be independently controlled. Result in 3 color : Green, Orange and Yellow.
Display typeCharacter / Symbol displayCharacter / Symbol displayIndividual status text label lighting.


This LED matrix display uses the same SPI protocol just like SCDV and SCDQ or any other 5×5 Dot matrix made by Siemens (OSRAM in 2000s era).

Timing Diagram that I don’t even care about.
Data loading sequence of SCDV and SCDQ. CDM102 is quite “similar” to this.

Siemens (OSRAM) 5×5 Matrix display probably share same controller IP design. As they all Use LSB first data format. Whether command or data. But the Op-code set of CDM102 and any other commercially available (back then) 5×5 led matrix is different in similar way (?).

Table below shows the comparison between CDM102 and other 5×5 matrix op-code set. MSB first format for reader’s convenience.

Op-codes SCDV/SCDQ 5×5 LED matrixCDM102
Load column pixel data0x00 – 0x1F -> [C][C][C][D] [D][D][D][D]
C -> Column number 0 – 3
D -> Pixel data 1 – on, 0 – off
Raw 5 bit pixel data (of single column). Bit 7, 6 and 5 is used to specify column number of current selected display digit.
0x00 – 0x1F -> [0][0][0][D] [D][D][D][D]
D -> Pixel data 1- on, 0 – off
Raw 5 bit pixel data (of single column). CDM102 does auto-increment, so you don’t have to specify column number in pixel data byte likes SCDV/SCDQ.
Select Digit /Select group and color (CDM102)0xA0 – 0xA3 -> [1][0][1][0] [0][0][d][d]
d -> digit number 0 to 3
SCDV and SCDQ has 4 display digits (0 to 3). Select digit with this command before sending 5 column pixel data.
0xA0 – 0xA3 -> [1][0][1][0] [0][0][C][G]
C -> display color 0 – Green, 1 – Orange
G -> Group number 0 – Left side, 1 – Right side
CDM102 doesn’t have digit like SCDV and SCDQ. In entire 12 x 5 dots configuration is split into two 6 x 5 zone. Called left side group and right side group. Since CDM102 has 2 colors. This command allows either color on both left and right side of the display independently. Select group and color with this command before sending 6 column pixel data.
Select group and color channel (CDM102)0xB0 – 0xB3 -> [1][0][1][1] [0][0][C][G]
C -> display color 0 – Green, 1 – Orange
G -> Group number 0 – Left side, 1 – Right side
Works almost like 0xA0 – 0xA3 command. But the different is that 0xB0 – 0xB3 acts like color channel. You can select either Green or Orange to display single color. Or you can mix both color for Yellow by sending same pixel data when selecting Green and Orange color.
Display clear0xC0 0xC0
Display Brightness 0xF0 – 0xF6 -> [1][1][1][1] [0][B][B][B]
B -> Brightness level from 0 (Brightest) to 6 (Darkest but not 0%)
0xE0 – 0xE6 -> [1][1][1][0] [0][B][B][B]
B -> Brightness level from 0 (Brightest) to 6 (Darkest but not 0%)
Lamp test0xF80xDF
Power Down0xFFUnknown

How to 101 102(Kind of)


  1. All data in flowchart is MSB first. The conversion to LSB first is done in the actual code
  2. function cdm102_tx(uint8_t data) will convert MSB first data to LSB first data and send it over SPI by do to the SPI write function call.

A. Select group + color

The flowchart below shows the sequence of selecting group + color and sending pixel data. The CDM102 will display 1 1 in Orange color and 0 0 in Green color.

Fig A.1 Flowchart of displaying 1 1 0 0 on the CDM102 display

By using 0xAX command. You can set entire group to either Green or Orange color.

And this is the actual result of above sequence :

Fig A.2 CDM102 Displaying 11 in orange color (but my phone cam picked up as yellow -_-) and displaying 00 in green color

B. Mixing 2 colors in same display group

The flowchart below is example of Writing Letter T in Yellow color and L in Green color to Left side group of the display.

Fig B.1 Flowchart of displaying Yellow (mixed color) pixels on CDM102

CDM102 is capable of displaying Green and Orange pixel. But when using 0xAX command, you can either select Green or Orange color. In order to combine 2 colors. 0xBX is the right command. This command allow you to independently control Green and Orange LED of same group without forcing to either color.

Notice the Yellow rectangles on Fig B.1 . By sending same pixel data with both color. Green pixels and Orange pixels turned on and you get Yellow color. This similar to overlaying 2 translucent Green and Orange filter and you get Yellow color.

With a little more playing with the code. You can have something like this :

Yellow Green Orange Green

After I discovered the 0xBX command. My Bed clock is now fancier UwU :

Triple colors!!!

For now, I haven’t wrote the driver for CDM102. I’m sure I will. Since there will be CDM101 too (coming not so soon). But until then, stay tuned for part 3.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s