Show Posts
Pages: 1 ... 330 331 [332] 333 334 ... 433
4966  Forum 2005-2010 (read only) / Interfacing / Re: Arduino to 384 LED display module (MCU Interface) on: November 13, 2009, 06:12:48 pm
Quote
I'll have to do something about replacing the geocities zip file
Now here:  http://homepage.mac.com/westfw/.Public/demo16x24.zip
(homepage.mac.com may go away too, replaced by "mobileme", but the existing file structure is supposed to stick around.)
4967  Forum 2005-2010 (read only) / Interfacing / Re: Arduino to 384 LED display module (MCU Interface) on: November 05, 2009, 03:06:45 am
I don't think put_shadowram() was ever posted, though it was described here:
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1225239439/112
(it's not mine, and it's not in my code.  I'll have to do something about replacing the geocities zip file, I guess.)


You can use ht1632_clear() as a sample.  Although there seems to be general agreement that it would be a good idea to use something other than digitalWrite() for the low-level bit-blasting if  you're really worried about performance.
Code:
/*
 * ht1632_clear
 * clear the display, and the shadow memory, and the snapshot
 * memory.  This uses the "write multiple words" capability of
 * the chipset by writing all 96 words of memory without raising
 * the chipselect signal.
 */
void ht1632_clear()
{
  char i;

  ht1632_chipselect(ht1632_cs);  // Select chip
  ht1632_writebits(HT1632_ID_WR, 1<<2);  // send ID: WRITE to RAM
  ht1632_writebits(0, 1<<6); // Send address
  for (i = 0; i < 96/2; i++) // Clear entire display
    ht1632_writebits(0, 1<<7); // send 8 bits of data
  ht1632_chipfree(ht1632_cs); // done
  for (i=0; i < 96; i++)
    ht1632_shadowram[i] = 0;
}
4968  Forum 2005-2010 (read only) / Interfacing / Re: Arduino to 384 LED display module (MCU Interface) on: October 09, 2009, 08:39:29 pm
(or perhaps the PCB is set  up to accept either Red displays (with cathodes on one set of pins) or green displays (with cathodes on another set of pins?)  You'll notice that both sets of cathodes in any given display are connected to the same signal.)
4969  Forum 2005-2010 (read only) / Interfacing / Re: Arduino to 384 LED display module (MCU Interface) on: October 09, 2009, 08:30:50 pm
The 24x16 display only has one led driver chip, which is only enough to drive the 384 red chips in the displays, regardless of whether they have green in there as well.  It could be a cost-savings measure to use the mass-produced R/G displays even if your circuit only uses one color.
4970  Forum 2005-2010 (read only) / Interfacing / Re: Arduino to 384 LED display module (MCU Interface) on: May 17, 2009, 12:23:02 am
You should be able to use the code at http://www.geocities.com/westfw/demo16x24.zip which includes the ability to draw characters (and stores the character data in progmem, so it doesn't run into the memory issues.)

For instance, here's the guts of a primitive clock:

Code:
void loop ()
{
  unsigned long curtime;
  byte tenhours, hours, tenminutes, minutes;

  delay (300);
  curtime = (millistart + millis())/1000L;  // get seconds
  curtime -= halfdays;
  tenhours = curtime / (10*60*60L);
  curtime -= tenhours * 10 * 60 *60L ;
  hours = curtime / (60*60L);
  curtime -= hours*60*60L;
  tenminutes = curtime / (60*10L);
  curtime -= tenminutes*60*10L;
  minutes = curtime / 60L;

  ht1632_putchar(19, 0, minutes + '0');
  ht1632_putchar(13, 0, tenminutes + '0');
  ht1632_putchar( 5, 0, hours + '0');
  if (tenhours > 0) {
    ht1632_putchar(0, 0, tenhours + '0');
    if (hours > 2) {
      halfdays += 60*60*12L;
    }
  }
  else {
    ht1632_putchar(0, 0, ' ');
  }
  // add colon
  ht1632_plot(11, 2, 1);
  ht1632_plot(11, 4, 1);
}
4971  Forum 2005-2010 (read only) / Interfacing / Re: Arduino to 384 LED display module (MCU Interface) on: April 02, 2009, 01:42:24 am
For the sake of completeness and education, here's the "waves" code converted to use progmem instead of a bit array.  Combining the two techniques is left as an exercise for the reader :-)

Code:
prog_uchar PROGMEM frameA[384] ={
  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
  0,0,0,0,0,0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,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,
  0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,
  1,1,0,0,0,0,0,1,1,1,0,0,0,0,0,1,1,1,0,0,0,0,0,1};

void display_pframe(prog_uchar frame[384]) {
  char x=0;
  char y=0;
  for (y=0;y<16;y++){
    for  (x=0;x<24;x++){
      ht1632_plot (x,y,pgm_read_byte_near(&frame[24*y+x]));
    }
  }
}  

void demo_pwaves()
{
  for (int i=0; i < (DEMOTIME/(DISPDELAY*3));  i++) {
    display_pframe(frameA);
    delay(DISPDELAY); // wait a bit.
    display_pframe(frameB);
    delay(DISPDELAY); // wait a bit.
    display_pframe(frameC);
    delay(DISPDELAY); // wait a bit.
  }
}
4972  Forum 2005-2010 (read only) / Interfacing / Re: Arduino to 384 LED display module (MCU Interface) on: April 02, 2009, 01:27:15 am
The arrays you have are in RAM, and are 384 bytes each.  Assuming an ATmega168, you have greatly exceeded the amount of RAM on the chip (1024 bytes < 384 * 3)  (I really wish the compiler would warn about really obvious cases like this!)  Even if you have a mega328 with 2k of ram, you might be over the limit by the time you take into account the other ram used by the program and core libraries.

You have two choices.

1) Use bit arrays instead of bytes.
2) put the arrays in progmem (flash) instead of ram.
3) both of the above.

