update serialVFD driver (Stefan Herdler)

This commit is contained in:
marschap
2006-05-20 14:38:18 +00:00
parent c6a1f841a7
commit 8ba4e54a3b
6 changed files with 511 additions and 665 deletions
+253 -77
View File
@@ -2,69 +2,116 @@
<title>The serialVFD Driver</title>
<para>
This section talks about using LCDproc with LCD displays that use the
serialVFD chipset.
This section talks about using LCDproc with VFD character-displays build by NEC, FUTABA and NORITAKE.
</para>
<sect2 id="serialVFD-connections">
<title>Connections</title>
<para>
The serialVFD-driver is working with NEC FIPC8367 based VFDs
and the "KD Rev 2.1" (an ATMEL AT90S.... based FM20X2KB-AB replacement).
It is also known to work on FUTABA VFDs.</para>
<para>
The driver should operate most of NEC, Futaba and Noritake 7x5 dot VFDs with
serial(rs232) and/or parallel interface. See the following table for testing-status.
Feedback is welcome.
The serialVFD-driver should work with all NEC FIPC8367 based VFDs:
NEC FC20X2JA
NEC FM20X2KB-AB
NEC FC20X1SA-AB/AA
...
Tested only on: NEC FM20X2KB-AB
The driver also works (tested) on "KD Rev 2.1" (an ATMEL AT90S....
based FM20X2KB-AB replacement).
Note: Above char. 128 the FIPC-displays and KD's charactersets
are different.
The driver may work or will be easy to get working on the following
Displays / Controllers (not tested!).
<table>
<tgroup cols="2">
<table><title>serialVFD: Display Status</title>
<tgroup cols="5">
<thead>
<row>
<entry>Display</entry>
<entry>Controller</entry>
<entry>Serial</entry>
<entry>Parallel</entry>
<entry>Display tested</entry>
<entry>Remark</entry>
</row>
</thead>
<tbody>
<row>
<entry>FUTABA M204SD01AA</entry>
<entry>FUTABA 5P00A016</entry>
<entry>NEC FM20X2KB-AB</entry>
<entry>NEC FIPC8367</entry>
<entry>Ok</entry>
<entry>Ok</entry>
<entry>Yes</entry>
<entry> </entry>
</row>
<row>
<entry>NEC FC20X2JA</entry>
<entry>NEC FIPC8367</entry>
<entry>(Ok)</entry>
<entry>(Ok)</entry>
<entry>No</entry>
<entry>Same Controller as on FM20X2KB-AB</entry>
</row>
<row>
<entry>NEC FC20X1SA-AB/AA</entry>
<entry>NEC FIPC8367</entry>
<entry>(Ok)</entry>
<entry>(Ok)</entry>
<entry>No</entry>
<entry>Same Controller as on FM20X2KB-AB</entry>
</row>
<row>
<entry>KD Rev 2.1</entry>
<entry>AT90S....
microcontroller</entry>
<entry>Ok</entry>
<entry>Ok</entry>
<entry>Yes</entry>
<entry> </entry>
</row>
<row>
<entry>FUTABA M402SD06GJ</entry>
<entry>?</entry>
<entry>(?)*</entry>
<entry>Ok</entry>
<entry>Yes</entry>
<entry>(* perhaps no compatible baudrate, not tested)
The display has no user-characters set <command>Custom-Characters=0</command>
in <filename>LCDd.conf.</filename></entry>
</row>
<row>
<entry>FUTABA M204SD01AA</entry>
<entry>FUTABA 5P00A016</entry>
<entry>(Ok)</entry>
<entry>(Ok)</entry>
<entry>No</entry>
<entry> </entry>
</row>
<row>
<entry>Noritake CU20026SCPB-T</entry>
<entry>(microcontroller)</entry>
<entry>microcontroller</entry>
<entry>(Ok)</entry>
<entry>(Ok)</entry>
<entry>No</entry>
<entry> </entry>
</row>
<row>
<entry>Noritake CU20045SCPB-T28A</entry>
<entry>?</entry>
<entry>(Ok)</entry>
<entry>(Ok)</entry>
<entry>No</entry>
<entry> </entry>
</row>
</tbody>
</tgroup>
</table>
... or compatible.
(most Futaba/Noritake 7x5 dot VFDs with serial(rs232) interface
(including serial(rs232)/parallel types))
<para>
Maybe there are little changes in the commands to do to get all
functions to work correctly. But because of the similarity of the
protocols, it wont be much work.
() feature not tested.
</para>
<para>
If you want to add a new device to the driver add a new section
to the displaytype-switch-case in the init-function and fill it
with the correct commands for the display.
(Try which displaytype works best with your display, copy and modify
it's section that is the easiest way I guess.)
If your display isn't working 100% satisfactorily you can add a new device with modified hardware
commands to the driver if you want. To do that you have to add a new section to the display-
<command>Type=</command>-switch-case in <filename>./server/drivers/serialVFD-displays.c</filename>
and to write a new "load"function with the correct commands for the display.(Try which display-<command>Type=</command>
works best with your display, copy, rename and modify this function that is the easiest way I guess.)
</para>
<para>
@@ -78,24 +125,25 @@ running. It may take a few minutes until the next full refresh makes
the display show everything correctly.
</para>
<para>
To enable the bignumbers on 2-line displays (only this driver supports
this yet) you have to edit <filename>clients/lcdproc/chrono.c</filename>
before compiling.
In function <function>big_clock_screen</function> you have to replace the
<literal>4</literal> by a <literal>2</literal> in this line:
<code>if (lcd_hgt &lt; 4)</code>
</para>
<sect2 id="serialVFD-connections">
<title>Connecting The Display</title>
<para>The Connections shown have been tested successfully.</para>
<warning><para>Always cross-check with your datasheet, before connecting your display!
Displays of same manufacturer may have different pin assignments!</para></warning>
<para>With this example connections it will be easy to connect displays with different connector
pin-layouts, the pins are commonly named equal in the datasheet.<para>
<sect3 id="serialVFD-serial-connections">
<title>Serial Connections</title>
<para>
This driver uses the serial mode of the displays.
It is NOT possible to connect most of the displays directly to the
serialport. The signal has to be inverted. I use the following
circuit to do that job.
</para>
<figure>
<title>serialVFD: Connecting the display</title>
<title>serialVFD: Serial Inverter</title>
<screen>
<![CDATA[
Computer Display
@@ -121,9 +169,9 @@ pin(signal) |
| --->- A*
| E| |
| | |
5(GND) --------o----------o----o----------------- GND
Shield ------------------------------------------
5(GND) --------o----------o----o--------------o-- GND
|*
Shield ---------------------------------------o
optional
*connect near display
@@ -131,25 +179,27 @@ optional
</screen>
</figure>
The pins on the different displays vary.
<para>The pins on the different displays vary.</para>
<para><title>NEC Displays (FM20X2KB-AB):</title></para>
FM20X2KB-AB:
CN1:
<para>CN1:</para>
<screen><![CDATA[
Pin 33 &lt;--- RxD
(Testmode: connect pins 25 and 26, then power up)
]]></screen>
CN2:
<para>CN2:</para>
<screen><![CDATA[
Pin 1 &lt;--- +5V
Pin 2 &lt;--- GND
]]></screen>
KD Rev 2.1:
blue connector (6pin in a row) (the important one!):
<para><title>KD Rev 2.1:</title></para>
<para>
The blue connector (6pin in a row) (the important one!):
</para>
<screen>
<![CDATA[
--------------------------------
@@ -163,33 +213,147 @@ blue connector (6pin in a row) (the important one!):
Hold the display in that position where you can read
the "KD Rev 2.1" marking normally!
</para>
</tip>
</tip>
gray connector (10pin 2 rows):
Do not use. (the ATMEL ISP connector I guess)
The two jumpers next to the gray connector:
Normally not used.
<para>The gray connector (10pin 2 rows):</para>
<screen>
<![CDATA[Do not use. (the ATMEL ISP connector I guess)
]]>
</screen>
<para>The two jumpers next to the gray connector:</para>
<screen>
<![CDATA[Normally not used.
You can activate two different testmodes with them.
]]>
</screen>
</sect3>
<sect3 id="serialVFD-parallel-connections">
<title>Parallel Connections</title>
<para><title>NEC Displays (FM20X2KB-AB):</title></para>
<para>CN1:</para>
<screen><![CDATA[
parallel Port: Display (NEC):
Pin: Name: Name: Pin:
1 /STROBE -------------- /WR 1
2 D0 -------------- D0 15
3 D1 -------------- D1 13
4 D2 -------------- D2 11
5 D3 -------------- D3 9
6 D4 -------------- D4 7
7 D5 -------------- D5 5
8 D6 -------------- D6 3
9 D7 -------------- D7 1
10 /ACK --o
|
11 BUSY --o----------- BUSY 27
o-- /CS 23
|
18 - 25 GND ------------o-- GND 2,4,6,8,10,12,14,16,18,20,22,24,26,28,20,32,34
|*
Shield -------------------o
optional
*connect near display
]]></screen>
<para>CN2:</para>
<screen><![CDATA[
Pin 1 &lt;--- +5V
Pin 2 &lt;--- GND
]]></screen>
<para><title>FUTABA Displays (M402SD06GJ):</title></para>
<screen><![CDATA[
parallel Port: Display (FUTABA):
Pin: Name: Name: Pin:
1 /STROBE -------------- /WR 1
2 D0 -------------- D0 15
3 D1 -------------- D1 13
4 D2 -------------- D2 11
5 D3 -------------- D3 9
6 D4 -------------- D4 7
7 D5 -------------- D5 5
8 D6 -------------- D6 3
9 D7 -------------- D7 1
10 /ACK --o
|
11 BUSY --o----------- BUSY 20
o-- /SEL 23
|
18 - 25 GND ------------o-- GND 10,12,14
|*
Shield -------------------o
optional
0-- TEST 16
|
+5V -------o-- +5V 2,4,6
*connect near display
]]></screen>
</sect3>
</sect2>
<!-- ## Serial VFD driver ## -->
<sect2 id="serialVFD-config">
<title>Configuration in LCDd.conf</title>
<sect3>
<title>[serialVFD]</title>
<variablelist>
<varlistentry>
<term>
<command>use_parallel=</command>
<arg choice="plain">
<group choice="req">
<arg choice="plain"><literal><emphasis>yes</emphasis></literal></arg>
<arg choice="plain"><literal>no</literal></arg>
</group>
</arg>
</term>
<listitem><para>
"<literal>no</literal>" if display connected serial, "<literal>yes</literal>" if connected parallel [default: <literal>no</literal>(serial)].
</para></listitem>
</varlistentry>
<varlistentry>
<term>
<command>Port=</command>
<arg choice="plain"><replaceable>PORT</replaceable></arg>
</term>
<listitem><para>
Portaddress where the LPT is. Used in parallelmode only. Usual values are 0x278, 0x378 and 0x3BC [default: <literal>0x278</literal>].
</para></listitem>
</varlistentry>
<varlistentry>
<term>
<command>Device=</command>
<arg choice="plain"><replaceable>DEVICE</replaceable></arg>
</term>
<listitem><para>
Device where the VFD is. Usual values are <filename>/dev/ttyS0</filename> and <filename>/dev/ttyS1</filename>
Default: <filename>/dev/lcd</filename>
Device to use in serial mode. Usual values are <filename>/dev/ttyS0</filename> and <filename>/dev/ttyS1</filename>
[default: <filename>/dev/lcd</filename>].
</para></listitem>
</varlistentry>
<varlistentry>
<term>
<command>Custom-Characters=</command>
<arg choice="plain"><replaceable>CUSTOM-CHARACTERS</replaceable></arg>
</term>
<listitem><para>
Number of Custom-Characters [default: Display-<command>Type</command> dependent].
</para></listitem>
</varlistentry>
@@ -204,7 +368,7 @@ You can activate two different testmodes with them.
</term>
<listitem><para>
Specifies the size of the VFD.
default: <literal>20x2</literal>
[default: <literal>20x2</literal>]
</para></listitem>
</varlistentry>
@@ -247,7 +411,7 @@ You can activate two different testmodes with them.
</tgroup>
</informaltable>
<note><para>
Options 3 and 4 should work, but have not been tested yet. Feedback is welcome.
Noritake VFDs have not been tested yet. Feedback is welcome.
</para></note>
</listitem>
</varlistentry>
@@ -258,9 +422,21 @@ You can activate two different testmodes with them.
<arg choice="plain"><replaceable>BRIGHTNESS</replaceable></arg>
</term>
<listitem><para>
Display brightness [default: 255].
0 min ... 255 max ... 1000 also max
(4 steps 0-64, 65-128, 129-192, 193-1000)
Set the initial brightness [default: 1000; legal: 0 - 1000]
(4 steps 0-250, 251-500, 501-750, 751-1000)
</para></listitem>
</varlistentry>
<varlistentry>
<term>
<command>OffBrightness=</command>
<arg choice="plain"><replaceable>OFFBRIGHTNESS</replaceable></arg>
</term>
<listitem><para>
Set the initial off-brightness [default: 0; legal: 0 - 1000].
This value is used when the display is normally
switched off in case LCDd is inactive.
(4 steps 0-250, 251-500, 501-750, 751-1000)
</para></listitem>
</varlistentry>
@@ -279,7 +455,7 @@ You can activate two different testmodes with them.
</term>
<listitem><para>
Set the the baud rate communication with the VFD.
If not given, it defaults to <literal>9600</literal>.
If not given [default <literal>9600</literal>].
</para></listitem>
</varlistentry>
@@ -294,7 +470,7 @@ You can activate two different testmodes with them.
</arg>
</term>
<listitem><para>
Enable ISO-8859-1 compatibility. Ddefault is <literal>yes</literal>.
Enable ISO-8859-1 compatibility [default is <literal>yes</literal>].
</para></listitem>
</varlistentry>
</variablelist>