Shop OBEX P1 Docs P2 Docs Learn Events
PCF8583 clock/cal for PE kit — Parallax Forums

PCF8583 clock/cal for PE kit

RsadeikaRsadeika Posts: 3,837
edited 2007-04-12 20:25 in Propeller 1
I just got a couple of these chips, and·I would like to try it·out on the PE kit. The problem I am having is with the actual wiring part, anybody have any ideas as to how it should be wired to be address A1. Since the main eeprom address is A0, I do not want the clock/cal to be A0. I was thinking that pin 3, which is A0, should be left open, meaning nothing is connected, but I am not sure about that. I hope I can get this to be something other than A0.

Thanks

Ray

Comments

  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2007-04-10 21:53
    If you wire pin 3 (A0) high then the device address becomes $A2. The lsb is used for read/write control so that $A3 is the device address + READ which should be handled automatically by the I2C object.

    *Peter*
  • RsadeikaRsadeika Posts: 3,837
    edited 2007-04-11 11:48
    Thanks Peter

    After looking at the data sheet, on the first page, under features -

    slave address,

    · read A1 or A3

    · write A0 or A2

    I interpret that to mean pin 3 pulled low (ground), the address would be A0 write, and A1 read. The pin 3 pulled high (5V), the address would be A2 write, and A3 read. In your post when you mentioned A2, and A3, I kind of got lost, but now I think I got it straight. Now, the fun part starts, how do I program for this chip.

    The other feature of this chip is the 256 x 8-bit static RAM (32KB). Now, I am wondering, do I treat this like EEPROM or, are their other possibilities with this. The first thing that came to mind was a static ram disk, maybe with eight 4KB file system, or some other combination. Or can this be an extension for the main ram. I wonder what else could be done. This is most likely beyond my capabilities, but, what·the heck.

    This sounds like a neat little chip, has anybody used this with the propeller?

    Ray
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2007-04-11 12:15
    It's an old old chip and with the 256 BYTES of RAM it sucks too much power for me as I run RTCs on tiny 0.1F supercaps which normally will keep the RTC running for a week off power (no problem in commercial systems). I find the DS1302 chips a lot easier to get hold of etc and even though they are SPI I just connect the SCLK to SCL and the I/O to SDA and use one other dedicated pin to select it. The SPI doesn't interfere with I2C (no start/stop etc) and I2C can't interfere with SPI if it's not selected.

    I was amused how you interpreted 256 times 8-bit wide RAM to mean 32KB, I wish it was sometimes. The I2C bus is way too slow to consider using for any kind of RAM disk anyway.

    *Peter*
  • RsadeikaRsadeika Posts: 3,837
    edited 2007-04-11 14:49
    I could of·swore I saw a K after the 256, wishfull thinking on my part. So, this chip is becomming less usefull than I had anticipated. I guess I will have to see how painfull it could become trying to put it to good·use.

    Ray
  • parskoparsko Posts: 501
    edited 2007-04-12 20:25
    Rsadeika,

    I just wrote an object for that same chip, see this thread

    Attached is my code, that I know works. It isn't clean, as I simply wanted to get it going. I do plan to convert it completely to assembly, other than the output. You'll need to use a TV to see it, so if you're hooked up with VGA, it won't work.

    I'll be glad to answer any questions, as it took me longer than I am proud of to get it going. I know it pretty well now.

    -Parsko

    PS - There is a trick to reading it. I highlight the trick in the post above. I hope it will save you the 4 hours I lost to it...
Sign In or Register to comment.