Pages: 1 ... 21 22 [23] 24 25   Go Down
Author Topic: Arduino to 384 LED display module (MCU Interface)  (Read 38557 times)
0 Members and 2 Guests are viewing this topic.
Melbourne Victoria Australia
Offline Offline
Newbie
*
Karma: 0
Posts: 17
Arduino rocks my Robot R0D0
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Its my 1st post here, I hope this code helps somebody I know it did me to write it, also I have some questions about taking the serial data from my robodruino and passing it to my adruino contolling my 24x16matrix. Also very interested if somebody can explain simply how to shorten the length of the demo bitmap data area in the demo16x24scroll by WestfW. I have made my own data for this but I cant identify what variable makes the area size for the bitmap? The demo data is the ladybits and I want to use less area than it uses somehow. would apreciate any help. Adz

Code:
// FigureOut Sure2416 v1.0 // Sure Green 24x16 Adz Kiss version.
// Copied ideas from all the Example democode and documentation I could find. Unfortunately found some examples would not work.
// Read many Adruino Forum threads and I noticed that many people like me found the example code hard to read and were
// asking for a kiss style explination of what is going on, I found to do this was enlightening in many ways about the
// board especially the offset referred too in the code but was hard to envisage, I hope this helps others to do so and
// clarify things about this board, mine is the oldest style green one from sure.
// I would especially like to understand the many function libraries and thier uses created by Miles Burton,Bill Westfield,etc,etc.
// I am trying to make my own font files with his notes with limited success.
// However from reading the forums its not easy to figure out thier great work, for many like me still learning as we go.
// Much Respect, Many Thanks and of course all apropriate Credits etc to all creators and contributors for thier
// respective efforts and code snippets.
// Premise is that board is divided into six 8x8 led modules arranged in 2high 3wide
// this creates 3 columns of 8leds wide by 16 high comprised of 6 individual (8x8 led modules)
//                                        Column1    Column2  Column3  Y coordinate number
//                                       |00000000||00000000||00000000|0
//                                       |00000000||00000000||00000000|1
//                                       |00000000||00000000||00000000|2
//                                       |00000000||00000000||00000000|3
//                                       |00000000||00000000||00000000|4
//                                       |00000000||00000000||00000000|5
//                                       |00000000||00000000||00000000|6
//                                       |00000000||00000000||00000000|7      {76543210  16 to  8  25 to 17?why not this?}
//Top X coodinate number    [6543210-1 14     to  7  22    to 15] not phone number as the website assumes      
//                                         Top   left      middle    right 8x8's
//                                       |00000000||00000000||00000000|8
//                                       |00000000||00000000||00000000|9
//                                       |00000000||00000000||00000000|10
//                                       |00000000||00000000||00000000|11
//                                       |00000000||00000000||00000000|12
//                                       |00000000||00000000||00000000|13
//                                       |00000000||00000000||00000000|14
//                                       |00000000||00000000||00000000|15
//Bottom X coodinate           [6543210-1 14   to   7  22    to  15      {wierd offset? are they all like this?)
//                                    Bottom   left      middle    right 8x8's
// I used this style of template as a key to the led on(*) and off(0) in the code.
// I will refer to the led positions in this format to clarify the led positions in relation to x,y adressing in code.
// I will add variables to use as columns later to display sensor data as 3 line graphs using the bars in this demo.
// My actual use for my display board and this code is to attempt to display visually the 3 Ultrasonic pings of my robot.
// I have 3*URM37 Ping sensors running on a robodruino, I hope to pass the data from them to this code in the future.
// I am working on representing the shape of the ultrasonic waves from my 3 sensors this way using the pulse fade effect.
// hopefully between brightness levels and 16 divisions I can represent my 3 distance sensors
#include "Sure2416.h"
void setup ()  // flow chart from page 17 of datasheet
{
  ht1632_displayInit();
  ht1632_clearScreen();
}
void columnon()
{
  ht1632_clearScreen();
  byte x,y, bits;
  char intensity;
 for (x=24,y=16;y>=0;y--) {// as this loop decrements starting at 16 lines draw on bottom rows working up each time y goes down
                           // therefore if y is >8 then in bottom panel
     for (intensity=0; intensity <= 14; intensity++) { //      intensity lowest to highest
   ht1632_sendcmd(HT1632_CMD_PWM + intensity);
   delay(LONGDELAY/64);  // change the pulse intensity lowest to highest speed here,4/8/15/32/64/128/256 I tried them all
   }                                 //Bottom Panels starts here                                                  
                                     // 6543210-1 (coordinatex) // Led Positions on Line on bottom left 8x8  
        ht1632_setPixel(-1,15+y,1);  // 0000000* strange thing is left column extreme right led requires -1 to set on
        ht1632_setPixel(0,15+y,1);   // 000000*0 zero starts on 2nd led from right
        ht1632_setPixel(1,15+y,1);   // 00000*00 then they go across back towards the left
        ht1632_setPixel(2,15+y,1);   // 0000*000 as you increase x value
        ht1632_setPixel(3,15+y,1);   // 000*0000 this offset seems very odd to me
        ht1632_setPixel(4,15+y,1);   // 00*00000 I wonder if all of them are wired/setup this way?
        ht1632_setPixel(5,15+y,1);   // 0*000000 Never thought I would need to use a -1 was surprized.
        ht1632_setPixel(6,15+y,1);   // *0000000
        // draw line at base of middle column on bottom middle 8x8
        ht1632_setPixel(7,15+y,1);   // 0000000*
        ht1632_setPixel(8,15+y,1);   // 000000*0
        ht1632_setPixel(9,15+y,1);   // 00000*00
        ht1632_setPixel(10,15+y,1);  // 0000*000
        ht1632_setPixel(11,15+y,1);  // 000*0000
        ht1632_setPixel(12,15+y,1);  // 00*00000
        ht1632_setPixel(13,15+y,1);  // 0*000000
        ht1632_setPixel(14,15+y,1);  // *0000000
        // draw line at base of right column on bottom right 8x8
        ht1632_setPixel(15,15+y,1);  // 0000000*
        ht1632_setPixel(16,15+y,1);  // 000000*0
        ht1632_setPixel(17,15+y,1);  // 00000*00
        ht1632_setPixel(18,15+y,1);  // 0000*000
        ht1632_setPixel(19,15+y,1);  // 000*0000
        ht1632_setPixel(20,15+y,1);  // 00*00000
        ht1632_setPixel(21,15+y,1);  // 0*000000
        ht1632_setPixel(22,15+y,1);  // *0000000
{ if (y<=8&&y>=0){// if y is <=8 then line position in top panel // yes I could have 1/2ed the code here but its the Kiss version.
                                     //Top Panels starts here// Led Positions on Line across each column  
                                     // 6543210-1(coordinatex)// left column on top left 8x8
        ht1632_setPixel(-1,15+y,1);  // 0000000* anybody else think this is strange? right led requires -1 to set on
        ht1632_setPixel(0,15+y,1);   // 000000*0  
        ht1632_setPixel(1,15+y,1);   // 00000*00
        ht1632_setPixel(2,15+y,1);   // 0000*000
        ht1632_setPixel(3,15+y,1);   // 000*0000
        ht1632_setPixel(4,15+y,1);   // 00*00000
        ht1632_setPixel(5,15+y,1);   // 0*000000
        ht1632_setPixel(6,15+y,1);   // *0000000
        // middle column middle 8x8 middle column on top middle 8x8
        ht1632_setPixel(7,15+y,1);   // 0000000*
        ht1632_setPixel(8,15+y,1);   // 000000*0
        ht1632_setPixel(9,15+y,1);   // 00000*00
        ht1632_setPixel(10,15+y,1);  // 0000*000
        ht1632_setPixel(11,15+y,1);  // 000*0000
        ht1632_setPixel(12,15+y,1);  // 00*00000
        ht1632_setPixel(13,15+y,1);  // 0*000000
        ht1632_setPixel(14,15+y,1);  // *0000000
        // right column right 8x8  right column on top right 8x8
        ht1632_setPixel(15,15+y,1);  // 0000000*
        ht1632_setPixel(16,15+y,1);  // 000000*0
        ht1632_setPixel(17,15+y,1);  // 00000*00
        ht1632_setPixel(18,15+y,1);  // 0000*000
        ht1632_setPixel(19,15+y,1);  // 000*0000
        ht1632_setPixel(20,15+y,1);  // 00*00000
        ht1632_setPixel(21,15+y,1);  // 0*000000
        ht1632_setPixel(22,15+y,1);} // *0000000
                  }                                  
 for (intensity=14; intensity >= 0; intensity--) { //         intensity highest to lowest
    ht1632_sendcmd(HT1632_CMD_PWM + intensity);
    delay(LONGDELAY/8); // change the pulse intensity highest to lowest speed here,4/8/15/32/64/128/256 I tried them all
          }    
      }  
   }
