Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

DS1302 Two chips ? ( one of set time )

Status
Not open for further replies.

1Steveo

New Member
I really need to get going on this project. But i cannot seem to fit all the code in to one chip .
So I thinking about using a 1 8pin (12f629) to set the Time . Remove it insert another to run the code.
I assume that the the ds1302 will keep running if I attach a button cell!

Anyone see anything wrong whit this?

Steveo
 
well, I have used the ds1302 in a data logger based on the 628 (2K code) my entire program is is about 1.25K but the biggest chunk of the code deals with reading the time and date from the serial port and formatting up the date and time for sending to the serial port. The SPI and ds1302 code occupies about 120 code words (set time, get time, set date, get date, init, spi functions). Written in C using CC5X. I'm sure I could shoehorn this into 1K if I removed a bunch of error checking on the date/time input and cleaned up the code a bit. Certainly in ASM it could fit in 1K.

more details are needed. I'm pretty sure this is surmountable without moving to a bigger chip.

Phil
 
Actually I was wanting to use a 8 pin (12f629)and a 14 pin (16f676), because the 676 pin has the same power grounds. To me it looks like the same chip just bigger with 4 extra IO pins.
That way I thought I could just install one, and use it to set up the ds1302 (Set the time/date) keep the rtc running and never have it change!
I using Picbasic if you can help! ( Im lost trying to understand the STATUS reg in ASM )
 
I don't know picbasic (and no desire to...).

It's my guess that there is some overhead associated with it. The code to read/write the ds1302 has to be pretty small, even in basic. can you strip out some of the stuff that isn't used? maybe there is an optimizing size section in the manual.

You can use C, by the way and thus don't have to worry about ASM at all.
 
Status
Not open for further replies.

Latest threads

Back
Top