Our new official repo is on github
LCD Smartie version 5.6 is released!
Download it now: https://github.com/LCD-Smartie/LCDSmartie/releases

VFD 2x40

General discussion about LCD Smartie.

Moderators: _X7JAY7X_, caesar, IFR, mattcro, limbo, Fast351

Post Reply
Rafael_Brazil
Plugin Author
Posts: 54
Joined: November 20th, 2005, 2:05 pm
Location: Curitiba, Paran?, Brazil
Contact:

VFD 2x40

Post by Rafael_Brazil »

Hi There..

I got this VFD

http://cgi.ebay.com/NEW-2x40-IEE-Vacuum ... dZViewItem

It?s possible use with LCDSmartie... the VFDworld program it?s terrible!

I try to run LCDS with this VFD... some strange chars and clear screen error command...

Is there some ideas? :D

Thanks!
Rafael_Brazil
Plugin Author
Posts: 54
Joined: November 20th, 2005, 2:05 pm
Location: Curitiba, Paran?, Brazil
Contact:

Post by Rafael_Brazil »

The wiring guide from this VFD

Image
ReverseEngineered
Plugin Author
Posts: 192
Joined: January 18th, 2006, 11:09 pm
Location: Saskatoon, Saskatchewan, Canada

Post by ReverseEngineered »

Unfortunately VFDs don't use the same controller chip as LCDs do. The standard controller for LCDs is the HD44780. If your VFD uses the same commands as this, it should "just work". But if it doesn't (which I suspect), then we would have to write new code to support your VFD, and in order to do this we need to know what controller it uses.

If you see any large chips on the back with lots of pins, reply with the code numbers stamped on them and we'll see if we can find any information.
Rafael_Brazil
Plugin Author
Posts: 54
Joined: November 20th, 2005, 2:05 pm
Location: Curitiba, Paran?, Brazil
Contact:

Post by Rafael_Brazil »

Hi Reverse... :)

Here is the datasheet of this VFD

http://www.vfdworld.com/techdocs/IEE_03 ... 40_VFD.pdf

When I select 2x40 ate LCDSmartie, the VFD show some words that we can read perfectly and other confused. I think that the difference between theses controllers, is the refresh command and clear screen... I think..

I need to download Visual Studio Prerequisite disk to try create something... I just know how to turn on led?s in parallel port using VB... this is my start point... :oops:
ReverseEngineered
Plugin Author
Posts: 192
Joined: January 18th, 2006, 11:09 pm
Location: Saskatoon, Saskatchewan, Canada

Post by ReverseEngineered »

Good news and bad. First, the bad news: it's most certainly not HD44780 compatiable. Not even close. Rather than having a couple of extra pins for specifying read/write and instruction/data, it instead does not support reading and uses many of the possible character values as instruction codes. Other problems: has a seperate "busy" pin (since it doesn't have any read commands), and it only supports 3 custom characters.

Now the good news. There's enough information there that I can write code for it. Of course, I've never written a line of Pascal (especially Delphi) in my life, nor do I have one of those VFDs to test my code with.

So can it be done? Yeah, sure, as soon as I get some time. I have other projects on the go which, I'm sorry to say, are of higher priority at this point.

In fact, I would be more inclined to make a serial adapter for it (like my AVR version that I'm nearly complete) rather than trying to write a plugin for it in LCDSmartie. This is for a few reasons: 1) it could be used with ANY program (that supports the Matrix Orbital, which is basically every program, and 2) I know AVRs, not Delphi.

Of course, you probably wouldn't be able to build the board and program the AVR yourself (I assuming you've never made a circuit board in your life).


That being said, "I'll look into it." I know I can do it, I just need to find the time to make it happen. Perhaps this will give me an excuse to learn Delphi (since I want to help develop LCDSmartie anyway).
Rafael_Brazil
Plugin Author
Posts: 54
Joined: November 20th, 2005, 2:05 pm
Location: Curitiba, Paran?, Brazil
Contact:

Post by Rafael_Brazil »

Ok... Thanks for you help...

Yesterday I?ve started program in VB a simple application to write chars and send commands to unit... To send it?s easy! For example:

I Just can send if I

Call PortOut(890,0) 'Strobe on
Call PortOut(890,1) 'Strobe off
Call PortOut(888,&H52) 'This is a R

