GithubHelp home page GithubHelp logo

dnax / samsung_16lf01_vfd Goto Github PK

View Code? Open in Web Editor NEW
11.0 4.0 3.0 27 KB

Arduino driver library for the Samsung 16LF01 series 16-segments VFD

License: GNU General Public License v3.0

C++ 100.00%
vfd arduino arduino-library display

samsung_16lf01_vfd's Introduction

Samsung 16LF01 series VFD Library for Arduino Build Status

Written by Daniele Napolitano, distributed under GPL.

Samsung_16LF01_VFD is an Arduino library designed to drive characters 14/16-segments vacuum fluorescent display (VFD) with synchronous serial protocol (like SPI, but with different timing). The library, initially written to support the Samsung 16LF01UA3 display module, it's compatible with all displays using the Rockwell 10937, OKI MSC1937-01 and Micrel MIC10937 controllers.

The API used tries to be compatible with the LiquidCrystal library.

Compatible displays

The library Samsung_16LF01_VFD is fully tested with the following displays:

  • Samsung 16LF01UA3: 16-segments, 1x16 characters, uses OKI MSC1937-01

display_photo

Its known the existence of these Samsung VFD displays with the same Sync Serial protocol (see here):

  • 16LF01UA4: 16-segments, 1x16 character, uses OKI MSC1937-0
  • 9MS09SS1: 14-segments, 1x9 characters, uses ML9209-xx / Nuvoton W78E052DPG (see see #3)
  • VFM161LSA1: 1x16 characters, uses OKI MSC1937-01) (tested, img, see #2)

Perhaps other display from Samsung or other manufacturers share the same protocol, let me know :)

Usage

You need to include library header at the beginning of the sketch.

#include <Samsung_16LF01_VFD.h>

The library class inherits the Print class of Arduino, so that you can display texts (not all chars supported) on VFD with standard Arduino functions like this:

vfd.print("Hello, World!";)
vfd.print(foo, DEC);
vfd.print(bar, HEX);
vfd.print(1.23)         // gives "1.23" 
vfd.print(1.23456, 2);  // gives "1.23" 
vfd.println("hello");   // prints "hello" and return to position 0

Besides, it provides unified APIs for initializing and controlling the VFD, as well as some convenient operations.

void begin(uint8_t digits_count, uint8_t brightness); /* initializing */
void clear(); /* clear screen */
void home(); /* set cursor at first digit */
void setCursor(uint8_t pos); /* set current cursor (from 0) */
void setBrightness(uint8_t amount); /* set current display brightness (values allowed from 0 to 31) */

Example

/********************
  Pin config:
  
  SCLK = pin 7
  RST  = pin 6
  DATA = pin 5
*********************/

#include <Samsung_16LF01_VFD.h>

Samsung_16LF01_VFD vfd(7, 5, 6);

void setup() {
  // Initialize the display with 16 characters and medium brightness (values allowed from 0 to 31)
  vfd.begin(16, 15);
  vfd.print("Hello World!");
  delay(3000);
}

void loop() {
  // Prints the seconds elapsed since the initialization of the device
  vfd.print(millis() / 1000);
  vfd.println(" s");
  delay(1000);
}

samsung_16lf01_vfd's People

Contributors

danitool avatar dnax avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

samsung_16lf01_vfd's Issues

"multiple definition of " errors

Found the problem, something I did myself ๐Ÿฐ The 2 files .h and .cpp were present in the project folder which gave a conflict when verifying the code. Newby error, hope it helps someone in the future :)

I stumbled upon your github here and wanted to try and get my VFD going, not sure what is going on is this an error in the library?

I'm using an arduino uno r4

thanks :)

error dump:

