Go Down

Topic: Interfacing LED-driver (Read 793 times) previous topic - next topic

roxlu

Dec 07, 2008, 02:15 am Last Edit: Dec 07, 2008, 02:15 am by roxlu Reason: 1
Hi,

We've trying all day to interface the MC14489 7-segmented LED driver, but we cannot figure out how to drive it. We assume we need to control ik like this:

Sending data:
---------------
- set enable pin to low
- 1a)set clock to low
- 1b) make data pin high / low (for 1 / 0)
- 1c) make clock pin high
- Do 1 a-c for all data / bits.
- set enable pin to high.

This is the general way of shifting data (as we think we need to use).

Though we cannot drive the leds as the a-h pins stay low. Therefore
we think we aren't configuring the MC144 correctly. Can someone please
tell us how or describe how we need to configure or control this
driver??

Here is the datasheet:
http://www.freescale.com/files/timing_interconnect_access/doc/inactive/MC14489B.pdf

Roxlu


Franklin

Show us how you have it connected and the real code you are using to drive it, that would help.
Stephen

roxlu

hi,

This is my code

int data = 4;
int enable = 2;
int clock = 6;
int write_data = 0xFF;
int count = 0;
void setup()
{

pinMode(data, OUTPUT);
pinMode(clock, OUTPUT);
pinMode(enable, OUTPUT);
}


void PulseClock(void) {
  digitalWrite(clock, LOW);
  delayMicroseconds(20);
  digitalWrite(clock, HIGH);
  delayMicroseconds(50);
  digitalWrite(clock, LOW);
}

void enableOn() {
digitalWrite(enable, HIGH);
}
void enableOff() {
 digitalWrite(enable, LOW);
}

void loop() {
// Send config bit.
enableOff();
writeByte(0xFF);
enableOn();

// Send data
enableOff();
writeByte(0x00);
writeByte(0x00);
writeByte(0x00);
enableOn();
delay(500);

// Send data
enableOff();
writeByte(0xFF);
writeByte(0xFF);
writeByte(0xFF);
enableOn();
delay(300);

/*
enableOff();
writeByte(0xCC);
enableOn();
enableOff();
 writeByte(0xCC);
 writeByte(0xCC);
enableOn();
*/
/*
digitalWrite(clock, HIGH);
delay(400);
 digitalWrite(clock, LOW);
 delay(400);
 */
}

void writeByte(int writeData) {
  for (count = 0; count < 8; count++) {
    writeBit(writeData & 01);
    writeData>>=1;
  }
}

void writeBit(boolean bHigh) {
digitalWrite(clock, LOW);
delayMicroseconds(10);


if (bHigh == true) {
  digitalWrite(data, HIGH);
}
else {
  digitalWrite(data, LOW);
}
// delayMicroseconds(10);



digitalWrite(clock, HIGH);
delayMicroseconds(10);
}

Rick S.

I too am having a similar problem using that display driver.  Roxlu, did you get it working?  It's a fairly old post, I was hoping you may have had some luck.

roxlu

Hi Rick,

As we had only 2 weeks we threw away these led-drivers and started using shift registers. We had to drive huge 7-segment LEDs (4 inch) so the shift registers we used could handle ±  20V.  (If you want I can give you the type number).

Gr. Roxlu

Rick S.

ah, I see.  I made some headway yesterday, actually.  It turns out I fried the first chip or it was faulty from the factory (probably the former).  I got the chip to print out some characters.  not the ones I wanted, but it prints something :)

Go Up