To cut a long story short, I have a 2x20 VFD POS screen which displays information sent via the COM port, data format 9600,n,1.
Control characters for this screen are;
ctrlH: back one position (non-destructive)
ctrlI: forward one position (non-destructive)
ctrlJ: line down
ctrlK: home
ctrlL: clear screen
ctrlM: beginning of line
ctrlX: clear line, return to beginning
ctrl?ctrlJ: line up
It works roughly with the matrix orbital driver, but the information on the screen is not formatted correctly because of the incorrect control character usage.
Can anyone help with this?
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
Screen driver required for a POS screen.
Moderators: _X7JAY7X_, caesar, IFR, mattcro, limbo
-
- Posts: 10
- Joined: February 21st, 2010, 4:04 pm
-
- Forum Supporter
- Posts: 590
- Joined: March 8th, 2006, 1:58 pm
- Location: Scotland
Re: Screen driver required for a POS screen.
You might be able to get this going with the test driver - this is an extra driver in Smartie that can be used for display development (only for COM port connected displays). See http://lcdsmartie.sourceforge.net/testdriver.html for details and examples.
NB There have been some changes to the display drivers since the above page...
To use the test driver, select testdriver.dll in the Smartie display setup panel, and set the startup parameters to suit your display. You set the display commands for the test driver by creating and editing an INI file testdriver.ini located in the LCDSmartie.exe directory (not the displays DLL directory). The contents of this file are as described in Settings section in the above link.
You need to convert the control codes for the display into the ASCII byte values. For example Ctrl+K is 10 - this is the value you would use for the GotoLine1 command.
See http://www.robelle.com/smugbook/ascii.html for control codes.
You probably only need to implement the Init (clear display), GotoLine1 (home) and GotoLine2 commands. For GotoLine2, you probably have to go the Home position and then down one line.
That should get you started. You may have to experiment with the display commands. Check back here if you need more help!
NB There have been some changes to the display drivers since the above page...
To use the test driver, select testdriver.dll in the Smartie display setup panel, and set the startup parameters to suit your display. You set the display commands for the test driver by creating and editing an INI file testdriver.ini located in the LCDSmartie.exe directory (not the displays DLL directory). The contents of this file are as described in Settings section in the above link.
You need to convert the control codes for the display into the ASCII byte values. For example Ctrl+K is 10 - this is the value you would use for the GotoLine1 command.
See http://www.robelle.com/smugbook/ascii.html for control codes.
You probably only need to implement the Init (clear display), GotoLine1 (home) and GotoLine2 commands. For GotoLine2, you probably have to go the Home position and then down one line.
That should get you started. You may have to experiment with the display commands. Check back here if you need more help!
-
- Posts: 10
- Joined: February 21st, 2010, 4:04 pm
Re: Screen driver required for a POS screen.
Hi Mattcro;
Ok, i've tried editing the config file just after the general settings I have added the following lines;
[Test Driver]
Parity=2
Init=12
GotoLine1=11,0,0
GotoLine2=11,0,013,0,0,10
The codes i've added to the gotoline's work in hyperterminal to get correct formatting of the display.
However when I run LCD smartie it either isn't using these settings or i'm not doing it right as the formatting is still all over the place.
Cheers, Dave.
Ok, i've tried editing the config file just after the general settings I have added the following lines;
[Test Driver]
Parity=2
Init=12
GotoLine1=11,0,0
GotoLine2=11,0,013,0,0,10
The codes i've added to the gotoline's work in hyperterminal to get correct formatting of the display.
However when I run LCD smartie it either isn't using these settings or i'm not doing it right as the formatting is still all over the place.
Cheers, Dave.
-
- Forum Supporter
- Posts: 590
- Joined: March 8th, 2006, 1:58 pm
- Location: Scotland
Re: Screen driver required for a POS screen.
The instruction I linked to at the top of my post are a bit outdated. Instead of editing the config.ini file, you must create a new file called testdriver.dll (in the same folder) and put the [Test Driver] section into that.
I don't think you need Parity in the ini file - that should now be part of the startup parameters in the Smartie setup panel (probably something like COM1,9600,8,N,1). If your display uses Even parity (like your Parity=2 suggests) then I think you need E instead of N in the startup parameters.
I don't think you need Parity in the ini file - that should now be part of the startup parameters in the Smartie setup panel (probably something like COM1,9600,8,N,1). If your display uses Even parity (like your Parity=2 suggests) then I think you need E instead of N in the startup parameters.
-
- Posts: 10
- Joined: February 21st, 2010, 4:04 pm
Re: Screen driver required for a POS screen.
Ok, i've tried that and it still doesn't seem to be working 
I made a file called testdriver.dll, inside is this (cut pasted exactly as is);
[Test Driver]
Init=12
GotoLine1=11,0,0
GotoLine2=11,0,013,0,0,10
And still nothing is working. I evem tried replacing the testdriver.dll in the displays folder and the program simply threw a wobbler when I started it so I undid the changes.
I'm running out of things to try now, anything else you can suggest? Thanks for all the help by the way
Thanks, Dave.

