Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

using a RTC in SF basic

MrDEB

Well-Known Member
I have a DS-1302 RTC module but how to use it?
I recall Jon Chandler made a vu meter clock but what he used for timing?
Am planning on a clock that has no hands, just LEDs but precision would be nice.
 
I was trying to use 74hc595's but the math is not correct
60(seconds) X 8 (# of outputs) = 56 so we have 4 unused outputs
12(hours) / 8 (outputs) = 1.5
was contemplating counting DATA pulses so every DATA pulses (one every minute) would advance the shift register 1 bit.
 
I am using 10 PCB segments ... each Segment has 12 LEDs. 6 for minutes and 6 for hours...

1749840091919.png
 
MrDEB,

It is abundantly clear that despite hundreds of messages about using the shift registers you are still clueless about what they do.

You claim to have one shift register working with 8 LEDs. I challenge you to do the following exercise to help you understand. Each step here is only 2 lines of code. Post your code if you can make this simple exercise work. If you can't do this simple exercise, give up on using shift registers entirely.

Exercise: Light up the LEDs in the pattern shown, wait 5 seconds and move on to the next.

●○○○○○○○
○○○○○○○●
○○○●●○○○
●○●○○●●○
○○○○○○○○
○○○○●●●●
●●●●○○○○
●●●●●●●●
●○○○○○○○
●●○○○○○○
●●●○○○○○
●●●●○○○○
●●●●●○○○
●●●●●●○○
●●●●●●●○
●●●●●●●●
○●●●●●●●
○○●●●●●●
○○○●●●●●
○○○○●●●●
○○○○○●●●
○○○○○○●●
○○○○○○○●
○○○○○○●○
○○○○○●○○
○○○○●○○○
○○○●○○○○
○○●○○○○○
○●○○○○○○
●○○○○○○○
 
am about ready to give up on this. Tried several different codes but have yet to figure out the correct method to obtain desired pattern.
Am still attempting to get correct pattern
 
What is so difficult to understand?

Code:
To get 

  ● ○ ● ○ ○ ● ● ○

You shift out
 % 1 0 1 0 0 1 1 0

And toggle the latch pin.
 
been contemplating this idea but?
Now that I have a working shift register.
any thoughts on this beginning schematic?
 

Attachments

  • Schematic_clk-595_2025-06-17.pdf
    233.7 KB · Views: 8
Still trying to use the shift registers as a ring counter apparently. Looks like the entire concept has been, ah, misplaced.

Lots of parts to illuminate TWO LEDs at a time.
 
Last edited:
The only two LEDs at same time would be an hour LED and a minute LED. I think it was Jon's idea to use the 74hc595's.
As for the transistors, I didn't (make sure) about a floating input port pin.
schematic shows 2 - 18F processors as I want to check today on my supply of 18f2221 chips (have lots of 18f43k22).
Don't need 44 pins
 

Attachments

  • Schematic_clk-595_2025-06-18.pdf
    244.8 KB · Views: 2
I think it was Jon's idea to use the 74hc595's.
You better wade back to the start of this 20 page mess. I complemented
Beau Schwabe on his brilliant implementation using the '595s. Watch ALL of the videos he posted. He understands how to use them effectively. You do not.

I'm afraid all all these pages and pages and pages and pages of comments, you still DO NOT understand the concept. Somewhere back in this waste of bits, I pointed out that two single illuminated LEDs does not result in a readable clock display. Imagine a single green LED and a single blue LED illuminated in a dark room, with the green LED directly above the blue LED. 12:30? 1:25? 2:20? 11:35? 10:40? If two glowing dots are all yoi can see in the dark, you can't tell the difference.

I also explained back in this swamp land that having only 12 LEDs for hours makes for an extremely confusing display. If the "12" LED and the "55" LED are illuminated, what time is it?

am about ready to give up on this.

Everything you need to know to make something truly awesome has been explained here. But sadly, I think that ^^^^^^ is the best thought you've had on this.

Geez, I hate myself for being sucked back into this mess.
 
I asked Perplexity AI about Charlieplexing to illuminate 60 LEDs on your behalf, since I'm certain you're going to ignore everything I said in my last post.

To light up one fricken' LED out of 60, you need nine port pins. Stop torturing the shift registers forcing them to limp along doing virtually nothing and save yourself a bunch of hardware.

Please note – I am not recommending this technique to create something awesome – I'm suggesting it to make the lame clock you have in your head – see my previous post to understand lame.

Perplexity AI says the following:

Screenshot_20250618_074148_Perplexity.jpg


Screenshot_20250618_074126_Perplexity.jpg


Screenshot_20250618_074315_Perplexity.jpg
 
I apologize for being harsh but you have far exceeded the patience level of everyone who has attempted to help you in vain.
 

Latest threads

New Articles From Microcontroller Tips

Back
Top