Hello,
I wanted to start the development of a display driver for the VFD of my case (Zalman HD135) but could not find any skeleton to start with.
So I first tried to build a proper C++ skeleton with VS2005 and got to the point where I think I could share it with the forum.
It can certainly be improved / correted / documented... but for now it just seems to do the job for my purposes (and maybe yours).
It comes with project files to be compiled with VS2005 (express edition should work) and a sample plugin.dll that can be loaded with LCDSmartie 5.4 (I did not try with any other versions).
Please post comments and suggestions.
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
C++/VS2005 Display plugin skeleton
Moderators: _X7JAY7X_, caesar, IFR, mattcro, limbo
-
- Posts: 5
- Joined: July 2nd, 2007, 4:17 pm
- Location: Belfort, France
C++/VS2005 Display plugin skeleton
You do not have the required permissions to view the files attached to this post.
-
- Posts: 1
- Joined: August 7th, 2007, 7:22 pm
Very nice initiative!
I tried to load the solution file (plugin.sln) but I got an error about a file not found. I looked through the project file and found an absolute path from your machine. If you remove the line 'InheritedPropertySheets="..\..\..\..\Tronc\Ressources\Options communes BestOptim.vsprops"' twice (line 23 and 104) it works without errors.
I have attached the entire skeleton with edited project file.
I tried to load the solution file (plugin.sln) but I got an error about a file not found. I looked through the project file and found an absolute path from your machine. If you remove the line 'InheritedPropertySheets="..\..\..\..\Tronc\Ressources\Options communes BestOptim.vsprops"' twice (line 23 and 104) it works without errors.
I have attached the entire skeleton with edited project file.
You do not have the required permissions to view the files attached to this post.
-
- Posts: 5
- Joined: November 6th, 2007, 11:16 pm
- Location: Minsk, Belarus
Hi!
I am want to write my own LCD driver. I am compiled this code with Visual C++ 6.0, but it isn't work. In display settings "Warning: DLL may not compatible!".
If I change stringtoIt work(show correct plugin name, usage and param), but if click button "OK" or "Apply", Smartie closing without any error...
Please help me.
I am want to write my own LCD driver. I am compiled this code with Visual C++ 6.0, but it isn't work. In display settings "Warning: DLL may not compatible!".
If I change string
Code: Select all
#define DLL_EXPORT(type) extern "C" __declspec(dllexport) type __stdcall
Code: Select all
#define DLL_EXPORT(type) extern "C" __declspec(dllexport) type
Please help me.
-
- Forum Supporter
- Posts: 590
- Joined: March 8th, 2006, 1:58 pm
- Location: Scotland
You may need to manually add/create a DEF resource file that lists the functions to be exported from the DLL. This looks something like this:
The LIBRARY line must refer to the project name ("JW002_LCD" in my case). This file should be added as a project resource.
I hope I've got that all right, since I'm not in front of a project at the moment to check...
Code: Select all
LIBRARY "JW002_LCD"
EXPORTS
DISPLAYDLL_Init
DISPLAYDLL_Done
DISPLAYDLL_DriverName
DISPLAYDLL_Usage
DISPLAYDLL_DefaultParameters
DISPLAYDLL_SetPosition
DISPLAYDLL_Write
DISPLAYDLL_SetBrightness
DISPLAYDLL_CustomChar
DISPLAYDLL_CustomCharIndex
DISPLAYDLL_ReadKey
DISPLAYDLL_SetBacklight
DISPLAYDLL_SetContrast
DISPLAYDLL_PowerResume
DISPLAYDLL_SetGPO
DISPLAYDLL_SetFan
I hope I've got that all right, since I'm not in front of a project at the moment to check...
-
- Posts: 5
- Joined: November 6th, 2007, 11:16 pm
- Location: Minsk, Belarus
Yes! All Right! Big thanks!mattcro wrote:You may need to manually add/create a DEF resource file that lists the functions to be exported from the DLL. This looks something like this:
...
The LIBRARY line must refer to the project name ("JW002_LCD" in my case). This file should be added as a project resource.
I hope I've got that all right, since I'm not in front of a project at the moment to check...


-
- Forum Supporter
- Posts: 590
- Joined: March 8th, 2006, 1:58 pm
- Location: Scotland
-
- Posts: 5
- Joined: November 6th, 2007, 11:16 pm
- Location: Minsk, Belarus
I am use this chip without microcontroller. FT232 also can be used without microcontroller, because I am using "Bit-Bang Mode"(FT232BM/FT245BM Bit-Bang Mode) for control LCD in 4bit mode(D0-D4, E, R/W, A0, R/W now not using - always write. 1 line free, maybe use it in future for control backlight).mattcro wrote:Glad to hear you have the driver working now. The FTDI-based module looks interesting. I've used the FT232 but not the parallel FIFO ones. Do you have a microcontroller under the board there somewhere, or is it just the USB converter and LCD?
-
- Forum Supporter
- Posts: 590
- Joined: March 8th, 2006, 1:58 pm
- Location: Scotland
Ah, didn't realise there was a bit-bang mode. That makes it very easy to hook up an LCD with USB if you use the DLP module.
For 4-bit LCD mode, you have D0-D3, RS and EN (plus EN2 on 40x4). That's two spare pins (or 1 spare on 40x4), so you can have backlight control on all LCDs, and maybe a GPO (or single button).
When you are happy with the driver, please share it by starting a new thread in the plugin announcements section with some info and the driver (plus source code if possible).
For 4-bit LCD mode, you have D0-D3, RS and EN (plus EN2 on 40x4). That's two spare pins (or 1 spare on 40x4), so you can have backlight control on all LCDs, and maybe a GPO (or single button).
When you are happy with the driver, please share it by starting a new thread in the plugin announcements section with some info and the driver (plus source code if possible).