Shop OBEX P1 Docs P2 Docs Learn Events
i2c and timing — Parallax Forums

i2c and timing

ArchiverArchiver Posts: 46,084
edited 2000-09-28 22:05 in General Discussion
hello all!

I think i have a timing problem, but am not sure. What i do is the
following, I have a i2c chip, pcf8583 from philips with 8 registers in byte
format, address of the registers are 0 to 7. All the registers are readable,
But only two at a time, and this is not according to specs of the chip.! so
if i start at address 0, I can read only address 0 and 1, if i start at
adress 2 i read only address 2 and 3, rest of the info i get is garbage. Can
this be happening because of timing difficulties?

I use the shiftin command to get my data, And the bs2 gives an acknowledge.

Any information is welcome!!
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

Share information about yourself, create your own public profile at
http://profiles.msn.com.

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2000-09-25 21:45
    At 9/25/2000 +0000 02:25 PM, you wrote:
    >hello all!
    >
    >I think i have a timing problem, but am not sure. What i do is the
    >following, I have a i2c chip, pcf8583 from philips with 8 registers in byte
    >format, address of the registers are 0 to 7. All the registers are readable,
    >But only two at a time, and this is not according to specs of the chip.! so
    >if i start at address 0, I can read only address 0 and 1, if i start at
    >adress 2 i read only address 2 and 3, rest of the info i get is garbage. Can
    >this be happening because of timing difficulties?
    >
    >I use the shiftin command to get my data, And the bs2 gives an acknowledge.
    >
    >Any information is welcome!!


    Check here:

    http://www.phanderson.com/stamp/i2c/8574.html

    Although this is a different unit, many of the principles are the same,
    including addressing, and I'd presume timing.

    Hope that helps.

    >_________________________________________________________________________
    >Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
    >
    >Share information about yourself, create your own public profile at
    >http://profiles.msn.com.
  • ArchiverArchiver Posts: 46,084
    edited 2000-09-27 01:35
    Hi Pieter,

    I am also playing with a pcf8583 and am having a few small problems.
    I seem to get all other i2c chips to work (eeproms rtc's etc), but am
    having problems reading from pcf8583.

    If you were to email me your BS2 program I could have a look and see
    what's going on for you. Perhaps we'll both be able to work it out.

    You should probably send a connection diagram or pinout that your
    using between the 8583 and the bs2.

    You can send prog to simon @ dataweb.com.au (no spaces).

    Regards,

    Simon.

    PS. One thing I have had i2c problems before with is the resistors on
    the i2c bus. For some chips only 12k resistors will work, and on
    other chips only 10k resistors will work. Perhaps you could play
    around with those values. Anyway, i'd still appreciate a copy of the
    code.


    --- In basicstamps@egroups.com, "Pieter-Jan van Diepen"
    <diepenpj@h...> wrote:
    > hello all!
    >
    > I think i have a timing problem, but am not sure. What i do is the
    > following, I have a i2c chip, pcf8583 from philips with 8 registers
    in byte
    > format, address of the registers are 0 to 7. All the registers are
    readable,
    > But only two at a time, and this is not according to specs of the
    chip.! so
    > if i start at address 0, I can read only address 0 and 1, if i
    start at
    > adress 2 i read only address 2 and 3, rest of the info i get is
    garbage. Can
    > this be happening because of timing difficulties?
    >
    > I use the shiftin command to get my data, And the bs2 gives an
    acknowledge.
    >
    > Any information is welcome!!
    >
    ______________________________________________________________________
    ___
    > Get Your Private, Free E-mail from MSN Hotmail at
    http://www.hotmail.com.
    >
    > Share information about yourself, create your own public profile at
    > http://profiles.msn.com.
  • ArchiverArchiver Posts: 46,084
    edited 2000-09-28 21:34
    On PCF8583 datasheet (page 22), the formula for the resistors is: R=Trise/C
    bus.

    On a french book application of this chip, a recommandation is specified to
    wire a solid aluminium condensator of 4.7µF between VDD and VSS.
    Maybe an help to solve problem ?

    C. Souche
  • ArchiverArchiver Posts: 46,084
    edited 2000-09-28 21:42
    Have also a look at recent email exchanges on this group, subject 24LC32 for
    portion of code.

    C. Souche
  • ArchiverArchiver Posts: 46,084
    edited 2000-09-28 22:05
    I can resend the code if need be.

    MH
    Original Message
    From: <Csouche@a...>
    To: <basicstamps@egroups.com>
    Cc: <Csouche@a...>
    Sent: Thursday, September 28, 2000 4:42 PM
    Subject: Re: [noparse][[/noparse]basicstamps] Re: i2c and timing


    > Have also a look at recent email exchanges on this group, subject 24LC32
    for
    > portion of code.
    >
    > C. Souche
    >
    >
    >
Sign In or Register to comment.