avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [avr-gcc-list] Digital clock assembler programming problem


From: Nigel Winterbottom
Subject: RE: [avr-gcc-list] Digital clock assembler programming problem
Date: Mon, 5 Sep 2005 15:28:10 +0100


-----Original Message-----
From:
address@hidden
[mailto:address@hidden
.org]On Behalf Of Sivakumar Ganesan
Sent: 05 September 2005 13:33
To: address@hidden
Subject: [avr-gcc-list] Digital clock assembler programming problem


Hi everyone,
I am a newbie to AVR microcontroller programming.
I was quite successful in building some small applications like
blinking a LED, interfacing a 16*2 LCD and interfacing a 4*3 keypad.
Right now, I am trying to develop a digital clock display using
ATmega8 and 16 * 2.

Here is my question:

Initial clock set 00:00 (minutes:second)
Obviously, after for every 1 second i want to increment the seconds variables.
I can increment the second's  second variable up to 9. But, how can i
display numbers greater than 9, i.e, 10, 11,... by changing both
second's first and second's second varaible at the same time?

Thanks in Advance.

Bye 
        

-------------------------------


You could store the seconds & minutes in binary coded decimal (BCD). This will 
avoid your next question about how to convert binary to decimal digits.

e.g. 0x00, 0x01, ... 0x09, 0x10, 0x11, ... 0x58, 0x59, 0x00

Regards

Nigel






reply via email to

[Prev in Thread] Current Thread [Next in Thread]