CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

necessary components for application ???

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
small_chick



Joined: 17 Jul 2012
Posts: 53

View user's profile Send private message

necessary components for application ???
PostPosted: Fri Jul 20, 2012 9:38 am     Reply with quote

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

View user's profile Send private message

PostPosted: Fri Jul 20, 2012 9:44 am     Reply with quote

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

View user's profile Send private message

PostPosted: Fri Jul 20, 2012 10:11 am     Reply with quote

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

View user's profile Send private message AIM Address

PostPosted: Fri Jul 20, 2012 11:46 am     Reply with quote

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 Very Happy Very Happy
bkamen



Joined: 07 Jan 2004
Posts: 1615
Location: Central Illinois, USA

View user's profile Send private message

Re: necessary components for application ???
PostPosted: Fri Jul 20, 2012 12:02 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Fri Jul 20, 2012 1:42 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Sat Jul 21, 2012 9:59 am     Reply with quote

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

View user's profile Send private message

PostPosted: Sat Jul 21, 2012 10:15 am     Reply with quote

Right....

(drops ninja smoke bomb and .....
_________________
CCS PCM 5.078 & CCS PCH 5.093
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group