Here's an example of using bits instead of bytes.  Looks like it works...  (I thought this might be more comprehensible than using progmem.  In retrospect, I'm not sure WHY I thought that...)

Code:
char frame1[] ={
  0b00000000, 0b00000000, 0b00000000,
  0b00000000, 0b00000000, 0b00000000,
  0b00000000, 0b00000000, 0b00000000,
  0b00000000, 0b00000000, 0b00000000,
  0b00000000, 0b00000000, 0b00000000,
  0b00000000, 0b00000000, 0b00000000,
  0b00000000, 0b00000000, 0b00000000,
  0b00000000, 0b00000000, 0b00000000,
  0b00000000, 0b00000000, 0b00000000,
  0b00000000, 0b00000000, 0b00000000,
  0b00000000, 0b00000000, 0b00000000,
  0b00000000, 0b00000000, 0b00000000,
  0b01110000, 0b01110000, 0b01110000,
  0b10001000, 0b10001000, 0b10001000,
  0b00100010, 0b00100010, 0b00100010,
  0b00011100, 0b00011100, 0b00011100};

char frame2[] ={
  0b00000000, 0b00000000, 0b00000000,
  0b00000000, 0b00000000, 0b00000000,
  0b00000000, 0b00000000, 0b00000000,
  0b00000000, 0b00000000, 0b00000000,
  0b00000000, 0b00000000, 0b00000000,
  0b00000000, 0b00000000, 0b00000000,
  0b00000000, 0b00000000, 0b00000000,
  0b00000000, 0b00000000, 0b00000000,
  0b00000000, 0b00000000, 0b00000000,
  0b00000000, 0b00000000, 0b00000000,
  0b00000000, 0b00000000, 0b00000000,
  0b00000000, 0b00000000, 0b00000000,
  0b00011100, 0b00011100, 0b00011100,
  0b00100010, 0b00100010, 0b00100010,
  0b10001000, 0b10001000, 0b10001000,
  0b00000111, 0b00000111, 0b00000111};

char frame3[] ={
  0b00000000, 0b00000000, 0b00000000,
  0b00000000, 0b00000000, 0b00000000,
  0b00000000, 0b00000000, 0b00000000,
  0b00000000, 0b00000000, 0b00000000,
  0b00000000, 0b00000000, 0b00000000,
  0b00000000, 0b00000000, 0b00000000,
  0b00000000, 0b00000000, 0b00000000,
  0b00000000, 0b00000000, 0b00000000,
  0b00000000, 0b00000000, 0b00000000,
  0b00000000, 0b00000000, 0b00000000,
  0b00000000, 0b00000000, 0b00000000,
  0b00000000, 0b00000000, 0b00000000,
  0b00000111, 0b00000111, 0b00000111,
  0b10001000, 0b10001000, 0b10001000,
  0b00100010, 0b00100010, 0b00100010,
  0b11000001, 0b11000001, 0b11000001};

void display_frame(char frame[]) {
  char xbyte, xbit;
  char y;
  for (y=0;y<16;y++){
    for (xbyte=0;xbyte<3;xbyte++){
      for (xbit=0; xbit<8; xbit++) {
        ht1632_plot ((xbyte<<3)+xbit,y, frame[(y+y+y+xbyte)] & (1<<xbit));
      }
    }
  }
}
 
