DS1302 with ZX-24

Discussion specific to the 24-pin ZX microcontrollers, e.g. ZX-24r, ZX-24s and ZX-24t.
Post Reply
DH*

DS1302 with ZX-24

Post by DH* »

Can I use I²2 Channel 0 with the DS1302?
dkinzer
Site Admin
Posts: 3120
Joined: 03 September 2005, 13:53 PM
Location: Portland, OR

Post by dkinzer »

I suspect that it might get confused by the clock transitions that occur with the I2C START and STOP conditions.

Another alternative might be to use ShiftOutEx() with the flag bit that causes open drain transmission and then use ShiftIn() or ShiftInEx() to read the data.
- Don Kinzer
spamiam
Posts: 739
Joined: 13 November 2005, 6:39 AM

Re: DS1302 with ZX-24

Post by spamiam »

dhouston wrote:Can I use I²2 Channel 0 with the DS1302?
I think Don's suggestions make a lot of sense.

That is certainly the way to go as a first attempt.

If you are not bound to the 1302, I have had great results with the 1307, and have some support files posted on the Files forum.

-Tony
DH*

Post by DH* »

If you are not bound to the 1302, I have had great results with the 1307, and have some support files posted on the Files forum.
I'm not bound to it but I need a PDIP package, with trickle charge that is stocked by Mouser.

I'm designing a DIY (non-profit) application that will interface with any of several Home Automation controllers and cross-translate the various protocols. The ZX-24 RTC resets to Day 1 with a reset so I need a battery (or capacitor) backed RTC solely to reset the ZX-24 RTC after a chip reset. Some of the controllers have battery backed RTCs so I can interface with them. I'm planning to just provide a socket and a space for a super capacitor for those who will need it. All of the other parts are sourced at Mouser.

The DS1302 was all I could find that satisfies "all the above" conditions.

I guess I'll design the board to use the same pins
spamiam
Posts: 739
Joined: 13 November 2005, 6:39 AM

Post by spamiam »

hmmm, I didn't see ANY Dallas/Maxim RTC devices at all on Mouser. I must not have known where to look.

How many do you need. If it is just 1 or 2 then you can get evaluation samples from the factory.

I know the issue of powered-down timekeeping.

If it is going to be powered-up frequently, then a supercap is a great idea. In my projecy, it is liable not to be operated for weeks at a time, so I just went with a coin lithium cell. I expect 5+ years out of a 12mm diameter cell. THis is with a DS3231 precision RTC+oscillator device. In PDIP, I have a DS32KHZ precision oscillator running a DS1337 clock, but a 1307 would do too. All of these will work OK with lithium backup.

I have yet to find a good source for the very convenient SOIC DS3231

-Tony
DH*

Post by DH* »

hmmm, I didn't see ANY Dallas/Maxim RTC devices at all on Mouser. I must not have known where to look.

No, you just need to be at a certain age and have a faulty memory. I saw it at Digikey and later remembered seeing it at Mouser. :?

Mouser doesn't seem to have any PDIP-8 RTC chips so I'll have to rethink things.
mikep
Posts: 796
Joined: 24 September 2005, 15:54 PM

Post by mikep »

I like Mouser a lot and use them almost exclusively. However there are some things they just don't have that DigiKey usually does.

Mouser does have one 8-PDIP RTC chip (Part# 513-NJU6355ED). It's just not a Dallas/Maxim one and it's serial interface is not SPI or I2C.
Mike Perks
spamiam
Posts: 739
Joined: 13 November 2005, 6:39 AM

Post by spamiam »

I end up using digikey most often because they carry a larger percentage of the stuff I need than other places.

I find mouser's catalog harder to use. (print and online)

Digikey does carry the 1307 in TWI serial. I forget if the 1307 offers trickle charge capability.

Digikey has a different dallas SPI device. I do not know the details about that one at all.

-Tony
Genesis
Posts: 28
Joined: 14 January 2006, 21:46 PM

Post by Genesis »

I generally prefer Mouser and find that they are usually a bit cheaper too. My biggest issue with Digikey is that they penalize you for small orders - if you just need a couple of things that handling charge can be a bit bothersome. This happens with irksome regulairty when you're prototyping.... yeah, I know, shipping is a murderous percentage on small orders anyway, but at least Mouser doesn't bang me twice!

But Digikey stocks some things that Mouser does not, including the DS1307 in 8-DIP - which is quite a bit harder to find than in the other formats. Ditto for a few other things. I buy enough from both of them that they keep my supplied with current print catalogs....

I don't need trickle charge in most of my apps; I want coin cell backup because the unit may be off for extended periods of time.

I second the 1307 working well with the ZX - I am using one now for RTC functionality on a project and it is working swimmingly. No problems interfacing it at all.
spamiam
Posts: 739
Joined: 13 November 2005, 6:39 AM

Post by spamiam »

Genesis wrote: My biggest issue with Digikey is that they penalize you for small orders
Yes, that surcharge for small orders is very annoying. It makes meavoid ordering from them until I get a "big enough" order. I even avoid ordering one expensive item that I need the least so that I can make another order for all the stuff I forgot from the previous order, and still get over the $25 minimum.

I have one coming up. I am getting the new Optrex high contrast LCD displays. They have a black background. I think this means you need the backlight on all the time. Fortunately the power draw for the backlight is considerably less than it used to be. 45ma vs 240ma!

Well, back to work...

-T
Post Reply