# Making a displayless 24h timer for an alarm.

Status
Not open for further replies.

#### varkunus

##### New Member
thanks alot guys, ill get back to you when i start failing!!!

#### 3v0

##### Coop Build Coordinator
Forum Supporter
thanks alot guys, ill get back to you when i start failing!!!
It is not hard if you take it a step at a time. You need to build and work with the simple project first prior to doing yours.

#### varkunus

##### New Member
well could someone tell me how to make a clock using a flow chart. I know its kinda asking for help, but Ive been reading the manual over atleast 2 times and its still not sinking in, maybe if someone could give me an example then i can build around it.

Will a 1000 second clock be something like that?

main:
label_10: high 0
pause 1000
low 0
goto label_10

Last edited:

#### 3v0

##### Coop Build Coordinator
Forum Supporter
It is asking for us to do your work and it will not do you any good. You wanted to use the PICAXE. They have a good manual. etc etc.

What is it you do not understand in which manual ?

well could someone tell me how to make a clock using a flow chart. I know its kinda asking for help, but Ive been reading the manual over atleast 2 times and its still not sinking in, maybe if someone could give me an example then i can build around it.

Will a 1000 second clock be something like that?

main:
label_10: high 0
pause 1000
low 0
goto label_10

That code will almost blink an LED on gpio 0(if that is what they call it). By adding another delay it will.

Code:
main:
label_10:	high 0                       // turn led on
pause 1000                // wait with led on
low 0                        // turn led off
pause 1000                // wait with led off
goto label_10[

I am not sure what PICAXE uses for a comment indicator could be ; instead of // or maybe even REM.
To make a clock you will need to use variables to keep the time in. Wait add time to clock variable, do it again.

Last edited:

#### varkunus

##### New Member
so would i need to have it count to decade counter? Im just a bit confused on how to go about making a clock, could you tell me what I actually need to include bearing in mind im a complete BASIC noob

btw how do you change the values in the pause and pin numbers? You must convert to BASIC?

Last edited:

#### 3v0

##### Coop Build Coordinator
Forum Supporter
Please take the following as a friendly suggestion. This project requires that you learn to program. If you do not want to learn to program you should think about another project.

so would i need to have it count to decade counter? Im just a bit confused on how to go about making a clock, could you tell me what I actually need to include bearing in mind im a complete BASIC noob

btw how do you change the values in the pause and pin numbers? You must convert to BASIC?

I opened the manual and started to work out some examples for you but changed my mind. I do not want to invest (waste) any time in PICAXE basic. I see no valid reason to work with this ugly language.

If you can afford a programmer for real PICS I and others would be glad to help.

Unless you are willing to switch over to a real PIC I can not help you any further.
There must be a good PICAXE tutorials on the web ?

Last edited:

#### varkunus

##### New Member
no, there are no good tutorials . Anyway what programs would you recommend. THe school has a USB into pic (looks like a 1/8 stereo plug). So any ideas?

#### Torben

##### Well-Known Member
What's wrong with the tutorial from the picaxe site?

"There are no good tutorials" seems a little unlikely. What research have you done in trying to find them?

Torben

#### 3v0

##### Coop Build Coordinator
Forum Supporter
no, there are no good tutorials . Anyway what programs would you recommend. THe school has a USB into pic (looks like a 1/8 stereo plug). So any ideas?
If you are willing to switch go with Swordfish Basic for a language and the Junebug programmer from the link in my signature. Or a PICkit2 directly from Microchip.

#### varkunus

##### New Member
well how would i even go about make a clock which sends an output during desired times ? eg 6pm to 5am. Like i seriously have no idea, even if i knew all the commands how do you actually go about making a clock. And how do you edit the times, and pin numbers on PicAxe? And we have just found out our teacher is retiring end of the school year, so i need to have everything flawless by then.

#### blueroomelectronics

##### Well-Known Member
well how would i even go about make a clock which sends an output during desired times ? eg 6pm to 5am. Like i seriously have no idea, even if i knew all the commands how do you actually go about making a clock. And how do you edit the times, and pin numbers on PicAxe? And we have just found out our teacher is retiring end of the school year, so i need to have everything flawless by then.

It's your homework assignment, how can you have no idea how to do it? Are all you classmates as clueless?

#### varkunus

##### New Member
i am the only one in the class doing a PIC, so I have absolutely zero knowledge on the subject. My teacher just told me to go on pic axe. So cant you give me a helping hand? I mean its not going to hurt is it. At the moment im just doing stuff like this, but i cant seem to even change the values of the delay, or pins.

main:
label_30: high 0
wait 1
label_42: if pin0=1 then label_49
low 0
goto label_42

label_49: let pins = 160 'forward
goto label_30

#### blueroomelectronics

##### Well-Known Member
Have you googled PICAxe & Delay?
the PAUSE xxx command would be pretty handy.

#### varkunus

##### New Member
no i can do it on a flow chart, but i cant change the value of the pause its default 1000 m/s

#### blueroomelectronics

##### Well-Known Member
The do multiple PAUSE 1000

A loop comes to mind.

#### varkunus

##### New Member
right, so if i want do a day i gota do...

1000*60*60*24 = 86400000 right? And how do you do a loop function?

THe hardest bit for me to get my head around is when the client who this is aimed for calibrates it according to there working hours. So would it be possible for them to press a button at say 5pm when there work place closes, and then press another one when it open again, at say 7am. And then the PIC will always arm the alarm the alarm between these times? Or is that to complicated?

#### varkunus

##### New Member
think i got how to make a clock. If it starts at 12pm this is what happens

main:
label_10: high 1 (high pulse sent out at 12pm)
pause 518400
low 1 (at 6pm a low pulse is send out)
pause 950400
high 1 (at 7 in morning a high pulse is sent out)
pause 432000
goto label_10 (back to 12pm)

#### Torben

##### Well-Known Member

That has nothing whatsoever to do with the problem at hand. The device could squirt hairspray, paint, lemon juice, or whatever and the problem would be the same. The point is that he needs help with the programming.

Besides that, Google must be broken where you are. Hint: it's near the top on the first page of results.

Torben

#### Mikebits

##### Well-Known Member
That has nothing whatsoever to do with the problem at hand. The device could squirt hairspray, paint, lemon juice, or whatever and the problem would be the same. The point is that he needs help with the programming.

Besides that, Google must be broken where you are. Hint: it's near the top on the first page of results.
Torben

lol, I was wondering who would snap first. Not that you really snapped or anything, but this person does seem to be responding to post in some strange order without reading the whole thread, then repeating what has already been said or completely off base.

Last edited:
Status
Not open for further replies.

Replies
9
Views
3K
Replies
0
Views
2K
Replies
2
Views
1K
Replies
4
Views
1K
Replies
1
Views
632