void loop ()
{
        columnon();
  }
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 36
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Might be a stupid question, but where does one download the current version of this library?
Logged

Melbourne Victoria Australia
Offline Offline
Newbie
*
Karma: 0
Posts: 17
Arduino rocks my Robot R0D0
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

This page has links to latest and original libraries,

http://milesburton.com/index.php/Arduino_&_the_Sure_2416_Information_Display

Adz.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 36
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Is it now generally accepted that the Matrix Library has replaced Westfw original code base?

I noticed on the author's site that all the demo video demonstrated an error mapping the rows on one of the screens ?? (the far right panel) I don't recall this being an issues on the westfw original library/code base.
Logged

Offline Offline
Jr. Member
**
Karma: 2
Posts: 85
(╯°□°)╯︵ ┻━┻
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

@filmo

No, evething works fine now.
Logged

SF Bay Area (USA)
Offline Offline
Tesla Member
***
Karma: 135
Posts: 6763
Strongly opinionated, but not official!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Is it now generally accepted that the Matrix Library has replaced Westfw original code base?
I haven't worked on the code in a long time, or paid much attention to how things have evolved.  So I can't comment...
It certainly sounded like good things were  happening after I stopped working on it!

Logged

Offline Offline
Jr. Member
**
Karma: 2
Posts: 85
(╯°□°)╯︵ ┻━┻
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Has anyone managed to write a scroll function for milesburton's lib?
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 22
Arduino styrer!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Anybody with experience with DE-DP11112 (24x16 with HT1632C controller)?
Seems like the pixel addresses are not quite the same.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 9
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello everyone. Here is the video of the project I started long back  :-/, but completed yesterday. Thanks to Andrew, WestFW, BillHO and everyone who contributed in the thread.[media]http://www.youtube.com/watch?v=kS4ztguHPD8[/media]