4973  Forum 2005-2010 (read only) / Interfacing / Re: Arduino to 384 LED display module (MCU Interface) on: April 01, 2009, 11:13:39 am
Are you sure you have the pin numbering right?  I think your symptom can happen if +5 and GND connections are reversed (which is easy enough to do if you get the odd and even sockets rows mixed up.)  Here is what mine looks like:

http://picasaweb.google.com/lh/photo/HYKCZ78Bv5MPiEeQ-ct9dQ?feat=directlink



Note that the GND (orange) wire is on the keyed side of the connector (with all the data lines), and +5V (yellow) is on the far side...
4974  Forum 2005-2010 (read only) / Interfacing / Re: Arduino to 384 LED display module (MCU Interface) on: April 01, 2009, 01:20:23 am
Quote
The question is that I see BR1 and BR2 on the back of the board. Which of these should I be using?
They should be exactly equivalent; it's set up so you can connect one module to another with short IDC  cables, and have them all driven in parallel (except for the CSn inputs.)
4975  Forum 2005-2010 (read only) / Interfacing / Re: Arduino to 384 LED display module (MCU Interface) on: March 03, 2009, 07:17:59 pm
Filipe: do you have a smallish snippet of code that exhibits your "pulsing" problem on a single display?  I'm curious to see whether the same behavior shows up here...
4976  Forum 2005-2010 (read only) / Interfacing / Re: Arduino to 384 LED display module (MCU Interface) on: March 03, 2009, 07:16:10 pm
Quote
I for instance have led modules with the codes: SBM-1388ASRG (old) and HLG1388ASR (new).
The new modules are much brighter indeed.
Interesting.  Mine say "TOM-1088DEG"

This is a common "problem" with electronic components and items aimed at large manufacturers of consumer products.  If you want to build, say, a Core-class internet router (required to have a product support lifetime of 10 years by assorted potential customers) using an Intel CPU, you have to deal with a special subset of Intel to get chipsets that are committed to being produced for that sort of timeframe (and while using a cheap off-the-shelf PC motherboard in a commercial product SOUNDS like a fine idea, the average lifetime of a motherboard is appallingly short.  You replace the engineering you might have required to design your own hardware with procurement and testing issues as you try to find "this years compatible replacement" for your original choice...)  Sigh.
4977  Forum 2005-2010 (read only) / Interfacing / Re: Arduino to 384 LED display module (MCU Interface) on: March 02, 2009, 02:34:11 am
Interesting.  If you light only a couple vertical bars, do you still see the brightness difference?  (I did notice that with more than about 15 columns in a row lit, brightness starts to go down noticeably.  And the Holtek datasheet mentions that the chips may not be up to sinking a full 24 columns worth of LEDs in each row in the mode that this board uses it in.)
I've also noticed in the board I have that the LEDs appear to be "over-driven" - if you start using the built-in PWM the displays don't actually start dimming till you get to about "halfway."

Are you still having the "pulsing" problem?
4978  Forum 2005-2010 (read only) / Interfacing / Re: Arduino to 384 LED display module (MCU Interface) on: February 25, 2009, 10:06:40 pm
BTW, in case it hasn't been obvious, I've been very pleased with the way this whole "shared development" thing has worked out.

It's good to write software that other people can use.  And it's nice to have received a free toy (Thanks!)  But the best part has been watching people take off with the core functionality and do new things with it.  This is the way Open Source was meant to be (IMO) (and although all too often it consist of people only using what the original authors provided.)
4979  Forum 2005-2010 (read only) / Interfacing / Re: Arduino to 384 LED display module (MCU Interface) on: February 22, 2009, 03:28:14 am
Quote
The overall intensity of the LEDs is pulsating
As shows up in your video?
No, mine doesn't do that.  Does it do it with the demo code as well?
4980  Forum 2005-2010 (read only) / Interfacing / Re: Arduino to 384 LED display module (MCU Interface) on: February 12, 2009, 11:37:55 am
huh.  I reversed polarity on the display once as well, and mine still works; I guess I was lucky.

The same company does sell just the LED modules (explicitly bi-color) for less than they cost pre-attached to the board:  http://www.sureelectronics.net/goods.php?id=230

the driver chip on the DP016 board doesn't have enough outputs to do bipolar, of course...
Pages: 1 ... 330 331 [332] 333 334 ... 433