Upgrading BPI-216 Applications to GLO-216
The GLO-216 serial OLED makes an excellent upgrade to applications designed for BPI-216 serial LCDs. It fits the same mounting footprint, has similar power and serial data requirements, and accepts a subset of BPI/BPK instructions. Under the hood, however, the GLO-216 is a very different device, so 100% code compatibility is not possible. This guide will help you find and fix incompatibilities. To take full advantage of GLO capabilities, check out the hardware and software references.
Update: BPI-emulation Firmware. To support legacy applications whose programming can't be changed, we have developed alternative firmware for the OLED serial interface that accurately emulates a BPI-216 LCD. Minor hardware differences remain, but no programming changes are required. If you're in a spot, we can help you out. Order BGL-216 from our semicustom listing or email tech@seetron.com.
Mounting and Physical Layout
Mounting hole locations on the GLO-216 are identical to those on the BPIs. The GLO-216 is thinner than either of the BPIs. The power/serial header pinout is identical to the BPIs, but lies flat and is located nearer the center of the pcb. GLO-216 does not have DIP switches or a contrast-control pot. It has a pair of one-time jumpers that may be cut after initial setup.
Power Requirements
- BPI-216L: 4.7 to 5.5Vdc at 50mA max
- BPI-216N: 4.7 to 5.5Vdc at 3mA max
- GLO-216: 3.3 to 5.3Vdc at 50mA max
Serial Input
GLO-216 accepts data at 9600bps only. BPI apps that use 2400bps are incompatible with GLO-216 (unless they can be changed to 9600).
Programming: Data and Instructions
Some simple BPI-216 programs will drive GLO-216 without changes. Sections below will go into more detail, but to be compatible a program must: :
- Use only printable ASCII characters in the range of 32 to 127 (0x20 - 0x7F hex)
- Use only clear-screen, home, and position instructions
- Not use any LCD custom characters < 32 (0x20 hex)
- Not use off-screen memory or scrolling
- Not depend on visible cursor(s)
Character Set, Standard Text and Custom Characters
GLO-216's character set for standard ASCII text (32 - 127 decimal; 0x20 - 0x7F hex) is identical to that of the BPI-216. However, the units' custom character handling differs:
- BPI: Eight custom characters, codes 0 - 7 (0x00 - 0x07 hex)
- GLO: 16 custom characters, codes 128 -143 (0x80 - 0x8F hex)
- BPI: Custom characters defined by writing data to CG RAM, addresses 64 - 127 (0x40 - 0x7F hex)
- GLO: Custom characters defined by instruction ESC D n followed by eight bytes of bit-pattern data
- BPI: Redefining a custom character changes previously printed instances of that character
- GLO: Previously printed custom characters not affected by redefinition
GLO-216 does not support the assorted Japanese, Greek and other symbols of the BPI-216's character set, codes 128 - 255 (0x80 - 0xFF hex).
BPI Instruction Table with GLO Compatibility Notes
BPI-216 accepts two-byte instructions in the form prefix-code
where prefix
is 254 (0xFE hex) and code
is a byte specifying the action. Here are the BPI instruction
codes with notes on GLO compatibility:
Action | ASCII | Hex | GLO Support |
---|---|---|---|
Clear Screen | 1 | 0x01 | Yes |
Home Cursor | 2 | 0x02 | Yes |
Blank Display | 8 | 0x08 | No |
Hide Cursor | 12 | 0x0C | No |
Show Underline Cursor | 14 | 0x0E | No |
Move Cursor 1 Position Left | 16 | 0x10 | Yes |
Move Cursor 1 Position Right | 20 | 0x14 | Yes |
Scroll 1 Character Left | 24 | 0x18 | No (uses off-screen memory) |
Scroll 1 Character Right | 28 | 0x1C | No (uses off-screen memory) |
Set Display Address (Position Cursor) | 128+n | 0x80+n | Yes (note 1) |
Move to First Position of First Line | 128 | 0x80 | Yes |
Move to nth Position of First Line | 128+n | 0x80+n | Yes (note 1) |
Move to First Position of Second Line | 192 | 0xC0 | Yes |
Move to nth Position of Second Line | 192+n | 0xC0+n | Yes (note 1) |
Set Custom Character Address | 64+n | 0x40+n | No (note 2) |
Note 1: BPI-216 allows position settings in off-screen memory totalling 80 bytes For example, a position of 148 (0x94 hex) would be valid, even though it is five characters past the end of the first line. GLO-216 only supports 32 positions, all visible on the screen.
Note 2: GLO-216 has an entirely different custom-character mechanism; see the programming reference.