MAX7219 32x32 LED Display

Post and discuss new components that you have created.
mnfisher
Valued Contributor
Posts: 2039
http://meble-kuchenne.info.pl
Joined: Wed Dec 09, 2020 9:37 pm
Has thanked: 160 times
Been thanked: 949 times

Re: MAX7219 32x32 LED Display

Post by mnfisher »

I would also remove the Refresh (from DispChar) - and draw all the characters before calling Refresh (the component buffers them)

So Clear Draw(hours), Draw(mins), Draw(secs) Refresh() (or similar)

Martin

mnfisher
Valued Contributor
Posts: 2039
Joined: Wed Dec 09, 2020 9:37 pm
Has thanked: 160 times
Been thanked: 949 times

Re: MAX7219 32x32 LED Display

Post by mnfisher »

The second 'update' method in the main loop also has an issue.

The 'button' or signal needs to come at exactly the right time... This might not be such an issue if the use presses and holds the button (for longer than - but if it is a digital signal then getting the timing 'just so' is problematic.

I would try using an interrupt to record a button press (A0/A1 changes to high) - and there is a possible need for some debounce if it is a button.
In the button_press ISR -> set_flag = true. This is easiest using INT0 or INT1 on D2 / D3.

Then in program loop..

if set_flag then
setup_RTC
set_flag = false

kaqkk007
Posts: 79
Joined: Sat Feb 04, 2023 1:09 pm
Has thanked: 4 times
Been thanked: 3 times

Re: MAX7219 32x32 LED Display

Post by kaqkk007 »

I think I've found the root of the problem: when I pressed the button in the settings, it didn't increment the variable's value; the calculation was missing: `hour = hour + 1`, `min = min + 1`, ... A trivial mistake...

mnfisher
Valued Contributor
Posts: 2039
Joined: Wed Dec 09, 2020 9:37 pm
Has thanked: 160 times
Been thanked: 949 times

Re: MAX7219 32x32 LED Display

Post by mnfisher »

Good work ..

kaqkk007
Posts: 79
Joined: Sat Feb 04, 2023 1:09 pm
Has thanked: 4 times
Been thanked: 3 times

Re: MAX7219 32x32 LED Display

Post by kaqkk007 »

bug .....

mnfisher
Valued Contributor
Posts: 2039
Joined: Wed Dec 09, 2020 9:37 pm
Has thanked: 160 times
Been thanked: 949 times

Re: MAX7219 32x32 LED Display

Post by mnfisher »

"A documented bug is a feature"

- but not sure where the quote is from?

kaqkk007
Posts: 79
Joined: Sat Feb 04, 2023 1:09 pm
Has thanked: 4 times
Been thanked: 3 times

Re: MAX7219 32x32 LED Display

Post by kaqkk007 »

The function was missing from the program I wrote; it was entirely my fault.I skipped the calculation...We'll be testing the updated version soon

mnfisher
Valued Contributor
Posts: 2039
Joined: Wed Dec 09, 2020 9:37 pm
Has thanked: 160 times
Been thanked: 949 times

Re: MAX7219 32x32 LED Display

Post by mnfisher »

Please let us know how it goes.....

Martin

kaqkk007
Posts: 79
Joined: Sat Feb 04, 2023 1:09 pm
Has thanked: 4 times
Been thanked: 3 times

Re: MAX7219 32x32 LED Display

Post by kaqkk007 »

That's as far as we've gotten so far I'm about to start designing the "custom numbers"
https://youtu.be/Ihku_Cox9Dk

Post Reply