I hope somebody can help me....at least get me pointed in the right direction.
I have a few SLR2016 5x7 Dot Matrix LED displays to test. I would LOVE to get something set up with an Arduino to just make sure these things work. I have searched the web for days on end and searched through this Arduino forum without luck. I have found a few YouTube videos that show this exact chip with scrolling text, but no one posts the code or schematics on how they did it. What is frustrating is that other users have posted questions on requesting the code or schematics and they do not get a reply.
It is like these people do this just to show off without sharing their knowledge.
These displays have 14 pins. They are:
Pin 1 Write
Pin 2 A1 Digit Select
Pin 3 A0 Digit Select
Pin 4 Vcc
Pin 5 D0 Data
Pin 6 D1 Data
Pin 7 D2 Data
Pin 8 D3 Data
Pin 9 D4 Data
Pin 10 D5 Data
Pin 11 D6 Data
Pin 12 Display Blank
Pin 13 Clear
Pin 14 GND
The displays have their own CMOS memory build in.
I don't have my Arduino kit here (hoping it will be here tomorrow), but I am hoping to get an idea where to go with this.
I see on the board that on one side of the board is marked Digital 0 through 13. Will I just jumper each of my D0 through D6 to these?
I see an A0 and A1 on the board too....will my A0 and A1 go to those?
Ground and 5v is pretty self explanatory.
That Display Blank and Clear do not have any corresponding connectors.
I found one comment on a website that said "I realized that they used the standard ASCII charset, so they are extremely easy to drive."
Ummm....no. They aren't when you have no idea what you are doing.
I have the Arduino software installed. I have the ASCII charset codes. I understand how to load code onto the Arduino.
brassbuilder:
I see on the board that on one side of the board is marked Digital 0 through 13. Will I just jumper each of my D0 through D6 to these?
Yes, but don't use D0 or D1. They are used for uploading your sketch on most Arduinos.
brassbuilder:
I see an A0 and A1 on the board too....will my A0 and A1 go to those?
They can do, although that isn't what they are primarily intended for. The "A" pins are analog inputs which can measure the input voltage level connected to them, as opposed to the "D" pins which are digital input/outputs and can only distinguish a low or high level. So most users tend to use analog inputs for potentiometers, temperature/light sensors and so on. But they are multi-purpose and can be used as digital outputs too. It would be more "normal" to connect the A0 & A1 to 2 more digital outputs on the Arduino.
brassbuilder:
That Display Blank and Clear do not have any corresponding connectors.
Connect those to 5V. That will prevent them doing anything. Don't leave them "floating" (unconnected).
The other connection that needs to go to a digital output on the Ardunino is the "WR".
Let us know when you have it all connected up and what outputs you have used. Can help you write the script.
Thanks Paul. That cleared up some of my questions. That is easy enough to understand and was a huge help.
Could you (or anybody) get me pointed in the right direction on writing the code? I'd post what I have but I have nothing and none of the tutorials have been any help. Everything I have found for LED has to do with getting an LED to light up instead of getting text to an LED 5x7 4-digit matrix display. Hooking up an LED and controlling it with a switch....THAT I could do
I know at the minimum, I need:
void setup()
void loop()
In the "void setup()" do I need to define or declare my pins? I think the "void loop()" is where i will run the code that will actually scroll the text.
From looking at the ASCII character set, if I want a capital letter "A", it gets set up like this:
D0 1
D1 0
D2 0
D3 0
D4 0
D5 0
D6 1
I know that "0" is LOW and "1" is HIGH.
I am guessing this will be good to know at some point...
The sheet I am using also has a column called HEX. If I follow that out, the capital "A" has either 14 assigned or 41 depending if I read Horizontal/Vertical or Vertical/Horizontal.
Mike, don't worry about the binary or hex codes for letters. They are ASCII codes, so in your sketch you will just be able to put 'A' and an A will appear!
Here's a starter, untested. You will need to adjust for the exact pins you end up using.
const byte SLR2016_D[] = {2, 3, 4, 5, 6, 7, 8};
#define SLR2016_A0 9
#define SLR2016_A1 10
#define SLR2016_WR 11
void setup() {
for (byte i = 0; i < 7; i++) {
pinMode(SLR2016_D[i], OUTPUT);
}
pinMode(SLR2016_A0, OUTPUT);
pinMode(SLR2016_A1, OUTPUT);
pinMode(SLR2016_WR, OUTPUT);
}
void loop() {
for (char c = 'A'; c <= 'Z'; c++) {
digitalWrite(SLR2016_A0, LOW);
digitalWrite(SLR2016_A1, LOW);
for (byte i = 0; i < 7; i++) {
digitalWrite(SLR2016_D[i], bitRead(c, i));
}
digitalWrite(SLR2016_WR, LOW);
digitalWrite(SLR2016_WR, HIGH);
delay(500);
}
}
Yes, setup() gets called once only, when the Arduino is powered up or reset. Then loop() gets called over and over. The loop() code I gave before is just a very simple example just to allow you to test if you have wired up the display correctly and it is working (hopefully I got it right - it is my guesswork having skimmed the data sheet very briefly indeed!).
All my loop() code does, or at least is intended to do, is display the letters A to Z in sequence on the display's first position. No scrolling messages yet - one step at a time!
I got it....I didn't see that the code you posted had a scroll bar on the right. I see the loop code now too. I just saw the setup code and thought that was it.
Everything makes sense now. Mail hasn't come but hoping that Arduino kit shows up today.
Got the Arduino hooked up to the computer and drivers loaded. I loaded the code listed above and got these errors:
sketch_nov28a.ino: In function 'void setup()':
sketch_nov28a:9: error: expected initializer before '<' token
sketch_nov28a:13: error: could not convert 'pinMode(9u, 1u)' to 'bool'
sketch_nov28a:14: error: expected )' before ';' token sketch_nov28a.ino: In function 'void loop()': sketch_nov28a:21: error: expected initializer before '<=' token sketch_nov28a:35: error: expected primary-expression at end of input sketch_nov28a:35: error: expected ;' at end of input
sketch_nov28a:35: error: expected primary-expression at end of input
sketch_nov28a:35: error: expected )' at end of input sketch_nov28a:35: error: expected statement at end of input sketch_nov28a:35: error: expected }' at end of input
I'm attempting to figure this out.....but any help is def appreciated
I went through the Tools and made sure the Arduino Uno was selected.
Made sure the correct COM port (4) was selected
I ran the code through the compiler too
The SLR2016_D[] is an array that should hold the pin numbers of only the data pins for the display, not the other pins too. You dont need #defines for those data pins as well.
In other words, my example code above just needed you to adjust the pin numbers, not add any more #defines or elements to the array.
You dont need to #define the other pins (after all, what would you define them as?)
Hope that anwers your questions. Your choice of Arduino pins should be fine.
PaulRB:
The SLR2016_D[] is an array that should hold the pin numbers of only the data pins for the display, not the other pins too. You dont need #defines for those data pins as well.
In other words, my example code above just needed you to adjust the pin numbers, not add any more #defines or elements to the array.
You dont need to #define the other pins (after all, what would you define them as?)
Hope that anwers your questions. Your choice of Arduino pins should be fine.
So does it work?
Yes....that did answer my questions
It works....sort of. I reread your intent with the code and it appears it is to cycle through the alphabet starting with A in the first position.
It cycles through x, y, z and {. It starts at Digit 0 (far right digit), then goes to Digit 2 (second from left), then Digit 1 (second from right) and then finally Digit 3 (far left). The exception is the bracket. It only does Digit 0 and Digit 2 and then the process repeats itself.
And is this code specific to Arduino or is it C++ or something?