Our new official repo is on github
LCD Smartie version 5.6 is released!
Download it now: https://github.com/LCD-Smartie/LCDSmartie/releases
LCD Smartie version 5.6 is released!
Download it now: https://github.com/LCD-Smartie/LCDSmartie/releases
CU20045SCPB-T23A custom driver custom character problem
Moderators: _X7JAY7X_, caesar, IFR, mattcro, limbo
-
- Posts: 2
- Joined: February 24th, 2008, 8:01 pm
CU20045SCPB-T23A custom driver custom character problem
I have written a simple custom driver for the CU20045SCPB-T23A 4x20 VFD. So far, I have almost everything working (including brightness control) except for custom characters. Right now, I can't seem to figure out where the characters are being written. I have defined the character index as index + 0xC0. If I trying writing to to [chr + 0xC0] I'm finding that I'm still reading the character that originally existed there when custom characters are needed (smartie thinks the block character is written at 0xC2). However, if I write directly to 0xC2 then the software picks up the correct character (the block). Shouldn't the index of CustomCharIndex and the chr of CustomChar match? Thanks for any help.
-
- Posts: 50
- Joined: February 10th, 2008, 4:27 pm
-
- Forum Supporter
- Posts: 590
- Joined: March 8th, 2006, 1:58 pm
- Location: Scotland
You probably need to write your custom characters to addresses 0x00 - 0x07 (or maybe 0x08-0x0F), not 0xC0 (which I guess is what you're trying to do?) Can you actually replace ANY character with your own custom pattern on those VFDs?
The DISPLAYDLL_CustomCharIndex() function in your driver determines the mapping between Smartie's custom char index (1-8) and your display's internal custom char addressing (usually 0-7). For your display, you can probably just use (C++ code):
If you put $Chr(176) in your Smartie screen config, Smartie will tell the display driver to display custom character 1, which would get translated to character 0x00 in the example above. You must use the $Chr() commands in the table grantb linked to in order to display custom characters.
The DISPLAYDLL_CustomCharIndex() function in your driver determines the mapping between Smartie's custom char index (1-8) and your display's internal custom char addressing (usually 0-7). For your display, you can probably just use (C++ code):
Code: Select all
DLL_EXPORT(LCDS_BYTE) DISPLAYDLL_CustomCharIndex(LCDS_BYTE index)
{
return index - 1;
}
-
- Posts: 2
- Joined: February 24th, 2008, 8:01 pm
actually, I can overwrite any character with a custom. I was able to overwrite 0xC2 with a block and smartie was able to successfully read it back out and display it. In order to do this though I had to hardcode that address into the custom character function. If I tried using the str variable, nothing works. This was also the case when I just used index - 1 as the addresses.