Well, I did the test and found "good" and "bad" with this. Now, to find out how to resolve this.
1) Some extra characters
are being sent. Not just the "<", ">" and "R", as displayed on the GLK display, but characters that are preceded with a 0x1B character. So "<" is actually
- 0x1B, 0x3C (the "<")
- 0x1B, 0x3E (the ">")
- 0x1B, 0x3C (the "<")
- 0x1B, 0x52 (the "R")
Now, I have something to work with,
but this is still a puzzle. This is only a problem with the GLK display. As you can see in the 3 screenshots, if I run an emulator, these don't show up and are not displayed, on the emulator. Also, these are not displayed on other LCD modules by other manufacturers. But on the GLK display, the 0x1B is ignored and the 0x3C is printed.
2) At least this gives me something to work with. I have two tasks.
- to find out why these pair of characters are being sent and
- to find out why ONLY the MO modules behave this way.
Can MatrixObrital help figure out why this is being displayed, on their display. It's like the display is ignoring the 0x1B and printing only the following character. Is this the way all MO modules work?
I will work to find out why the characters are being sent in the first place.
But at least there is progress in understanding this.
Images:
Image1: View of what the emulator looks like upon running test program. This is also the same on my OTHER LCD display modules.
Image2: The captured text in ascii format. The esc chars aren't displyaed on emulator and other LCD. They are on the GLK displays, except your display appears to ignore the first char and prints only the 2nd, as if the esc wasn't sent.
Image3: This is just captured data for 3 successive ENTER key presses.
Click Images for Larger View
If you refer to my first photos above, you will see how the GLK looks when it sees these extra characters. The 2 byte sequence is printed as if it's only the 2nd byte and shows up as "<", ">" and "R" characters. Emulators and other LCD ignore the 2 byte sequence as non-printable. Why doesn't the GLK and further, the GLK displays seem to ignore the 0x1B and see only the following char ("<", ">", "R", etc). This needs to be explained.
The thing that is problematic with using Matrix Orbital GLK displays is if this sequence is sent,
Code: Select all
0x1B, 0x3C (ESC "<")
0x1B, 0x52 (ESC "R")
0x0D, 0x0A (CR LF) (or visa versa)
0x1B, 0x3C (ESC "<")
0x1B, 0x3E (ESC ">")
0x1B, 0x3E (ESC ">")
0x1B, 0x52 (ESC "R")
0x1B, 0x3E (ESC ">")
and if MO displays are the ONLY displays that behave this way,
I can't use them. All the other LCD displays that I'm testing, simply ignore those two byte ESC sequences, if not used in their display. Is there any workaround with MO display module for this?
You can see that even terminal emulators ignore those extra characters, as can be seen in photo 1. Seems common practice for display devices and emulators, to just ignore unused ESC sequences.
Why is MO different? Seems to me that since these can be seen as ESC sequences, they
should simply be ignored, if they aren't recognized, NOT printing of 2nd character, as if not ESCAPPED.