Good day everyone.
For several years now this issue has been periodically raised, but there is still no solution.
https://www.matrixtsl.com/mmforums/view ... 9bc#p77676
or
https://www.matrixtsl.com/mmforums/view ... 26&t=11987
There is a manufacturer that produces LCDs with national fonts.
https://aliexpress.ru/item/32902052399.html?
If you use "print ASCII", you can display all the characters written in the LCD.
And if you use the "print STRING", then for some reason the characters "?" are displayed.
Obviously, the program cannot RECOGNIZE the characters that we enter.
Is it possible to create a component (or embed in an LCD component) that has an extended ASCII nested as a text file? And the user in this file replaces the required fields with his own symbols. Then the program, when it detects an unfamiliar character, will scan this file, and if there is a similar character, transmit the required ASCII code.
Then in the simulation will be displayed correctly.
Built-in extended ASCII
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Built-in extended ASCII
Hello,
The LCD (Generic Configurable) component has a property called remap characters that allows you to take a character and automatically remap it to a different character when printing strings. I beleive this is what you need.
For example this macro would replace any occurance of the character 'a' with the character 'x'. You can also use hex or decimal values as parameters instead of characters.
The LCD (Generic Configurable) component has a property called remap characters that allows you to take a character and automatically remap it to a different character when printing strings. I beleive this is what you need.
For example this macro would replace any occurance of the character 'a' with the character 'x'. You can also use hex or decimal values as parameters instead of characters.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Re: Built-in extended ASCII
Respected Benj.
I do not have LCD (Generic Configurable), but there is a LCD I2C 4x20 on it does not work. Perhaps because I am using extended ASCII.
I do not have LCD (Generic Configurable), but there is a LCD I2C 4x20 on it does not work. Perhaps because I am using extended ASCII.
Re: Built-in extended ASCII
I will be glad if this option works well.
To replace the alphabet, you need to call this component 30 times, rather than call the "print ASCII" 80 times.
To replace the alphabet, you need to call this component 30 times, rather than call the "print ASCII" 80 times.
- Bachman
- Posts: 116
- Joined: Sun Sep 07, 2014 11:37 am
- Location: Hungary
- Has thanked: 9 times
- Been thanked: 53 times
- Contact:
Re: Built-in extended ASCII
It's not as simple as it looks. The first problem is the display itself. It' containing built-in charater set. Until today, I've seen three types:
Let's see Code E table, "É" character (top row, around middle). The datasheet says, binary code is HHLL LLLL = 0b11000000 = 192. In the ASCII table (http://www.asciitable.com/), it's 144. My computer say, it's 201. What is the problem? It's the character encoding (https://www.w3.org/International/questi ... s-encoding). This is the second problem.
Flowcode command to the LCD display:
Print String "É".
What will I see on the display? If Flowcode recognizes my "É" as ASCII 201, the display will show me a corner (201 = 0b11001001 = HHLL HLLH). If I have Code J display, I will see some kind of character, similar to J. What if Flowcode and/or Windows recognizes it as a different ASCII code and I have Code C type of display?
To display something correctly on HD44780 compatible display (this is the most common type of 5 x 7 dot character display), you have to follow the steps:
1: Check what characers built in into your display. Make a short program and print the ASCII characters from 8 to 255 and somehow remember the codes or check the tables in this post.
2: In the "Print string" command, use only safe characters (from space [ASCII code 32] until z [ASCII code 122]).
3: If you need the other built in characters, use "Print ASCII" command.
4: For maximum 8 unique characters, you can use CG RAM. Address: 0 - 7. To create a custom character, use RAM Write command. To display the custom character, use Print ASCII command. Please note, you can't create more than eight custom characters. If a custom characters visible on the display and you change the CG RAM content, the display will change the character immediately. Character generator: https://maxpromer.github.io/LCD-Character-Creator/
Don't worry using Print ASCII command. It's faster and needs less memory. You can use macros to display a longer word. In this case, you have to write only one time the sequence.
With this type of displays, this is the safest method to display non standard english characters and this is the reasons, why non standars characters will never work correctly and this is the reason, why Flowcode developers can't fix this.
Let's see Code E table, "É" character (top row, around middle). The datasheet says, binary code is HHLL LLLL = 0b11000000 = 192. In the ASCII table (http://www.asciitable.com/), it's 144. My computer say, it's 201. What is the problem? It's the character encoding (https://www.w3.org/International/questi ... s-encoding). This is the second problem.
Flowcode command to the LCD display:
Print String "É".
What will I see on the display? If Flowcode recognizes my "É" as ASCII 201, the display will show me a corner (201 = 0b11001001 = HHLL HLLH). If I have Code J display, I will see some kind of character, similar to J. What if Flowcode and/or Windows recognizes it as a different ASCII code and I have Code C type of display?
To display something correctly on HD44780 compatible display (this is the most common type of 5 x 7 dot character display), you have to follow the steps:
1: Check what characers built in into your display. Make a short program and print the ASCII characters from 8 to 255 and somehow remember the codes or check the tables in this post.
2: In the "Print string" command, use only safe characters (from space [ASCII code 32] until z [ASCII code 122]).
3: If you need the other built in characters, use "Print ASCII" command.
4: For maximum 8 unique characters, you can use CG RAM. Address: 0 - 7. To create a custom character, use RAM Write command. To display the custom character, use Print ASCII command. Please note, you can't create more than eight custom characters. If a custom characters visible on the display and you change the CG RAM content, the display will change the character immediately. Character generator: https://maxpromer.github.io/LCD-Character-Creator/
Don't worry using Print ASCII command. It's faster and needs less memory. You can use macros to display a longer word. In this case, you have to write only one time the sequence.
With this type of displays, this is the safest method to display non standard english characters and this is the reasons, why non standars characters will never work correctly and this is the reason, why Flowcode developers can't fix this.