lcdout $fe,$c0, dec3 date ,":", dec3 month ,":", dec3 yearCode:loop: hour = hour + 1 if hour > 24 then day = day + 1 endif if day > 7 then day = 0 endif lcdout $fe,$c0, dec3 day pause 200 goto loop
lcdout $fe,$c0, dec3 date ,":", dec3 month ,":", dec3 yearCode:loop: hour = hour + 1 if hour > 24 then day = day + 1 endif if day > 7 then day = 0 endif lcdout $fe,$c0, dec3 day pause 200 goto loop
code :
loop:
hour = hour + 1
if hour > 24 then
day = day + 1
endif
if day > 7 then
day = 0
endif
lcdout $fe,$c0, dec3 day
pause 200
goto loop
i already try but the LCD display 000
is it because my declare wrong here
code:
symbol mon = 0
symbol tue = 1
day var byte
Last edited by cyber88; - 26th October 2007 at 08:17.
try this
loop:
hour = hour + 1
pause 100
if hour > 24 then
day = day + 1
endif
if day > 7 then
day = 0
endif
lcdout $fe,$c0, dec3 day
pause 1000
goto loop
thanks....it work well now...now i want to made an alarm for my clock, i connect my buzzer at PORTB.0 for pic16f84.how should i write the alarm coding and it auto send signal to buzzer when the alarm is match?
does anyone have a code for an alarm clock?my code for alarm seem not running.it cannot save the time i set to alarm the buzzer and whole alarm code not running.how can i save the time i set to alarm the buzzer and it auto wake me up everyday on that time without everyday set the alarm again?now i only left the alarm part for my LCD clock.can anyone please help me?
i read the asm code, it say move the part i want to save into eeprom.how can i do that in picbasic?
Last edited by cyber88; - 29th October 2007 at 07:14.
See if any of these threads help:
http://www.picbasic.co.uk/forum/show...ighlight=timer
http://www.picbasic.co.uk/forum/show...ighlight=timer
http://www.picbasic.co.uk/forum/show...ighlight=timer
http://www.picbasic.co.uk/forum/show...ighlight=timer
http://www.picbasic.co.uk/forum/show...ighlight=timer
Dave
Always wear safety glasses while programming.
Bookmarks