Logged

Get happiness out of your work or you may never know what happiness is.

0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 59
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm looking for the latest Arduino code / libraries, etc. for the Sure Electronics 0832 (original) display. I'm somewhat of a beginner with the Arduino and C but have worked with the 0832 with other Micro-controllers.

I saw the one link from Miles Burton:

milesburton.com/index.php/Arduino_&_the_Sure_2416_Information_Display

but I can't get the 0832 to light up on with the Arduino (works fine with another micro-controller).

I read the 'Simple' code as the following:

DATA (0832 pin 7) - Arduino pin 10
WR (0832 pin 5) - Arduino pin 11

(1) 0832 display with CS1 ON - (0832 pin 3) - Arduino pin 4 (?)

Can someone help / confirm?

Thanks!
Logged

chandler,az,usa
Offline Offline
Newbie
*
Karma: 0
Posts: 1
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Here is the code to make the miles birton 2.0 library work with the 2009-mid2010 green displays.

Make sure the calc bit is:

#define CalcBit(y) (1 << (y > 7 ? y -8 : y))

and change these two procedures:

inline uint8_t MatrixDisplay::xyToIndex(uint8_t x, uint8_t y)
{

    // cap X coordinate at 24th column
    x = x > 23 ? 23 : x;
    // cap Y coordinate at 16
    y &= 0xF;
      
#ifdef REDDISPLAY      
      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
      
#ifdef GREENDISPLAY      
      uint8_t addresss = y > 7 ? 1 : 0;
      addresss += (x<<1)^14;

#endif
      
    return addresss;
}

inline uint8_t MatrixDisplay::displayXYToIndex(uint8_t x, uint8_t y)
{
      //old code(red display)
#ifdef REDDISPLAY
            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
      
#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;
      
      
      
#endif
      return addresss;
}

the rolling demo works but the new code still needs some testing so consider it alpha code.


mike.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 39
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello,
Sure Electronics is now selling the 32X16 Red Green Bicolor LED Dot Matrix. At the moment only the 5 mm ones. Hopefully on Ebay (=buying easier), soon.
Logged

North Yorkshire, UK
Offline Offline
Faraday Member
**
Karma: 104
Posts: 5531
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Nice. As usual, as cheap as anything  smiley-wink
Logged

0
Offline Offline
Edison Member
*
Karma: 8
Posts: 1411
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Hopefully on Ebay (=buying easier), soon.
On ebay already.
Logged

0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 59
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I was building a larger sign which used 2 of the 5 mm 6432 displays. I have one and was planning on getting another one tonight when I see thst they are now obsolete by the smaller 32x16 RG displays. Now instead of using 2 6432 displays I need to buy 8 of the 32x16 RG new displays. At $20 each, that's expensive!

Does anyone know where I can find a working 5 mm LED 6432 Display?

Thanks
Logged

Pages: 1 ... 21 22 [23] 24 25   Go Up
Jump to: