Hi!
I am Working on TimeCode Slate Project (Working with: Arduino Uno Rev. 3),
Now I working on the led display(8 digit 7 segment) code.
I'm trying to modify this timecode display code from: "Dan Thompson - Timecode Based Stopwatch"
http://danthompsonsblog.blogspot.co.il/2008/11/timecode-based-stopwatch.html
to work with led display (Originally, the code from his website is working with LCD screen).
I don't know how to change the code to work with the led display.
here is the arduino code in pastebin (due to problem in pasting the code here, i put it in pastebin):

and this is the ledControl lib's:
- lib "LedControl.h" file
- lib "LedControl.cpp" file

info about the display:
its MAX7219CNG+ IC Than Control 8 digit 7 segment led display.

Can you Please Help Me With that code?

P.S.: I'm Also Including the Code With led control library (in zip file).
(i cant post the code, there is some problem with pasting the whole code)

Thanks,
Man1919.

Dani AI

Generated

Brief summary and practical plan for : the fastest, most reliable way to convert Dan Thompson’s LCD-based timecode sketch to a MAX7219-driven 8-digit 7‑segment is to stop sending formatted strings to the LCD and instead build an 8-element digit array (0–9) plus a parallel array of decimal-point flags, then push that array to the display in a single update loop. This keeps timing stable, minimizes flicker, and maps cleanly to the LedControl API.

Initialization (example)

#include <LedControl.h>
const int DIN = 12, CLK = 11, CS = 10;
LedControl lc(DIN, CLK, CS, 1);

void setup() {
  lc.shutdown(0, false);
  lc.setIntensity(0, 8);
  lc.clearDisplay(0);
}

Render helper (example)

void showDigits(const uint8_t digits[8], const bool dp[8]) {
  for (int i = 0; i < 8; ++i) {
    // 'digits[i]' must be 0..9. For letters or symbols use setChar/setRow.
    lc.setDigit(0, i, digits[i], dp ? dp[i] : false);
  }
}

Practical notes and troubleshooting

  • Replace the LCD print points in the original sketch with logic that fills digits[8] from the timecode components (hours/min/sec/frames) using integer math (division and modulo) rather than String concatenation.
  • Use the decimal-point parameter to simulate separators (colon) by setting the DP on the digit immediately left or right of the separator, after verifying physical digit indexing.
  • Verify digit ordering by running a quick test that cycles 0–9 on each position to confirm which index maps to which physical digit; many modules reverse left/right.
  • Check wiring: DIN->data pin, CLK->clock pin, CS->load pin, common GND and 5V supply. Update only when values change to avoid unnecessary SPI traffic.
  • If letters or custom segments are needed, use setRow/setColumn or setChar with custom glyphs.

This approach isolates display code from timing logic, simplifies debugging, and works reliably on an Uno with the common MAX7219 modules.

i tried to pase the code here with no success

Never mind,
i guess i need to do it my own....

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.