Yahoo Groups archive

Lpc2000

Index last updated: 2026-04-28 23:31 UTC

Thread

Real Time Clock issues

Real Time Clock issues

2006-02-01 by mhaines4102

I am having a problem with my real time clock. I can set it, but then
it does not ever move until it is set again. Below is the code used to
set it. I don't do anything else to activate it or turn it on. I
assume if we have hooked up the crystal correctly it will just take
off clocking. Is that correct or is there a register I need to change.

CCR = 0x10;
		
YEAR = year = setYear;
MONTH = month = setMonth;
DOM = dom = setDay;
DOW = dow = setDow;
HOUR = hour = setHour;
MIN = minute = setMinute;
SEC = second = setSecond;

isLeapYear = (!(year & 0x03));
DOY = doy = getDoy( year, month, dom );

CCR = 0x11;

Re: Real Time Clock issues

2006-02-01 by mhaines4102

Nevermind, I'm an idiot. I had commented out my update code ( to move
the time out of the RTC back into variables ) because I was testing. 

Thanks,

Mike Haines

--- In lpc2000@yahoogroups.com, "mhaines4102" <mhaines4102@y...> wrote:
Show quoted textHide quoted text
>
> I am having a problem with my real time clock. I can set it, but then
> it does not ever move until it is set again. Below is the code used to
> set it. I don't do anything else to activate it or turn it on. I
> assume if we have hooked up the crystal correctly it will just take
> off clocking. Is that correct or is there a register I need to change.
> 
> CCR = 0x10;
> 		
> YEAR = year = setYear;
> MONTH = month = setMonth;
> DOM = dom = setDay;
> DOW = dow = setDow;
> HOUR = hour = setHour;
> MIN = minute = setMinute;
> SEC = second = setSecond;
> 
> isLeapYear = (!(year & 0x03));
> DOY = doy = getDoy( year, month, dom );
> 
> CCR = 0x11;
>

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.