Help driving a HCMS-3962

Hello all this is my first post,

I am trying to get a HCMS-3962 dot matrix to work with my Uno. I am using the LedDisplay library. So far all I get is the display to flash some of the string of letters once then nothing else. I am thinking my problem has to do with the OSC and SEL pins as I am not sure exactly what these pins require. Also I noticed the 3.3v is showing more like 4.5v, this is within spec for the HCMS but I am wondering if this is something that is expected?

Elegoo Uno R3
Arduino IDE 2.3.2
Windows 10

/*
  HCMS Display
 Language: Arduino/Wiring

 Displays a string on an Avago HCMS-297x display
 Scrolls the current display string as well.
 Anything you send in the serial port is displayed
 when the Arduino receives a newline or carriage return.

 String library based on the Wiring String library:
 http://wiring.org.co/learning/reference/String.html

 created 12 Jun. 2008
 modified 11 March 2010
 by Tom Igoe

 */
#include <WString.h>
#include <LedDisplay.h>

#define maxStringLength 180  // max string length

// Define pins for the LED display.
// You can change these, just re-wire your board:
#define dataPin 6              // connects to the display's data in
#define registerSelect 7       // the display's register select pin
#define clockPin 8             // the display's clock pin
#define enable 9               // the display's chip enable pin
#define reset 10               // the display's reset pin

#define displayLength 4        // number of chars in the display

// create am instance of the LED display:
LedDisplay myDisplay = LedDisplay(dataPin, registerSelect, clockPin,
                                  enable, reset, displayLength);

int brightness = 15;        // screen brightness

String displayString;        // the string currently being displayed
String bufferString;         // the buffer for receiving incoming characters

void setup() {
  Serial.begin(9600);
  // set an initial string to display:
  displayString = "ABCDEFGHIJKLMNOPQRZTUVWXYZ";

  // initialize the display library:
  myDisplay.begin();
  // set the display string, speed,and brightness:
  myDisplay.setString(displayString.c_str());
  myDisplay.setBrightness(brightness);
}

void loop() {
  // get new data in from the serial port:
  while (Serial.available() > 0) {
    // read in new serial:
    getSerial();
  }

  // srcoll left and right:
  /*if ((myDisplay.getCursor() >= 0) ||
    (myDisplay.getCursor() <= -(myDisplay.stringLength() - 8))) {
    myDirection = -myDirection;
    delay(1000);
  }
*/
  if (myDisplay.getCursor() <= -(myDisplay.stringLength() - 4)) {
    // when the string reaches the end, stop and then fade out
    delay(500);
    for (int n=brightness; n >= 0; n--) {
      myDisplay.setBrightness(n);
      delay(50);
    }
    // start the string back from the beginning
    myDisplay.setCursor(0);
    myDisplay.scroll(0);
    // fade back in
    for (int n=1; n <= brightness; n++) {
      myDisplay.setBrightness(n);
      delay(25);
    }
    delay(500);
    return;
  }
  myDisplay.scroll(-1); // direction of scrolling. -1 = left, 1 = right.
  delay(100);

}

void getSerial() {
  // get a new byte in the serial port:
  int inByte = Serial.read();
  switch (inByte) {
  case '\n':
  case '\r':
    // if you get a newline,
    // copy the buffer into the displayString:
    displayString = bufferString;
    // set the display with the new string:
    myDisplay.setString(displayString.c_str());
    // set the cursor, so the old string fade away now
    myDisplay.setCursor(-1000);
    // clear the buffer:
    bufferString = "";
    break;
  default:
    // if you get any ASCII alphanumeric value
    // (i.e. anything greater than a space), add it to the buffer:
    if (inByte >= ' ') {
      if (bufferString.length() < maxStringLength) {
        bufferString.concat(char(inByte));
      }
    }
    break;
  }
}

Hopefully I included all relevant data.

Hi @b1rkley ,

Welcome to the forum..

maybe, from the datasheet..

OSCILLATOR SELECT
Selects either an internal or external display oscillator source. (SEL) (logic low = External Display Oscillator; logic high = Internal Display Oscillator).

OSCILLATOR (OSC)
Output for the Internal Display Oscillator (SEL = logic high) or input for an External Display Oscillator (SEL = logic low).

Thinking SEL should be high 3.3v..
And yes, that screen is 3.3v, looks like the 2962 is 5v..

good luck.. ~q

Hi thanks for the reply.

Right now I have the SEL hooked to the 3.3V. Vled and Vlogic are also on tbe 3.3v.

With that screen, I'd run all the uno connections through a level shifter, so all is 3.3v..
I agrees with you that 4.5 seems to be tolerable, but the screens is 3.3v, give it what it wants..
I tend to have bad connections with bread boards, so double check everything, might just be bum connection..

~q

So I successfully got the display to read "hello world!" But i can only get it to work correctly when run off the 5V pin. I obviously don't want to drive it with 5v in my finished project (which is why i got the 3.3v one). Do you have an example of a level shifter circuit? Maybe shifting the 5v to 3.3 would work better than using the 3.3v pin.

If it's one way 5v to 3.3v then maybe try a voltage divider circuit..
if it's bi-directional then just purchase a level shifter board..

~q

After some trial and error, I disconnected the V-logic., This made it work with the 3.3v and now also its actually reading 3.3v. Not sure exactly why but it seems to be working correctly. Thanks for your input!

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.