Let's Make Robots!

alarm clock

hi

im planning to use  Serial lcd with clock upgrade as a timer in my project.unfortunetly i have a problem with the programming (serial connection)

 

for displaying the time  on the LCD the syntax is

init: pause 500

main :serout 7,N2400,(1)

         pause 10

         serout 7,N2400,(0)

         pause 490

         goto main

 

 

for the alarm clock syntax

 

init: pause 500

main :serout 7,N2400,(253,9,"04:00:00                    ")

         pause 1000

         end

 

my question is how to set the alarm every 4 hours and also display the current time on the LCD.my confusion is  for the display syntax is in a loop but for the alarm is not.how can i combine this two syntax?do i only need to program the alarm ones and then program the picaxe for displaying the current time only?

 

thanks for the help in advance

 

p/s:the timer should triger every 4 hours

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

... than to just do it. Give it a try. Notice what goes wrong and then try something different. Start with a very short program and make it a little bit bigger every time you learned something about it.

That's how I build code. I work in computers, but I am not a programmer. I start with two line programs that end up as 2000 lines programs.

The pieces of code you are showing are probably examples from the manual? They only demonstrate how the serial command could be used. Not how they should be used. If this confuses you, ignore them and start for yourself. Just write your own "display time" code. Use the serout command as it's used in the examples.

Note that your display may be attached to a different pin on your micro controller. It could be different than the 7 in these examples.

PS, I removed the double post in "absolute beginners". That was too confusing.