I made a file called testdriver.dll, inside is this (cut pasted exactly as is);
[Test Driver]
Init=12
GotoLine1=11,0,0
GotoLine2=11,0,013,0,0,10
And still nothing is working. I evem tried replacing the testdriver.dll in the displays folder and the program simply threw a wobbler when I started it so I undid the changes.
I'm running out of things to try now, anything else you can suggest? Thanks for all the help by the way

Thanks, Dave.
-
- Posts: 10
- Joined: February 21st, 2010, 4:04 pm
Re: Screen driver required for a POS screen.
Oop, actually, i've just gotten it working.
Its not meant to be testdriver.dll, its supposed to be testdriver.ini
I should probably have read the readme in the drivers folder first lol
Thanks for all the help.
Its not meant to be testdriver.dll, its supposed to be testdriver.ini

I should probably have read the readme in the drivers folder first lol
Thanks for all the help.
-
- Forum Supporter
- Posts: 590
- Joined: March 8th, 2006, 1:58 pm
- Location: Scotland
Re: Screen driver required for a POS screen.
Partly my fault - I said in my last post to make a file called testdriver.dll - should have been testdriver.ini of course. Too much cutting and pasting
Hope it's all working OK now!

-
- Posts: 10
- Joined: February 21st, 2010, 4:04 pm
Re: Screen driver required for a POS screen.
well its working brilliantly now, but its obviously using the test driver, is it possible to write a *proper* driver for the display? so that you dont have to use the test driver?
Would like to do this so I can get the block character working for bargraphs, as its not supported in the test driver, and you cant change the default character in LCD smartie. Like I said, the Matrix orbital driver is close, but the formatting characters are all wrong.
Dave.
Would like to do this so I can get the block character working for bargraphs, as its not supported in the test driver, and you cant change the default character in LCD smartie. Like I said, the Matrix orbital driver is close, but the formatting characters are all wrong.
Dave.
-
- Forum Supporter
- Posts: 590
- Joined: March 8th, 2006, 1:58 pm
- Location: Scotland
Re: Screen driver required for a POS screen.
I don't think you'll be able to get bargraphs working properly if the display doesn't support custom characters. You need more than just the solid block character, because that's only any good if the bar graph happens to be a full character block tall. Smartie defines a set of custom character blocks to use as the "bits" of a bar graph, so you either need to find a corresponding set of block characters (from empty/blank up to full/solid) to use from the display's native character set, or a method of defining and using custom character patterns. Most LCD and some VFD displays have custom character support, but POS type displays maybe don't...
Writing a driver is fairly straightforward. You need to use a language that can create DLLs with exported functions (C, C++, C#, Delphi etc are OK, but not VB as far as I know). There are some sample drivers and frameworks on the forum in various languages - mainly C and C#.
The driver functions translate Smartie commands like "Go to line 1" and "initialise the display" (similar to the test driver commands) into the control sequences for the display.
Writing a driver is fairly straightforward. You need to use a language that can create DLLs with exported functions (C, C++, C#, Delphi etc are OK, but not VB as far as I know). There are some sample drivers and frameworks on the forum in various languages - mainly C and C#.
The driver functions translate Smartie commands like "Go to line 1" and "initialise the display" (similar to the test driver commands) into the control sequences for the display.