Go Down

Topic: Newbie : help needed for 8 digit 7-segment display (Read 1 time) previous topic - next topic

YvesD

Jan 16, 2014, 09:19 pm Last Edit: Jan 16, 2014, 09:25 pm by YvesD Reason: 1
Hi,

Just had some stuff delivered.
As I'm trying to work out a timecaptering device for dogsports, i bought a 8 digit 7seg display @ dx.com.

It has 2x 74HC595D ic's on it, and is to be driven by 5 pins (gnd-ICLK?-ICLK?-DIO?-vcc)

the ink on the PCB is not so clear, so i had to gues what tke markings ICLK-ICLK-DIO mean.

the two 595D's are on the backside of the PCB

the pins are like this, and at the other side of the PCB they are repeated (to cascade)
°VCC
°ICLK ???
°ICLK ???
°DIO ???
°GND

I have an AT Mega 2560 ADK, in some samples it's adviced to use pins 12,11,10 for the connection.
When I run the sample, included with the LCDemo lib. nothing happens. Well some digits light up, but the "ARDUINO" text isn't displaying anyway...

What am I doing wrong? Should the double display (2x4) be driven by SPI, or by the pins 12,11,10?
And what pins from the display should be connected to what pins on the Mega?

Thanks,
Yves

Paul__B

So the picture you show shows markings of DIN (data in), LOAD (latches the information once it is shifted in) and CLK (clocks the data in).

I would tend to presume that if the other labelling on the display is the same, you should assume the obviously mis-labelled connections are actually as in the picture you show, and connect them up accordingly.

YvesD

Hi Paul,

Thanks, will try that first,  :)
the picture I posted was the only one that looked the most at the model I have.

Thanks,
Yves

FlyingWhale

Not sure if you have found the documentation on this device (sorry if you have).

I just googled the web address in the image found the product and there was a documentation link. Have not gone through it, but thought I would put it here for you anyway

http://embedded-lab.com/blog/?p=6862


YvesD

Hi FlyingWhale,

I checked the link, and it says the display should be capable of SPI, but it's with a different chipset on it.
Mine has 2x 74HC595D ic's on it.
Is there a manner to find out of the SPI capabilities without having the spec sheet?
And if it would be SPI capable, how to connect it to the Mega 2560 ADK?
Should it be pinned on the small header just behind the MCU?, and if so, on what pins?
Of course I'll do some research of my own, but like i menntioned earlier, i'm a total newbee in this matter  :smiley-red:

Thanks anyway, i'll try some things later on tomorow.
I will also take a pic of the display, that would make things easier,

Grtz,
Yves

Paul__B

Connections will be exactly the same as it is still SPI.  Forget the ICSP header.

Thing is, unless we know the wiring diagram, we just don't know how to program it!

YvesD

#6
Jan 18, 2014, 08:51 pm Last Edit: Jan 18, 2014, 10:11 pm by YvesD Reason: 1
Hi Paul,

Just took a pic of it.
Can't find any wiring diagram for the moment...

I have another question, if it's SPI capable, what's the benifit for me, do I get more pins free that way, is it faster, or does it use less recources?


edit:
could it be the pins are like this on the input side

°VCC         => put on 5V
°SCLK       => put on PIN10
°RCLK       => put on PIN11
°DIO          => put on PIN12
°GND        => put GND


i tried a bit of pinswapping, but the only thing I get, is funny characters that run over the display from right to left  :smiley-red:

i used this demo code:
Code: [Select]
//We always have to include the library
#include "LedControl.h"

/*
Now we need a LedControl to work with.
***** These pin numbers will probably not work with your hardware *****
pin 12 is connected to the DataIn
pin 11 is connected to the CLK
pin 10 is connected to LOAD
We have only a single MAX72XX.
*/
LedControl lc=LedControl(12,11,10,1);

/* we always wait a bit between updates of the display */
unsigned long delaytime=250;

void setup() {
 /*
  The MAX72XX is in power-saving mode on startup,
  we have to do a wakeup call
  */
 lc.shutdown(0,false);
 /* Set the brightness to a medium values */
 lc.setIntensity(0,8);
 /* and clear the display */
 lc.clearDisplay(0);
}


/*
This method will display the characters for the
word "Arduino" one after the other on digit 0.
*/
void writeArduinoOn7Segment() {
 lc.setChar(0,0,'a',false);
 delay(delaytime);
 lc.setRow(0,0,0x05);
 delay(delaytime);
 lc.setChar(0,0,'d',false);
 delay(delaytime);
 lc.setRow(0,0,0x1c);
 delay(delaytime);
 lc.setRow(0,0,B00010000);
 delay(delaytime);
 lc.setRow(0,0,0x15);
 delay(delaytime);
 lc.setRow(0,0,0x1D);
 delay(delaytime);
 lc.clearDisplay(0);
 delay(delaytime);
}

/*
 This method will scroll all the hexa-decimal
numbers and letters on the display. You will need at least
four 7-Segment digits. otherwise it won't really look that good.
*/
void scrollDigits() {
 for(int i=0;i<13;i++) {
   lc.setDigit(0,3,i,false);
   lc.setDigit(0,2,i+1,false);
   lc.setDigit(0,1,i+2,false);
   lc.setDigit(0,0,i+3,false);
   delay(delaytime);
 }
 lc.clearDisplay(0);
 delay(delaytime);
}

void loop() {
 writeArduinoOn7Segment();
 scrollDigits();
}



Thanks
Yves

mmoreira

This display from dealXtreme is a pain to program, because it's driven by 2 shift registers and its not SPI capable.

Here you can find a sample code that shows how to utilize this module: http://www.joshluben.com/blog/?p=670

YvesD

Hi,

Thanks will try this out, i now use some LCD display's but still has the 7-segment in stock, will defenitly try this out

Grtz,
Yves

Go Up