I am trying to get MAX6921 to drive my display.http://datasheets.maximintegrated.com/en/ds/MAX6921-MAX6931.pdf
The segments is hooked up to OUT0-OUT6. Digits is connected to OUT7-OUT14.
The MAX6921/MAX6931 are normally written using the following sequence:
1) Take CLK low.
2) Clock 20 bits of data in order D19 first to D0 last into DIN, observing the data setup and hold times.
3) Load the 20 output latches with a falling edge on LOAD.
LOAD can be high or low during a transmission. If LOAD is high, then the data shifted into the shift register at DIN appear at the OUT0 to OUT19 outputs.
I have tried to use shiftout and a self made "shiftout" funtion.
The output seems a bit random to me (digits lights up but not in the way I want
Here is one of my code examples:
byte dummy=0; //Just to fill out the upper 4 bits
byte digit=1; // Try to lit one digit
shiftOut(dataPin, clockPin, MSBFIRST, dummy);
shiftOut(dataPin, clockPin, MSBFIRST, digit);
shiftOut(dataPin, clockPin, MSBFIRST, segFont); // segFont is a byte
void send_word(long data)
for(byte i=0; i<20; i++)
if (data & (1 << i))
I really would like to have some working Arduino code. I have looked at the code from Adafruits "Ice Tube Clock" but do not understand it.