arduino i2c SAA1064 multiplexing always flickers.

Hello, Im am reverse enigneering a scoreboard with arduino.
The scoreboard has four sevensegement displays hooked on an SAA1064 nxp chip. and its connected to the arduino. i am able to operate the thing by i2c, but the darn thing keeps flickering in dynamic mode all the time, i have tried to raise i2c clock rate to 400khz but it didnt help. any ideas?

when i use it in static mode, it isnt flickering but then im not able to multiplex.

this is the code i have:

 /*include the i2c lib  */
 #include <Wire.h>
 
 /* define the SAA1064 i2c address */
 const int address = 0x38; 
 
 /* defining the digits 1 to 9*/
 const int numbers[11] = { B00111111, B00110000, B10011011,  B10111001, B10110100, B10101101, B10101111, B00111000, B10111111, B10111101,B00000000};
 
 /* defining the buffer wich is going to loop trough transmission */
 /*buffer[6] = {instructionbyte, contollbyte, digit 1, digit 2, digit 3,digit 4};*/
 unsigned char buffer[6] = {0x00, B01000111, numbers[1], numbers[2], numbers[3],numbers[4]}; 
 
 void setup(){
  /* connect i2c */ 
  Wire.begin();  
  /* keep it relaxe... */
  delay(50); 
 }
 
 void loop() {      
    
    /* begin transmission with SAA1064 */   
    Wire.beginTransmission(address); 
    
    /* loop buffer though transmission */
    for(int i = 0; i < 7; i++) Wire.send((byte)buffer[i]);
    
    /* end transmission */
    Wire.endTransmission();  
   
    /* delay */
    delay(50);
 }

i2c clock rate to 400mhz but it didnt help.

Wow :o

Or did you mean 400KHz?

try getting rid of:-
delay(50);

yes your right, delay's removed no different result.
Thanx

  1. the spi clock is between arduino and driver, probably doesn't affect driver to led.
  2. the driver to led frequency is probably set by some external components - what do you have there?
  3. do you have to keep sending the data over and over? What happens if you just send it once then leave the poor thing alone to get on with displaying it.

Google turned up this http://www.sbprojects.com/projects/saa1064/saa1064.htm which has a circuit diagram - worth a look.

i have a 1uF right there, guess it need to be 2.7nF as i read it somewhere.

i get the same result when sending it only once.

i have a 1uF right there, guess it need to be 2.7nF as i read it somewhere.

that could be it, the 1 uf would make a much lower frequency.

still its a reverse engineer project and some fellows at school designed it working with 1uF atleast thats what the teacher said. thats why i use 1uf, maybe its the teacher testing me...

well try it with a much smaller cap and see what happens! Where there's a cap there's usually a resistor to set the other parameter - do you see anything like that? Have you looked at the datasheet?

Just came across this issue and was looking for a solution myself. Found it (i think) after a little testing and figured I'd post if for the next person looking.

The SAA1064 datasheet shows a reference design using a 2.7nF capacitor connected to pin Cext. If I change out this cap for a much smaller one of 50pF (.05nF) then my flickering is gone.

Not sure why they recommend a cap that big, but a smaller one seems to resolve the flickering for me anyways.

I replaced the crystal and then the flickering stopped. Thanks for you comments :slight_smile:

Is it possible to use the SAA1064 in multiplex mode but with only 2 7-segment leds instead of 4? Or is it better to use the static mode? Reason I am asking is because I already wired for multiplex mode but realized there is a static node after the fact. Thank you!