Skip to content

Characters

BrownMuffin edited this page Jan 3, 2021 · 3 revisions

The M11BT222A has 5 15-segment displays to display characters. With scrolling text it will be possible to display a text.

Functions

Below are the different functions for controlling the 5 characters segments.

showCharacter

This function is used to display a single character on the display.

void showCharacter(unsigned char seg, unsigned char character);

seg is the segment index, it ranges from 0 to 5, 0 being the left most character on the display. character is the ASCII table index number for the character your want to display. In C a char c = 'a' will be converted to the ASCII table index number. To display a a on the display you can use this code: showCharacter(0, 'a');

hideCharacter

This function is used to hide a single character on the display.

void hideCharacter(unsigned char seg);

seg is the segment index, it ranges from 0 to 5, 0 being the left most character on the display.

showCharacterCustom

This function is used to display a single custom character on the display.

void showCharacterCustom(unsigned char seg, unsigned int data) seg is the segment index, it ranges from 0 to 5, 0 being the left most character on the display. data is the binary information for the 15 individual segments, read below for more information.

Explained

Each character exists of a top and bottom part, the addresses of these displays are from left to right: 0x0C 0x0D, 0x09 0x0A, 0x06 0x07, 0x03 0x04, 0x00 0x01.

The order of the segment order is (T is top segment, B is bottom segment):

T0 T0 T0 T0 T0 T0 T0 T0 T0
T5 T1 T2 T3 T4
T5 T1 T2 T3 T4
T5 T1 T2 T3 T4
T5 T1 T2 T3 T4
T5 T1 T2 T3 T4
T5 T1 T2 T3 T4
B0 B0 B0 T7 T6 T6 T6
B2 B3 B4 B5 B1
B2 B3 B4 B5 B1
B2 B3 B4 B5 B1
B2 B3 B4 B5 B1
B2 B3 B4 B5 B1
B2 B3 B4 B5 B1
B6 B6 B6 B6 B6 B6 B6 B6 B6

The character set is based on the ASCII table. The first 32 entries (control codes) of the ASCII table are skipped.

Most of the ASCII character from 32 to 127 are created, the ones that are not created will be empty. The missing characters are: % & . [ ] { }. The DEL character is changed to a square with a cross in it.

The character set can be found here: Character set

Clone this wiki locally