View previous topic :: View next topic |
Author |
Message |
jackhammer
Joined: 05 Sep 2011 Posts: 8
|
delay_us(1200000); 7 segment do not run |
Posted: Mon Sep 26, 2011 7:03 am |
|
|
I use 7 segment 4 base create colck digital do not have second base
24:00
I want delay 7 segment 4 base at minute help me
at first
delay_us(200);
normal number very quickly
delay_us(20000);
for a second 7segment have symptoms flashing
delay_us(1200000);
for a minute 7 segment do not run
![](http://upic.me/i/op/51142.jpg) |
|
![](templates/subSilver/images/spacer.gif) |
Ttelmah
Joined: 11 Mar 2010 Posts: 19368
|
|
Posted: Mon Sep 26, 2011 7:19 am |
|
|
Try reading the manual....
What does it say for 'parameters:' for the delay_us function?.
Best Wishes |
|
![](templates/subSilver/images/spacer.gif) |
jackhammer
Joined: 05 Sep 2011 Posts: 8
|
|
Posted: Mon Sep 26, 2011 7:29 am |
|
|
ู^
^
^
thank you
what have function delay
delay_?? for a minute |
|
![](templates/subSilver/images/spacer.gif) |
FvM
Joined: 27 Aug 2008 Posts: 2337 Location: Germany
|
|
Posted: Mon Sep 26, 2011 7:58 am |
|
|
Consider delay_ms(). |
|
![](templates/subSilver/images/spacer.gif) |
Ttelmah
Joined: 11 Mar 2010 Posts: 19368
|
|
Posted: Mon Sep 26, 2011 8:06 am |
|
|
Seriously though, this is not the way to create a digital clock.
Problem is, that the other code to actually display the data, takes _time_. The accuracy of a clock done like this will be appalling.
You need to be using the hardware to actually generate the time. A timer interrupt, or an RTC, so the time carries on counting, even if you are doing other things.
Best Wishes |
|
![](templates/subSilver/images/spacer.gif) |
uN_Eof
Joined: 17 May 2010 Posts: 29 Location: I live in Spain, with the toros, paella and tortilla
|
|
Posted: Thu Sep 29, 2011 8:22 am |
|
|
Try using a DS1307.
It's great, it has a pin that changes its state each second, connect that one to an INT_EXT pin, and you're good to go. Also you can get full date and time info by I2C.
http://www.maxim-ic.com/datasheet/index.mvp/id/2688 |
|
![](templates/subSilver/images/spacer.gif) |
bkamen
Joined: 07 Jan 2004 Posts: 1611 Location: Central Illinois, USA
|
|
Posted: Fri Sep 30, 2011 2:08 am |
|
|
or use a PIC with a built-in RTC like the PIC18 J-series.
I don't know if ALL of them have RTC's, but a lot do. I like the J11's.
-Ben _________________ Dazed and confused? I don't think so. Just "plain lost" will do. :D |
|
![](templates/subSilver/images/spacer.gif) |
|