But I can?t send 3 R?s at same time! It get only the last char (At this case, the last R)

Call PortOut(890,0) 'Strobe on
Call PortOut(890,1) 'Strobe off
Call PortOut(888,&H52) 'This is a R
Call PortOut(888,&H52) 'This is a R
Call PortOut(888,&H52) 'This is a R

I can wait for busy signal... while (PortIn(889) = 255), but if this we have only one char per time printting in VFD... The idea is print all char?s needed at the same time. :(

Thanks!
ReverseEngineered
Plugin Author
Posts: 192
Joined: January 18th, 2006, 11:09 pm
Location: Saskatoon, Saskatchewan, Canada

Post by ReverseEngineered »

The reason you only get one character through is because you need to toggle the strobe for every character. It is that toggling of the strobe which tells the VFD, "read the character that is waiting for you."

Try doing your commands like this:
Call PortOut(888,&H52) 'This is a R
Call PortOut(890,0) 'Strobe on
Call PortOut(890,1) 'Strobe off
Call PortOut(888,&H52) 'This is a R
Call PortOut(890,0) 'Strobe on
Call PortOut(890,1) 'Strobe off
Call PortOut(888,&H52) 'This is a R
Call PortOut(890,0) 'Strobe on
Call PortOut(890,1) 'Strobe off

In fact, you can remove the two extra PortOut(888,&H52), since the values will stay there until you write something different.
Rafael_Brazil
Plugin Author
Posts: 54
Joined: November 20th, 2005, 2:05 pm
Location: Curitiba, Paran?, Brazil
Contact:

Post by Rafael_Brazil »

Hi Reverse...

I?ve already try it...

The result is only one R :(

I?ve try to check the busy signal, if it?s ok to send and the result is one char displayed per time...

Like this:

R (wait 0.5s) R (wait 0.5s) R (one char per time, like you type something in pc)

The idea is:

RRR (all at the sime time)

I think that the busy signal is necessary for something...

Thanks!!
ReverseEngineered
Plugin Author
Posts: 192
Joined: January 18th, 2006, 11:09 pm
Location: Saskatoon, Saskatchewan, Canada

Post by ReverseEngineered »

Yes, you definitely need to use the busy flag, or at least leave a significant (2ms max) delay between those calls. The problem is that the chip on the VFD runs significantly slower than your computer.

It sounds to me like you're not particularly familiar with interfacing and programming LCDs and VFDs. There are some basic numbers which we always have to worry about. There is a certain amount of time that the E line has to be held high to properly register (it's very short, 250ns I think), an amount of time that all other signals have to be set and ready before E is toggled, and a delay afterwards for the LCD to finish processing the command. Different commands take longer than others, which is why the BUSY line is there.

In pseudo-code, the proper command sequency looks something like this:
- Set the control/data lines to the desired values
- Wait for setup time
- Set enable high
- Wait for minimum enable pulse width
- Set enable low
- Wait for hold time
- Change data/control lines (if desired; can probably wait)
- Wait for command to finish (either delay or check busy line).

There is also some delay between toggling enable and the busy line being activated. All of these values should be present in the datasheet (I haven't check the one for your VFD at the moment).

Hopefully this gives you some insight into the nuances of interfacing between different modules (computer to VFD, or just IC to IC). These are some of the basic things one needs to know about. I recommend reading a good book on elementary digital electronics. It will explain all about setup and hold times, as well as propagation delays.

Unfortunately I can't tell you exactly what commands to use, because I'm not familiar with VB and how it handles writing to ports. AFAIK, writing to the LPT port will cause the strobe to be toggled automatically, but I don't know this for certain. I recommend reading up on this in VB, just to make sure. If this is the case, you won't need a seperate call to toggle the enable, but you will definitely need to set the control lines before the data lines.
Rafael_Brazil
Plugin Author
Posts: 54
Joined: November 20th, 2005, 2:05 pm
Location: Curitiba, Paran?, Brazil
Contact:

Post by Rafael_Brazil »

Hi Reverse... I got it!!!

while (PortIn(889) <> 255)
Wend

Just add it beetwen the chars... :)

Thanks!!

But I don?t have any idea do add a Plugin to control this to work with lcdsmartie.. :?
Post Reply