Test Driver
The test driver is mostly a development tool, but it can also be used to get unsupported serial displays working with LCD Smartie. NB: No support will be offered for any display using this driver.
Limitations
- This drivers first appears in Beta 3.
- This driver does not currently support custom characters.
- This driver has no user interface (ie. no driver setting dialog), all settings are done by changing the config.ini file by hand.
- This driver is not suitable for any device that is sensitive to timings.
- This driver does not do input - i.e. keypads.
Usage
To use the test driver, set LCDType in [General Settings] to 5 in the config.ini file.
To set the baudrate set Baudrate in [Communication Settings] to 0-14, where:
- 0 = 110 baud
- 1 = 300 baud
- 2 = 600 baud
- 3 = 1200 baud
- 4 = 2400 baud
- 5 = 4800 baud
- 6 = 9600 baud
- 7 = 14400 baud
- 8 = 19200 baud
- 9 = 38400 baud
- 10 = 56000 baud
- 11 = 57600 baud
- 12 = 115200 baud
- 13 = 128000 baud
- 14 = 256000 baud
Set COMPort to 1 for COM1, 2 for COM2, etc
Settings
The Test Driver has it's own ini file section [Test Driver], it doesn't exist by default so you will have to create one.
All values take a string of the form of values between 0 and 255 seperated by commas (i.e. 10,20,30). These values represent the byte value to send to the serial port.
Currently available settings are:
- Init - Sent when the serial port is first opened, this can be used to initialize your display, set contrast/brightness, etc
- Fini - Sent just before the serial port is closed, this can be used to de-initialize your display, turn off the backlight, etc.
- GotoLine1 - Sent just before writing text for line 1. This should be used to set the cursor position to the beginning of line 1.
- GotoLine2 - like GotoLine1 but for line 2.
- GotoLine3 - like GotoLine1 but for line 3.
- GotoLine4 - like GotoLine1 but for line 4.
- CharMap - This can be used to remap character positions. The values are in pairs with the first being the character to be reassigned and the second value being the new value. (eg: 65,66,67,68 will map A to B and C to D - so when smartie wants a A to be displayed your display will display B.) This is useful if your character set is not ascii.
- StopBits - Set the serial stopbits to 1 or 2 stop bits. [default is 1]
- Parity - Set the serial parity (0 for none, 1 for odd, 2 for even). [default is 0]
Examples
The following config is suitable for driving a Crystalfontz 632:
- Init=4,20,24,22,255,1,50,3,12,15,50,14,50
- Fini=14,0,12
- GotoLine1=17,0,0
- GotoLine2=17,0,1
- GotoLine3=17,0,2
- GotoLine4=17,0,3
- CharMap=36,162,64,160,91,250,92,251,93,252,95,196,96,39,146,39,123,253,124,254,125,255,126,206,163,161
The following config is suitable for driving a Matrix Orbital display:
- Init=254,66,0,254,84,254,88,254,75,254,82,254,68,254,254,65,254,152,125,254,80,125
- Fini=254,70,254,88
- GotoLine1=254,71,1,1
- GotoLine2=254,71,1,2
- GotoLine3=254,71,1,3
- GotoLine4=254,71,1,4
The following config is suitable for driving a serial noritake VFD (2x40; CU40026SCPB-T20a). This config was created by HyperEm1.
- Parity=2
- Init=22,27,72,0
- GotoLine1=27,72,0
- GotoLine2=27,72,40
- CharMap=158,190
The following config is suitable for driving a serial noritake VFD (4x20; CU20045SCPB-T23A). This config was created by HyperEm1.
- Parity=2
- Init=22,27,72,0
- GotoLine1=27,72,0
- GotoLine2=27,72,20
- GotoLine3=27,72,40
- GotoLine4=27,72,60
- CharMap=158,190