Pages: [1]   Go Down
Author Topic: Sure LED Matrix 3208 library confusion  (Read 1478 times)
0 Members and 2 Guests are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello,

I'm new to the Arduino-world. I played around with some LEDs, Sensors and LCDs and everything worked fine so far.

Now I'm trying to use a Sure LED 3208 based on HT1632C and I can't get it to work.

I found a lot of different libraries and even more example codes. Most of the libraries are named "HT1632.h", although they are different. Most of the examples include a "HT1632.h".
The problem is: I don't know, which example uses which library. Also some examples ( and libraries? ) seem to be developed for an older version of the Arduino-IDE. Other examples are for the older version of the LED-Matrix ( with HT1632 chip ).

Which is the most recent library that should work with IDE 1.0.4 and HT1632C-Version of the 3208-Matrix?
Logged

Canberra Australia
Offline Offline
God Member
*****
Karma: 8
Posts: 505
Hardcore Arduino
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi Treffnix,

Here is the general information for connecting the Sure 3208 display up to Arduino.
 http://scuola.arduino.cc/en/content/interfacing-arduino-uno-sure-electronics-led-dot-matrix-based-ht1632c-controller
 There is an interesting LED_image_drawing_utility in the Image drawing folder of the HT 1632 library. This is what the Blinking_heart code uses.
 Download the HT1632 Library here -
 https://github.com/gauravmm/HT1632-for-Arduino
 I also attached an image of the ribbon cable pinout. For one display use the connector next to the dip switch on the back on the 3208 and set switch 1 on with 2,3 and 4 all switched off as these are for cascaded displays.
 Here is the scrolling text code.
Code:
/*  http://scuola.arduino.cc/en/content/interfacing-arduino-uno-sure-electronics-led-dot-matrix-based-ht1632c-controller
    Pin 11  to GND
    Pin 12 to VCC
    Pin 3 ( CS1)  to Arduino Digital pin 9
    Pin 5 (WR) to Arduino Digital pin 10
    Pin 7 (DATA) to Arduino Digital pin 11
*/
#include <font_5x4.h>
#include <HT1632.h>
#include <images.h>
 
int i = 0;
int wd;
 
void setup () {
  // Setup and begin the matrix
  // HT1632.begin(CS1,WR,DATA)
  HT1632.begin( 9, 10, 11);
  
  // Give the width, in columns, of the assigned string
  // FONT_5x4_WIDTH and FONT_5x4_HEIGHT are parameter specified in the "font_5x4.h" file
  wd = HT1632.getTextWidth("I hope that you enjoy playing around with these Sure 3208 displays Doc !", FONT_5X4_WIDTH, FONT_5X4_HEIGHT);
}
 
void loop () {
  
  // Font rendering example
  HT1632.drawTarget(BUFFER_BOARD(1));
  HT1632.clear();
  HT1632.drawText("I hope that you enjoy playing around with these Sure 3208 displays Doc ", 2*OUT_SIZE - i, 2, FONT_5X4, FONT_5X4_WIDTH, FONT_5X4_HEIGHT, FONT_5X4_STEP_GLYPH);
  HT1632.render();  
  
  i = (i+1)%(wd + OUT_SIZE * 2);  
  delay(200);
}

 And the Blinking_heart code -
Code:
#include <HT1632.h>
#include <Images.h>
 
void setup () {
    HT1632.begin(9, 10, 11);
    // Where pinCS1, pinWR and pinDATA are the numbers of the output pins
    // that are connected to the appropriate pins on the HT1632.
}
 
void loop () {
    HT1632.drawImage(IMG_HEART, IMG_HEART_WIDTH,  IMG_HEART_HEIGHT, (OUT_SIZE - IMG_HEART_WIDTH)/2, 0);
    // The definitions for IMG_HEART and its width and height are available in images.h.
    // This step only performs the drawing in internal memory.
    HT1632.render();
    // This updates the display on the screen.
 
    delay(1000);
 
    HT1632.clear();
    // This zeroes out the internal memory.
    HT1632.render();
    // This updates the screen display.
 
    delay(1000);
}

I hope that this helps you out and good luck,

Pedro. smiley-cool

EDIT - I use Arduino IDE 1.0.3 but I do not think that you will have any problem using these two sketches with  IDE 1.0.4


* Sure_3208_circuit.bmp (51.92 KB, 443x237 - viewed 43 times.)
« Last Edit: May 22, 2013, 05:17:42 pm by Pedro147 » Logged


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

Thank you so much for your help.

I'll try starting from scratch with your information this evening.

I knew the first link, you posted. It's the reason I ordered that display because it looked quite simple. I tried to follow the instructions but had no success. So I became desperate, started googling and tried every piece of code I found.

I used Pin 11 and 12 instead of 15 and 16 for GND and 5V. Does that make a difference?
Logged

Canberra Australia
Offline Offline
God Member
*****
Karma: 8
Posts: 505
Hardcore Arduino
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

From memory there may be two sets of power/ground pins but if you use the pin out I have shown you it will work “no problemo”  smiley-cool
When you look at the ribbon cable from the 3208, with the locating tab on the right,
Top row left pin is pin 2,
Top row right pin is pin 1,
Second top row left pin is pin 4,
Second top row right pin is pin 3,
Down to,
Bottom row left pin is pin 16,
Bottom row right pin is pin 15.

Remember to plug the ribbon cable into the socket next to the four switch dip switch and set switch 1 to on with the other three switches off.

Let us know how you go Pedro.
Logged


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

Pedro, you are my hero!

As planned, I started from scratch. Deleted my library and even used new wires.

The first example again did not work, but after uploading the second example out of nothing a beautiful Heart popped up in the middle of the matrix, representing my feelings for you in that very moment.  smiley-wink

I still don't know, why the first example does not work, but adding some Text to the second one worked like a charme, so I don't really care anymore.

Thank you so much!
Logged

Canberra Australia
Offline Offline
God Member
*****
Karma: 8
Posts: 505
Hardcore Arduino
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

You are welcome Treffnix  smiley-cool
Logged


Pages: [1]   Go Up
Jump to: