 |
 |
| View previous topic :: View next topic |
| Author |
Message |
ckielstra
Joined: 18 Mar 2004 Posts: 3680 Location: The Netherlands
|
|
Posted: Mon Apr 16, 2012 5:03 am |
|
|
| princejude wrote: | | The clock does not retain time. That is, if I ON the clock, set time, leave it ON for some time, OFF it, restart it: the time will start from initial value. | This doesn't surprise me when your code is still the same as posted earlier: | Code: | void main()
{
rtc_init();
rtc_set_datetime(8,3,12,5,7,59); | Here you _always_ set the time on startup.
You have several options to fix this:
1) Do not set the time to a default value. The user will see the time is incorrect and will manually correct it once.
2) Read the time from the RTC before you set it on startup. If the time read is newer than your default time, then do nothing. |
|
 |
Mike Walne
Joined: 19 Feb 2004 Posts: 1785 Location: Boston Spa UK
|
|
Posted: Tue Apr 17, 2012 2:24 am |
|
|
You seem surprised that the common-base works!
Mike |
|
 |
princejude
Joined: 07 Aug 2010 Posts: 72
|
|
Posted: Tue Apr 17, 2012 6:35 am |
|
|
| Quote: | | You seem surprised that the common-base works! |
Yeah! What even surprised me most was transistor circuit without BASE-RESISTOR |
|
 |
SherpaDoug
Joined: 07 Sep 2003 Posts: 1640 Location: Cape Cod Mass USA
|
|
Posted: Tue Apr 17, 2012 8:30 am |
|
|
| princejude wrote: | | Quote: | | You seem surprised that the common-base works! |
Yeah! What even surprised me most was transistor circuit without BASE-RESISTOR |
It is a standard current driver configuration. The emitter resistor fills the usual role of the base resistor, plus it sets the drive current fairly independent of transistor gain. _________________ The search for better is endless. Instead simply find very good and get the job done. |
|
 |
|
|
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
|