View previous topic :: View next topic |
Author |
Message |
small_chick
Joined: 17 Jul 2012 Posts: 53
|
necessary components for application ??? |
Posted: Fri Jul 20, 2012 9:38 am |
|
|
I have an idea to make an application with DS1307.It can be described as followed:
-I want to set up time for some important works I have to do, I intend to use DS1307 to create real time clock. When time that has been set up for a particular event comes, a bell will be trigger and I can hear the ringing sound , but I haven't got the trend to test if the time that has been set up for that event comes !
I hope you can give me some clues ! thanks a lot! |
|
|
Gabriel
Joined: 03 Aug 2009 Posts: 1067 Location: Panama
|
|
Posted: Fri Jul 20, 2012 9:44 am |
|
|
so basically you want to set up an alarm? and trigger events if (Alarm==True)
DS1307 does not have alarms.. however.. you can poll the time and when the time registers match... you can execute your "event" code.
G. _________________ CCS PCM 5.078 & CCS PCH 5.093 |
|
|
small_chick
Joined: 17 Jul 2012 Posts: 53
|
|
Posted: Fri Jul 20, 2012 10:11 am |
|
|
I think I have to trigger 3 datas: seconds,minutes, hours ( assumed that I set up schedule everyday similar). The triggerring order is seconds=>minutes=>hours ???
I intend to use I2C interface here, I'd like to ask one more question about instruction i2c_read(ack), the ack value is the value I will give back to the slave ? if so,could you give me an example when we don't assign ack value ( miss this value) , how will the slave react ? |
|
|
asmboy
Joined: 20 Nov 2007 Posts: 2128 Location: albany ny
|
|
Posted: Fri Jul 20, 2012 11:46 am |
|
|
have you put much thought in to:
1 - the hardware you will need ?
ie your schematic of the whole circuit /system?
2- how you SET real time in the RTC chip?
3-how you set alarms , and present the results of your timer program?
a complete pic application is much more than the source code alone |
|
|
bkamen
Joined: 07 Jan 2004 Posts: 1611 Location: Central Illinois, USA
|
Re: necessary components for application ??? |
Posted: Fri Jul 20, 2012 12:02 pm |
|
|
small_chick wrote: | I have an idea to make an application with DS1307.It can be described as followed:
-I want to set up time for some important works I have to do, I intend to use DS1307 to create real time clock. When time that has been set up for a particular event comes, a bell will be trigger and I can hear the ringing sound , but I haven't got the trend to test if the time that has been set up for that event comes !
I hope you can give me some clues ! thanks a lot! |
How about using a PIC18F that has a built in RTC -- those DO support alarms that allow putting the device to sleep or into idle modes.
The alarm can wake up the device.
I know the PIC18FxxJ11's or J53'a do this (there's even more models than this..)
Now you have a single chip solution rather than a 2 chip solution.
-Ben _________________ Dazed and confused? I don't think so. Just "plain lost" will do. :D |
|
|
Gabriel
Joined: 03 Aug 2009 Posts: 1067 Location: Panama
|
|
Posted: Fri Jul 20, 2012 1:42 pm |
|
|
I use a 16F886 with a crystal on TMR1 as an RTC.
I check the Alarm values against the time registers on each interrupt.
I've set my code to trigger every 16 seconds... so I _cant_ trigger alarms based on seconds, but triggering alarms on seconds is not relevant in my project.... I'm measuring a VERY slow process, so same minute resolution is good.
Its really simple, single chip solution with sleep and alarm wake up...
no battery backed RTC though, so I get screwed if I get a power fail/reset. _________________ CCS PCM 5.078 & CCS PCH 5.093 |
|
|
small_chick
Joined: 17 Jul 2012 Posts: 53
|
|
Posted: Sat Jul 21, 2012 9:59 am |
|
|
It's true that I have to do an assignment, and its content as follow: combining all PIC programming lessons I've learnt ( LCD,ADC,UART,I2C,PWM) with GUI (graphic user interface that is programmed by using VS Studio 2010 ) to create a game that allows player to interact with it. However, I have to use an digital sensor. I haven't got much knowledge about sensors and have never created a game, so it's really difficult for me.
I hope you can recommend me some ideas about a game and a "digital" sensor I can use. Thanks a lot! |
|
|
Gabriel
Joined: 03 Aug 2009 Posts: 1067 Location: Panama
|
|
Posted: Sat Jul 21, 2012 10:15 am |
|
|
Right....
(drops ninja smoke bomb and ..... _________________ CCS PCM 5.078 & CCS PCH 5.093 |
|
|
|