Hi
I have a MC14489 7Seg display driver, driving two displays.
The displays are wired to banks 1 and 5.
When i upload my code, the display flashes numbers and letters then goes blank.
I have tried to debug some info but get nothing through serial mon.
my coded returns no errors when verifying.
I am trying to make a simple counter 0 -99, at 1 sec intervals
here is my code
// Example 51.1
// Motorola MC14489 with HP 5082-7415 5-digit, 7-segment LED display
// 2k0 resistor on MC14489 Rx pin
// John Boxall 2013 CC by-sa-nc
// define pins for data from Arduino to MC14489
// we treat it just like a 74HC595
int data = 5;
int clock = 6;
int enable = 7;
int blank = 0;
int numa = 0;
int numb = 0;
void setup()
{
pinMode(data, OUTPUT);
pinMode(enable, OUTPUT);
pinMode(clock, OUTPUT);
displayOn(); // display defaults to off at power-up
Serial.begin(9600);
}
void displayTest1()
// displays 5.4321
{
digitalWrite(enable, LOW); // send 3 bytes to display register. See data sheet page 9
// you can also insert decimal or hexadecimal numbers in place of the binary numbers
// we're using binary as you can easily match the nibbles (4-bits) against the table
// in data sheet page 8
shiftOut(data, clock, MSBFIRST, numa); // D23~D16
shiftOut(data, clock, MSBFIRST, blank); // D15~D8
shiftOut(data, clock, MSBFIRST, numb); // D7~D0
digitalWrite(enable, HIGH);
delay(10);
}
void displayOn()
// turns on display
{
digitalWrite(enable, LOW);
shiftOut(data, clock, MSBFIRST, B00000001);
digitalWrite(enable, HIGH);
delay(10);
}
void displayOff()
// turns off display
{
digitalWrite(enable, LOW);
shiftOut(data, clock, MSBFIRST, B00000000);
digitalWrite(enable, HIGH);
delay(10);
}
void loop()
{
displayOn();
displayTest1();
if (numa < 9)
{
numa++;
}
else
{
numa = 0;
numb++;
Serial.print("A");
Serial.print(numa);
Serial.print("B");
Serial.print(numb);
delay(1000);
}
}
numa and numb are the displays while blank is a filler for unused banks.
any help would be greatfull.