Skip to content
BrownMuffin edited this page Jan 3, 2021 · 1 revision

The M11BT222A has 6 7-segment displays with colons between every pair of digits.

Functions

Below are the different functions for controlling the digits:

showNumbers

This function takes 6 numbers and 2 booleans. The digits and the colons are from left to right. The number can be used to show every hexadecimal value. The colons will be turned on with a true and off with a false.

void showNumbers(unsigned char val0, unsigned char val1, unsigned char val2, unsigned char val3, unsigned char val4, unsigned char val5, bool colon1, bool colon2);

showNumbers

This function is similar to the on above, it only does not do anything with the colons.

void showNumbers(unsigned char val0, unsigned char val1, unsigned char val2, unsigned char val3, unsigned char val4, unsigned char val5);

showNumber

This function takes one segment position and one number. The segment ranges from 0 to 5, with 0 being the left most digit. The number can be used to show every hexadecimal value.

void showNumber(unsigned char seg, unsigned char val);

hideNumber

This function turns a digit completely off. The segment ranges from 0 to 5, with 0 being the left most digit.

void hideNumber(unsigned char seg);

showNumberCustom

This function takes one segment position and data for the digit. The segment ranges from 0 to 5, with 0 being the left most digit. The data is one byte long and can be used for turning one individual digit segments. Look in the explained segment below for more information.

void showNumberCustom(unsigned char seg, unsigned char data);

showColons

This function can turn on or off all the colon dots. The order is from top to bottom and from left to right. A true will turn on the colon dot and a false will turn it off.

void showColons(bool colon1, bool colon2, bool colon3, bool colon4)

showColon

This function can turn on or off a single colon dot. The index ranges from 0 to 3 and the order is from top to bottom and from left to right. A true will turn on the colon dot and a false will turn it off.

void showColon(int8_t index, bool visible);

Explained

The RAM addresses of these displays are from left to right: 0x0F 0x15 0x16 0x12 0x13 0x10. The colons are in the digits around the colon and are in the MSB position.

The order of digit segments are:

0 0 0 0
2 1
2 1
2 1
3 3 3 3
5 4
5 4
5 4
6 6 6 6

The binary and hexadecimal representation of each digit is in the table below:

Digit Binary Hexadecimal
0 0111 0111 0x77
1 0001 0010 0x12
2 0110 1011 0x6B
3 0101 1011 0x5B
4 0001 1110 0x1E
5 0101 1101 0x5D
6 0111 1101 0x7D
7 0001 0011 0x13
8 0111 1111 0x7F
9 0101 1111 0x5F
A 0011 1111 0x3F
B 0111 1100 0x7C
C 0110 0101 0x65
D 0111 1010 0x7A
E 0110 1101 0x6D
F 0010 1101 0x2D
Clone this wiki locally