C:Users\Jan\AppData\Local\Temp\arduino\sketches\E7D5AA76006BB786EB919FB4AF5162B4\libraries\Samsung_16LF01_VFD\Samsung_16LF01_VFD.cpp.o: In function Samsung_16LF01_VFD::reset()': d:\Users\Jan\Documents\Arduino\libraries\Samsung_16LF01_VFD/Samsung_16LF01_VFD.cpp:127: multiple definition of Samsung_16LF01_VFD::reset()'
C:\Users\Jan\AppData\Local\Temp\arduino\sketches\E7D5AA76006BB786EB919FB4AF5162B4\sketch\Samsung_16LF01_VFD.cpp.o:D:\Users\Jan\Documents\Arduino\display_tester/Samsung_16LF01_VFD.cpp:127: first defined here
C:Users\Jan\AppData\Local\Temp\arduino\sketches\E7D5AA76006BB786EB919FB4AF5162B4\libraries\Samsung_16LF01_VFD\Samsung_16LF01_VFD.cpp.o: In function Samsung_16LF01_VFD::sendCommand(unsigned char)': d:\Users\Jan\Documents\Arduino\libraries\Samsung_16LF01_VFD/Samsung_16LF01_VFD.cpp:136: multiple definition of Samsung_16LF01_VFD::sendCommand(unsigned char)'
C:\Users\Jan\AppData\Local\Temp\arduino\sketches\E7D5AA76006BB786EB919FB4AF5162B4\sketch\Samsung_16LF01_VFD.cpp.o:D:\Users\Jan\Documents\Arduino\display_tester/Samsung_16LF01_VFD.cpp:136: first defined here
C:Users\Jan\AppData\Local\Temp\arduino\sketches\E7D5AA76006BB786EB919FB4AF5162B4\libraries\Samsung_16LF01_VFD\Samsung_16LF01_VFD.cpp.o: In function Samsung_16LF01_VFD::setCursor(unsigned char)': d:\Users\Jan\Documents\Arduino\libraries\Samsung_16LF01_VFD/Samsung_16LF01_VFD.cpp:80: multiple definition of Samsung_16LF01_VFD::setCursor(unsigned char)'
C:\Users\Jan\AppData\Local\Temp\arduino\sketches\E7D5AA76006BB786EB919FB4AF5162B4\sketch\Samsung_16LF01_VFD.cpp.o:D:\Users\Jan\Documents\Arduino\display_tester/Samsung_16LF01_VFD.cpp:80: first defined here
C:Users\Jan\AppData\Local\Temp\arduino\sketches\E7D5AA76006BB786EB919FB4AF5162B4\libraries\Samsung_16LF01_VFD\Samsung_16LF01_VFD.cpp.o: In function Samsung_16LF01_VFD::clear()': d:\Users\Jan\Documents\Arduino\libraries\Samsung_16LF01_VFD/Samsung_16LF01_VFD.cpp:65: multiple definition of Samsung_16LF01_VFD::clear()'
C:\Users\Jan\AppData\Local\Temp\arduino\sketches\E7D5AA76006BB786EB919FB4AF5162B4\sketch\Samsung_16LF01_VFD.cpp.o:D:\Users\Jan\Documents\Arduino\display_tester/Samsung_16LF01_VFD.cpp:65: first defined here
C:Users\Jan\AppData\Local\Temp\arduino\sketches\E7D5AA76006BB786EB919FB4AF5162B4\libraries\Samsung_16LF01_VFD\Samsung_16LF01_VFD.cpp.o: In function Samsung_16LF01_VFD::home()': d:\Users\Jan\Documents\Arduino\libraries\Samsung_16LF01_VFD/Samsung_16LF01_VFD.cpp:74: multiple definition of Samsung_16LF01_VFD::home()'
C:\Users\Jan\AppData\Local\Temp\arduino\sketches\E7D5AA76006BB786EB919FB4AF5162B4\sketch\Samsung_16LF01_VFD.cpp.o:D:\Users\Jan\Documents\Arduino\display_tester/Samsung_16LF01_VFD.cpp:74: first defined here
C:Users\Jan\AppData\Local\Temp\arduino\sketches\E7D5AA76006BB786EB919FB4AF5162B4\libraries\Samsung_16LF01_VFD\Samsung_16LF01_VFD.cpp.o: In function Samsung_16LF01_VFD::setBrightness(unsigned char)': d:\Users\Jan\Documents\Arduino\libraries\Samsung_16LF01_VFD/Samsung_16LF01_VFD.cpp:102: multiple definition of Samsung_16LF01_VFD::setBrightness(unsigned char)'
C:\Users\Jan\AppData\Local\Temp\arduino\sketches\E7D5AA76006BB786EB919FB4AF5162B4\sketch\Samsung_16LF01_VFD.cpp.o:D:\Users\Jan\Documents\Arduino\display_tester/Samsung_16LF01_VFD.cpp:102: first defined here
C:Users\Jan\AppData\Local\Temp\arduino\sketches\E7D5AA76006BB786EB919FB4AF5162B4\libraries\Samsung_16LF01_VFD\Samsung_16LF01_VFD.cpp.o: In function Samsung_16LF01_VFD::setDigitsCount(unsigned char)': d:\Users\Jan\Documents\Arduino\libraries\Samsung_16LF01_VFD/Samsung_16LF01_VFD.cpp:152: multiple definition of Samsung_16LF01_VFD::setDigitsCount(unsigned char)'
C:\Users\Jan\AppData\Local\Temp\arduino\sketches\E7D5AA76006BB786EB919FB4AF5162B4\sketch\Samsung_16LF01_VFD.cpp.o:D:\Users\Jan\Documents\Arduino\display_tester/Samsung_16LF01_VFD.cpp:152: first defined here
C:Users\Jan\AppData\Local\Temp\arduino\sketches\E7D5AA76006BB786EB919FB4AF5162B4\libraries\Samsung_16LF01_VFD\Samsung_16LF01_VFD.cpp.o: In function Samsung_16LF01_VFD::begin(unsigned char, unsigned char)': d:\Users\Jan\Documents\Arduino\libraries\Samsung_16LF01_VFD/Samsung_16LF01_VFD.cpp:53: multiple definition of Samsung_16LF01_VFD::begin(unsigned char, unsigned char)'
C:\Users\Jan\AppData\Local\Temp\arduino\sketches\E7D5AA76006BB786EB919FB4AF5162B4\sketch\Samsung_16LF01_VFD.cpp.o:D:\Users\Jan\Documents\Arduino\display_tester/Samsung_16LF01_VFD.cpp:53: first defined here
collect2.exe: error: ld returned 1 exit status

exit status 1

Compilation error: exit status 1

Only half of the charmap is working

Hello ,

i got my hand on an XBT-C7220 , they use 2 Rockwell 10937

Every thing look good except the charmap is strangely working :

When i ask for @abcdefghijk , i got @@CCDDGGHHKK

Even when i change the setCursor , when is ask for cursor pos 0,1,2,3,4,5,6,7 the text start at 0,1,1,4,4,5,5,8

i've tried to slow down the timing , i've checked with my scope that the reset is working correctly , eveything is fine .

it look like a problem with second lsb ;(

Do you have any idea ?

Thanks !

Library is for a controller not just a spesific display module.

The Samsung 16LF01UA3, 16LF01UA4 and VFM161LSA1 all use the OKI MSC1937-01 VFD controller witch is a clone of the original Rockwell 10937 VFD controller.

Any VFD display that is based on the Rockwell 10937 VFD controller or one of its clones like the OKI MSC1937-01 or Micrel MIC10937 are compatible with this library.

Think of the Rockwell 10937 as the HD44780 for LCD displays, maybe you can rename the library to reference the name of the controller instead of a single module that is based on that controller.

The 9MS09SS1 display that also works uses a ML9209-xx VFD controller and a Nuvoton W78E052DPG microcontroller to translate the incompatible ML9209-xx protocol to the Rockwell 10937 protocol.

https://datasheetspdf.com/pdf/1339824/Rockwell/10937/1
https://datasheetspdf.com/pdf/27306/MicrelSemiconductor/MIC10937/1
https://datasheetspdf.com/pdf/626480/OKIelectroniccomponets/MSC1937-01/1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.