CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

delay_us(1200000); 7 segment do not run

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
jackhammer



Joined: 05 Sep 2011
Posts: 8

View user's profile Send private message Send e-mail

delay_us(1200000); 7 segment do not run
PostPosted: Mon Sep 26, 2011 7:03 am     Reply with quote

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
Sad

Ttelmah



Joined: 11 Mar 2010
Posts: 19267

View user's profile Send private message

PostPosted: Mon Sep 26, 2011 7:19 am     Reply with quote

Try reading the manual....

What does it say for 'parameters:' for the delay_us function?.

Best Wishes
jackhammer



Joined: 05 Sep 2011
Posts: 8

View user's profile Send private message Send e-mail

PostPosted: Mon Sep 26, 2011 7:29 am     Reply with quote

ู^
^
^
thank you

what have function delay

delay_?? for a minute
FvM



Joined: 27 Aug 2008
Posts: 2337
Location: Germany

View user's profile Send private message

PostPosted: Mon Sep 26, 2011 7:58 am     Reply with quote

Consider delay_ms().
Ttelmah



Joined: 11 Mar 2010
Posts: 19267

View user's profile Send private message

PostPosted: Mon Sep 26, 2011 8:06 am     Reply with quote

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
uN_Eof



Joined: 17 May 2010
Posts: 29
Location: I live in Spain, with the toros, paella and tortilla

View user's profile Send private message

PostPosted: Thu Sep 29, 2011 8:22 am     Reply with quote

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
bkamen



Joined: 07 Jan 2004
Posts: 1611
Location: Central Illinois, USA

View user's profile Send private message

PostPosted: Fri Sep 30, 2011 2:08 am     Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group