2013-10-25

Max7219 blinking 8 digits OK




















Blinking 8 digits OK.

    while (1)
    {
    writeSegmentLedCommandToBuffer(digitControlRegisterBuffer, SHUTDOWN_ADDR, SHUTDOWN_MODE);
    writeBufferToMax7219(xferConfigPointer);
delayTime(ONE_SECOND);

    writeSegmentLedCommandToBuffer(digitControlRegisterBuffer, DECODE_MODE_ADDR, 
                                   CODE_B_DECODE_ALL_BITS);
    writeBufferToMax7219(xferConfigPointer);

    writeSegmentLedCommandToBuffer(digitControlRegisterBuffer, SCAN_LIMIT_ADDR, Max7219
                                   DISPLAY_8_DIGITS);
    writeBufferToMax7219(xferConfigPointer);

    writeSegmentLedCommandToBuffer(digitControlRegisterBuffer, DIGIT_0_ADDR, DIGIT_0_DATA);
    writeBufferToMax7219(xferConfigPointer);
    writeSegmentLedCommandToBuffer(digitControlRegisterBuffer, DIGIT_1_ADDR, DIGIT_1_DATA);
    writeBufferToMax7219(xferConfigPointer);
    writeSegmentLedCommandToBuffer(digitControlRegisterBuffer, DIGIT_2_ADDR, DIGIT_2_DATA);
    writeBufferToMax7219(xferConfigPointer);
    writeSegmentLedCommandToBuffer(digitControlRegisterBuffer, DIGIT_3_ADDR, DIGIT_3_DATA);
    writeBufferToMax7219(xferConfigPointer);
    writeSegmentLedCommandToBuffer(digitControlRegisterBuffer, DIGIT_4_ADDR, DIGIT_4_DATA);
    writeBufferToMax7219(xferConfigPointer);
    writeSegmentLedCommandToBuffer(digitControlRegisterBuffer, DIGIT_5_ADDR, DIGIT_5_DATA);
    writeBufferToMax7219(xferConfigPointer);
    writeSegmentLedCommandToBuffer(digitControlRegisterBuffer, DIGIT_6_ADDR, DIGIT_6_DATA);
    writeBufferToMax7219(xferConfigPointer);
    writeSegmentLedCommandToBuffer(digitControlRegisterBuffer, DIGIT_7_ADDR, DIGIT_7_DATA);
    writeBufferToMax7219(xferConfigPointer);

    writeSegmentLedCommandToBuffer(digitControlRegisterBuffer, SHUTDOWN_ADDR, 
                                   NORMAL_OPERATION_MODE);
    writeBufferToMax7219(xferConfigPointer);
delayTime(ONE_SECOND);
    }

.END

No comments:

Post a Comment