I have written a driver in C# that implements a partial selection of the commands available from this display. The driver is object-oriented with property accessors used to set configuration parameters of the display.
Weather Data, Emails and a Loader Animation :] |
The Hardware
The hardware is quite simple for this article. I have a USB to RS232 converter. This display accepts RS232C levels so you cannot use the UART of a microcontroller directly without using a transistor to invert the signal.
Hardware Overview |
The display itself is the CU24063-Y100 model from Noritake. I don't know a whole lot about the theory of operation behind these displays, but it is a vacuum sealed type device. It has a "getter" on the front glass to catch any impurities during the sealing process. It also contains a heater that is visible during very low-light conditions.
Display Front |
Thankfully, Noritake left a nice hole in their protocol that let me read out the firmware contents. This is a story for another blog post (maybe :]).
I have modelled the cursor mode using an enum that extends byte.
Display Back |
The Driver
The first thing I did was develop a subset of the commands into a clean object-oriented driver. I created a GitHub repo to share the code with anyone who wishes to drive this display. It is tested on Mono, but I can't see any reason why this wouldn't work on Microsoft's implementation. Submit an issue on GitHub if you encounter any issues and I can fire up my Windows virtual machine and debug it.
I will give you a quick taste of the code here but you can see the rest on GitHub. Here is the constructor that initializes a serial port and configures it for the default baud rate of the device. Note the optional parameter that would allow you to override it.
/// <summary> /// Initializes a new instance of the /// <see cref="TheResistorNetwork.VfdDriver.VdfDisplay"> class. /// </summary> /// <param name="serialPort" />Serial port. /// <param name="baudRate" />Baud rate. public VdfDisplay (string serialPort, int baudRate = 38400) { this.serialPort = new SerialPort (); this.serialPort.PortName = serialPort; this.serialPort.BaudRate = baudRate; this.serialPort.StopBits = StopBits.One; this.serialPort.Parity = Parity.None; this.serialPort.Handshake = Handshake.None; this.serialPort.Open (); displayMode = VfdDisplayMode.Flickerless; brightness = VfdBrightness.Percent200; blinkMode = VfdBlinkMode.Off; cursorMode = VfdCursorMode.Underline; customCharacterMode = VfdCustomCharacterMode.Disabled; }This driver is for the 24x6 character display. I only have the one display from this company so I didn't bother abstracting it as an IVfdDisplay or anything like that.
I have modelled the cursor mode using an enum that extends byte.
public enum VfdCursorMode : byte { Underline = 0x13, Off = 0x14, Block = 0x15, UnderlineBlink = 0x16 }This allows me to cast it directly to a byte and send it to the device during a property assignment.
/// <summary> /// Gets or sets the cursor mode. /// </summary> /// <value>The cursor mode.</value> public VfdCursorMode CursorMode { get { return cursorMode; } set { cursorMode = value; var cmd = new byte[] { (byte)cursorMode }; serialPort.Write(cmd, 0, cmd.Length); Thread.Sleep (1); } }This should be enough to give you an idea of what is going on in this driver. Feel free to fork the repo on GitHub if you wish to implement the rest of the commands. I will be more than willing to review your code and merge it in!
The Sample Application
I consumed my driver in a sample application that fetches e-mails, weather data, date/time and animations. This code is far from pretty, but it works. Here is a link to the GitHub repo for you to peek at. There are probably hundreds of ways that I could have done this better.
As an example, I could have created a TextScroller class that scrolls text at any location on the screen with a configurable width. At the moment, it is a mess of hard-coded constants.
Spinning Globe Animation with no Unread Email |
It takes a few moments to initialize as it downloads contents from Open Weather API and Gmail.
Spinning Envelope with Unread Email |
So there you have it! My VFD driver and sample application. Thanks for reading!
Hey, I was trying to find an email to contact you at, but couldn't. I checked your google profile also, and for some reason it wouldn't let me send you an email. I was wondering if I could ask you a few questions because I saw this project you posted and it looks pretty exciting. My email is ccs.simmons@gmail.com, if you wanted to email.
ReplyDeleteOxygen is one of the most abundant elements found in the Earth's crust. It is also the 3rd most commonly occurring element in the universe. The non-metallic gas is said to constitute more than 65% of the human body, three quarters of sea water and around half of dry soil. These points make it clear how essential the oxygen is to sustaining life on the planet Earth. Thin Film Deposition
ReplyDeleteProper installation of expansion joints allows you to manage where any movement in the system occurs, preventing damage or movement to the rest of the system by forcing it to occur at the join. Vacuum Flanges
ReplyDeleteOnce more, as referenced above, wtop vacuum
ReplyDeletehen making this examination, attempt to get the amp rating of the engine just rather than the whole machine.
I appreciated your work very thanks footcare drill
ReplyDeleteTherefore, it is best to either compare motor input power in watts of both machines or if you have to compare a machine rated in watts with one rated in amps, try to get the amperage rating of the motor only instead of the entire vacuum cleaner. You can then convert this to watts and have a meaningful comparison. best vacuum cleaner for hard
ReplyDeleteYou are offered the comfort of achieving various undertakings without bargaining your home's cleanliness. robot vacuums
ReplyDeleteI think this is an informative post and it is very beneficial and knowledgeable. Therefore, I would like to thank you for the endeavors that you have made in writing this article. All the content is absolutely well-researched. Thanks... Sydney Home Alarms
ReplyDeleteAll vacuum cleaners operate based on air flowing from the opening at the cleaning head or tool, through the vacuum cleaner and the bag and/or filter system and then out the exhaust port. car vacuum
ReplyDeleteThis is my first time i visit here. I found so many interesting stuff in your blog especially its discussion. From the tons of comments on your articles, I guess I am not the only one having all the enjoyment here keep up the good work best vacuum for pet hair
ReplyDeleteVery interesting blog. Alot of blogs I see these days don't really provide anything that I'm interested in, but I'm most definately interested in this one. Just thought that I would post and let you know. https://www.impactwrenchguides.com/
ReplyDeleteI have to search sites with relevant information on given topic and provide them to teacher our opinion and the article. best cordless vacuum for hardwood floors
ReplyDeleteHere is the place point by point and very much explored vacuum cleaner surveys will assist you with settling on the last decision of picking the best model for your necessities.best upright vacuum for stairs
ReplyDeleteThanks for the blog loaded with so many information. Stopping by your blog helped me to get what I was looking for. vacuum storage bags
ReplyDelete