Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Help my code for alarm clock !

Status
Not open for further replies.

hieu98dt

Newbie level 3
Joined
Apr 13, 2010
Messages
3
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,298
Hi all !

I just contact with pic and wrote the program real-time clock with pic 16f877A + ds1307+Led 7.My program is ok.and now I want to write program for alarm.How do i write that?
Please help me!

Pls see my attach file!

My english is bad, sorry!
 

Attachments

  • RTC alarm.rar
    3.3 KB · Views: 107

Depending on how you implement the "set alarm time" fucntion, then alarm is just an IF statement.

if (current_time == alarm_time)
{
// enable alarm
}

Then, you also need a "disable alarm" mechanism. When the user presses a button (Snooze, or Alarm Off), the output signal driving the alarm buzzer turns off (another IF statement).
 

Post the schematics and/or Proteus design file, I do remember making a melody alarm clock based on PIC18F2550 a few other chips, once you post the schematic/dsn file I try to port the alarm part of the code/design to 877A (provided I find it soon).

For people crapping my inbox with PM, please stop it.
If I find the project, and the thread starter posts his schematics, I will port it to 16F877A and post the results here. I strongly discourage private sharing, this is a discussion board and we are here to share with all, not specific individuals. Please understand this and stop sending me PMs.
 
Last edited:

hi abidr !

How to upload new file in here? I don't see "attach file", help me!
 

hi abidr !

How to upload new file in here? I don't see "attach file", help me!

Click "Go Advanced", then find the icon in the button field that has a paperclip. That should launch the attachments manager.
 

Ok,
I had some time while traveling so I sort of made a proteus .DSN file.
There were minor problems with the RTC code (pin definition), I corrected them recompiled the code and at least the RTC is working alright.
There are some problems with the main code fix them.
Once you fix them post it back again, as soon as I find time I will port the alarm code and adjust it within this circuit without any further alteration.
 

Attachments

  • PIC_Alarm_RTC.zip
    89.2 KB · Views: 104

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top