PDA

View Full Version : Interfacing DS1603 to PIC 16F877



hackableFM
- 25th February 2009, 15:57
Hi.

I'm new here to the forum so apologise for jumping in straight away with a question.

I have spent a few months playing with PIC's and have learnt enough now to create a system to control the various devices installed in my caravan. My most recent example is a 16F628 based 'Autofill' water tank level controller with LCD readout of tank levels.

For my next project, I plan to use a 16F877 with a menu to control various devices whilst at the same time displaying the charge state of the auxiliary batteries and the time & date on a 4 x 20 LCD display.

I have completed a program including a menu to monitor battery voltages etc and display them all on the LCD but my problem is IF try to include a piece of code which keeps track of time I feel it will not be accurate enough while the PIC is away completing other tasks it will affect the timekeeping section of the program.

I have scraped around and found a part in the junk box "DS1603" for which the Data sheet can be found HERE (http://datasheets.maxim-ic.com/en/ds/DS1603.pdf) which appears to keep track of time for me but I have no idea how to interface this device nor have I any idea how to create the software algorithm which the data sheet states will be required.

Has anyone ever dealt with this part before "DS1603" or can anyone point me in the right direction on interfacing this device and creating the correct software to read/write it? Then converting it to a usable string ready to print on an LCD? An example would be great as I have learnt more from reading other peoples code and trying to understand it. I find datasheets often help but they confuse the hell out of me at times.

Fingers crossed.

Paul.

mister_e
- 25th February 2009, 16:03
Probably you don't need it at all. Do a search for Elapsed Timer Demo and Olympic Timer in this forum.

http://www.picbasic.co.uk/forum/showthread.php?t=190

http://www.picbasic.co.uk/forum/showthread.php?t=632

HTH

hackableFM
- 25th February 2009, 16:09
Hey, Thanks for the very quick reply, I'm having a read up on it now. :cool:

Charles Linquis
- 25th February 2009, 16:42
Just a suggestion - if you are making a whole bunch of neat little projects, I'd stick with the 18F family. They offer a lot of advantages and don't cost that much more.

hackableFM
- 25th February 2009, 21:37
Just a suggestion - if you are making a whole bunch of neat little projects, I'd stick with the 18F family. They offer a lot of advantages and don't cost that much more.

I have heard that a few times from a few people. I have a few 16F type available at the moment but when I've used them all up I might look into buying the 18F's next.