Pages: [1]   Go Down
Author Topic: Sure 3208 Wiring Question  (Read 978 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 11
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I am trying to get the Sure 3208 running from my Arduino Uno using this library http://milesburton.com/HT1632_Arduino_%22Matrix_Display%22_Library_for_the_Sure_2416_and_0832.  I'm having trouble getting everything wired correctly so nothing is lighting up yet.  As far as I can tell, I need to wire +5v>Sure 12, GND>Sure 8, Arduino 4>Sure 3, Arduino 10>Sure 5, Arduino 11>Sure 6.  Am I missing anything?  I can feel the Sure controller chip heat up so I think it's getting power, but it must not be getting data.  Any help is greatly appreciated.  Thanks!
Logged

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

I ended up scrapping that library.  I think it was written for use with an older LED Matrix Controller.  I ended up using the Adafruit code for a 1632 display and reworking it to drive my 3208.  Here's the link: https://github.com/adafruit/HT1632
Logged

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

I recently had a play around with these displays and in case you are interested here is the general information for connecting the 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 had previously prepared this information for someone else on the forum but you may find some of it useful
Pedro.



* Sure_3208_circuit.bmp (51.92 KB, 443x237 - viewed 28 times.)
Logged


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

Thanks Pedro!  I was wondering if you stumbled across any code I could use to reverse the cathode/anode direction so it can work with the Green display.  It seems like the text I draw is rotated 90deg and mirrored vertically.  I saw there was a patch for the Miles Burton code, but I haven't seen anything for the other libraries.  Thanks!

Edit:  I'm also having trouble compiling the code from that library.  I keep getting a few errors:

Code:
sketch_jul29a.ino: In function 'void setup()':
sketch_jul29a:8: error: expected unqualified-id before '.' token
sketch_jul29a:9: error: expected primary-expression before '.' token
sketch_jul29a:9: error: 'FONT_5X4_WIDTH' was not declared in this scope
sketch_jul29a:9: error: 'FONT_5X4_HEIGHT' was not declared in this scope
sketch_jul29a.ino: In function 'void loop()':
sketch_jul29a:14: error: expected unqualified-id before '.' token
sketch_jul29a:15: error: expected unqualified-id before '.' token
sketch_jul29a:17: error: expected unqualified-id before '.' token
sketch_jul29a:20: error: expected unqualified-id before '.' token
sketch_jul29a:23: error: expected unqualified-id before '.' token
sketch_jul29a:24: error: expected unqualified-id before '.' token
sketch_jul29a:26: error: expected unqualified-id before '.' token
sketch_jul29a:29: error: expected unqualified-id before '.' token
sketch_jul29a:31: error: 'OUT_SIZE' was not declared in this scope
« Last Edit: July 29, 2013, 11:27:26 am by wtwerner » Logged

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

So I see that there's this patch for the Miles Burton library that allows you to use it for the Green 3208 display.  Is there any way to patch the Adafruit library to remap the LED Array?

Code:
                                                                                                                                                                                     
                                             
 

 

@@ -49,6 +49,10 @@ PORTC &= ~(1 << (_pin -14) ))
 
 #define DIRTY_BIT           0x80
 
+//if you want to use a green display(de-dp016)
+#define GREENDISPLAY
+
+
 
 ///////////////////////////////////////////////////////////////////////////////
 //  CTORS & DTOR
@@ -331,15 +335,36 @@ inline uint8_t MatrixDisplay::xyToIndex(
     y &= 0xF;
 
 
- uint8_t addresss = y > 7 ? 1 : 0; // Work out which panel it's on (top:0, bottom:1)
-    addresss += x<<1; // Shift x by 1 and add which panel it's on
+
+
+
+     
+#ifdef GREENDISPLAY     
+     uint8_t addresss = y > 7 ? 1 : 0;
+     addresss += (x<<1)^14;
+#else
+     uint8_t addresss = y > 7 ? 1 : 0; // Work out which panel it's on (top:0, bottom:1)
+   addresss += x<<1; // Shift x by 1 and add which panel it's on
+#endif
+
     return addresss;
 }
 
 inline uint8_t MatrixDisplay::displayXYToIndex(uint8_t x, uint8_t y)
 {
- uint8_t addresss = y == 0 ? 0 : (y / 4); // Calculate which quandrant[?] it's in
- addresss += x << 2; // Shift x by 2 and add which panel it's on
+     
+#ifdef GREENDISPLAY     
+     //new code
+     // actual formula for finding display memory adress from the X,Y 
+     uint8_t addresss = ((x<<2)^28);
+     addresss  += y<4   ? 1 : 0;
+     addresss  += y>11  ? 1 : 0;
+   addresss  += 7< y >12   ? 1 : 0;
+#else
+           uint8_t addresss = y == 0 ? 0 : (y / 4); // Calculate which quandrant[?] it's in
+           addresss += x << 2; // Shift x by 2 and add which panel it's on
+#endif
+
  return addresss;
 }
 
@@ -493,4 +518,4 @@ void MatrixDisplay::setBrightness(uint8_
  preCommand();
  writeDataBE(8,HT1632_CMD_PWM+pwmValue,true);
  releaseDisplay(dispNum);
-}
\ No hay ningún carácter de nueva línea al final del fichero
+}
</pre.
Logged

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

Sorry my coding skills are limited. Maybe someone else can help you, good luck smiley-cool
Logged


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

Hey I'm new as well with this Sure 3208. I think my display is malfunctioning as when I connect the 5V from arduino to the IDC cable and the Ground from arduino to the IDC cable my arduino uno turns off which means that there is a short. Can anybody please help me ?
Logged

Pages: [1]   Go Up
Jump to: