Pages: [1]   Go Down
Author Topic: Ncr4X20Vfd Display help needed  (Read 1189 times)
0 Members and 1 Guest are viewing this topic.
The people's republic of Massachusetts
Offline Offline
Full Member
***
Karma: 0
Posts: 135
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

After a few hours of looking around I found the library and test code for this display.
But, I am not sure how to get it working....

I think I need to declare what pins I used? ( I went with 10 control pins + power as shown on the reference page)
Is this the location?
Code:
[color=#CC6600]Ncr4X20Vfd[/color] vfd(NCR_4X20_VFD_STROBE_PIN,
               NCR_4X20_VFD_BUSY_PIN,
               NCR_4X20_VFD_DATA0_PIN,
               NCR_4X20_VFD_DATA1_PIN,
               NCR_4X20_VFD_DATA2_PIN,
               NCR_4X20_VFD_DATA3_PIN,
               NCR_4X20_VFD_DATA4_PIN,
               NCR_4X20_VFD_DATA5_PIN,
               NCR_4X20_VFD_DATA6_PIN,
               NCR_4X20_VFD_DATA7_PIN);


My other question is the Arduino (MEGA 1280) has two sets of pins 1-15, the analog ones and the digital ones, how do I specify which one is to be used?



Code that won't compile:
Quote
/*
 Ncr4x20Vfd Library - Hello World
 
 Demonstrates use of the NCR 7454 / Futaba M204SD01B
 4x20 VFD module.
 
 This sketch prints "Hello World!" to the LCD
 and displays in seconds the amount of time the
 sketch has been running.

 TODO: Insert link to wiring tutoral.

 Reference page:
   http://arduino.cc/playground/Main/Ncr4X20VfdHelloWorld
 
 Originally created 6 Feb 2011

 This file is in the public domain.
*/

#include <Ncr4X20Vfd.h>

// See Ncr4X20VfdTutorialPins.h for other board defines.
#define NCR_4X20_VFD_ARDUINO_PINOUT
#include "Ncr4X20TutorialPins.h"

Ncr4X20Vfd vfd(NCR_4X20_VFD_STROBE_PIN,
               NCR_4X20_VFD_BUSY_PIN,
               NCR_4X20_VFD_DATA0_PIN,
               NCR_4X20_VFD_DATA1_PIN,
               NCR_4X20_VFD_DATA2_PIN,
               NCR_4X20_VFD_DATA3_PIN,
               NCR_4X20_VFD_DATA4_PIN,
               NCR_4X20_VFD_DATA5_PIN,
               NCR_4X20_VFD_DATA6_PIN,
               NCR_4X20_VFD_DATA7_PIN);

void setup() {
  
  // Drive the unneeded control lines high. The display's parallel
  // interface will not function correctly if they are low.
  digitalWrite(NCR_4X20_VFD_RESET_PIN, HIGH);
  digitalWrite(NCR_4X20_VFD_UNKNOWN_CONTROL1_PIN, HIGH);
  digitalWrite(NCR_4X20_VFD_UNKNOWN_CONTROL2_PIN, HIGH);
  
  pinMode(NCR_4X20_VFD_RESET_PIN, OUTPUT);
  pinMode(NCR_4X20_VFD_UNKNOWN_CONTROL1_PIN, OUTPUT);
  pinMode(NCR_4X20_VFD_UNKNOWN_CONTROL2_PIN, OUTPUT);
  
  // Start the library.
  vfd.begin();
  
  // Print an initial message on the VFD.
  vfd.print("hello, world!");
}

void loop() {
  // set the cursor to column 0, line 1
  // (note: line 1 is the second row, since counting begins with 0):
  vfd.setCursor(0, 1);
  // print the number of seconds since reset:
  vfd.print(millis()/1000);
  
  // We delay here. Sending data continuously with no breaks can
  // saturate the microcontroller on the display, preventing it from
  // updating it's output correctly.
  delay(10);
}

« Last Edit: January 26, 2012, 09:14:18 pm by 02660 » Logged

Gosport, UK
Offline Offline
Faraday Member
**
Karma: 21
Posts: 3113
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

To save everyone else a few hours of looking around, you could post a link to the library.
Logged

The people's republic of Massachusetts
Offline Offline
Full Member
***
Karma: 0
Posts: 135
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

info on the display is at:
http://arduino.cc/playground/Main/Ncr4X20Vfd
Logged

The people's republic of Massachusetts
Offline Offline
Full Member
***
Karma: 0
Posts: 135
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Okay I found my problem.
The IDE is NOT backward compatible...  The library will not work with version 1.0

Went to version 22, and all is good!  smiley-cool
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The bigger question is how do you modify the library to make it work with the new IDE?
Logged

The people's republic of Massachusetts
Offline Offline
Full Member
***
Karma: 0
Posts: 135
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

That is a good question, but above my pay grade at this time.   smiley-lol
It would not compile. 

Also,
The pins you are instructed to use in the playground page were also incorrect for the example code provided. Once I changed the pins all was good.  (page edited with correct pin numbers) 

I now have a working display and like it  smiley-grin smiley-grin smiley-grin

Logged

Gosport, UK
Offline Offline
Faraday Member
**
Karma: 21
Posts: 3113
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Read the release notes for version 1.0. It lists the changes that need to be made.

http://arduino.cc/en/Main/ReleaseNotes
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

This is what I did to make it compile, but then I burned out the VFD with too high a supply voltage smiley-sad

Ncr4X20Vfd.cpp - replace line 10 with the following:
Code:
#include "Arduino.h"
Ncr4X20Vfd.cpp - replace line 253 with the following:
Code:
size_t Ncr4X20Vfd::write(uint8_t character)
Ncr4X20Vfd.h - replace line 100 with the following:
Code:
virtual size_t write(uint8_t character);
Logged

Pages: [1]   Go Up
Jump to: