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 support@ccsinfo.com

data manipulation and real time clock

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



Joined: 05 May 2011
Posts: 4

View user's profile Send private message Send e-mail

data manipulation and real time clock
PostPosted: Fri Nov 04, 2011 7:42 pm     Reply with quote

Hi Sad
I am a bit new to ccs c. I am trying to read three adc values and time from the real time clock (ds1307) connected to my PIC microcontroller and send the data to another PIC wirelessly to be displayed on an LCD with their time stamp. Can anyone help with how can I go about doing that? And also how can I prevent the Real Time clock from initialising and being set every time I turn on my circuit?

thanx in advance
koketso
temtronic



Joined: 01 Jul 2010
Posts: 9170
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Sat Nov 05, 2011 9:42 pm     Reply with quote

This is a rather ambitious project so break it up into several sections.

1) Build the circuit with just the PIC(which one ???) and the DS1307 RTC. Be sure to read the 8 pages for the RTC.It will tell you exactly what you need to know about initializing it, reading it,etc.Currently I have a remote logger using this RTC. Super simple, esp. since there is a driver for it, though I modified it for my use.It keeps very good time and the auto power sense works fine.

ONCE you are very comfortable with programing the PIC to control the RTC(set time and date, read it , display on LCD, send to PC, etc) then...

2) add whatever is required for the ADC portion of the code.Again, READ, re-read and read some more. While CCS supplies great code examples and builtin functions ,take the time to learn what and why you're cutting code.I'd be sure I could read those 3 channels correctly, display on local LCD, send to PC then ..

3) the hard part, the 'wireless' aspect. First I would tie the two PICs together via RS232(using MAX488 or similar) and get that 'system' working as you think it should. Then and ONLY then, add the wireless modules and recode as required.This is the hardest part only because wireless modules are, well, harder to get to work unless you read thier documentation very,very carefully.

If you've done things properly and have built upon what you've learned you will have the project completed in 2 weeks to 4 months. It all depends on your level of expertise and how much effort you put into it.
Be sure to have several backups of the stage of your project.My silly little datalogger has over 125 'versions' which allows me to go back 1 step or 20 to try differnet code or philosophies of programming.As well, ALL files are backed up on 2 harddrives well as a flash drive.

As for the RTC problem , do you have a battery attached to pin 3 of the RTC ? Also be sure to use proper pullups. I use 4K7s or 3K3s at 5 volts, no problems in the past 3 months.
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