Truncated match.
PICList
Thread
'I2C problems : PIC vs Philips'
1999\01\19@062945
by
Tjaart van der Walt
|
Hi
I have stumbled on a problem with compatability between
PICs and the Philips' PCF range I2C real time clocks.
Sometimes the Philips chip just stops responding to
the bus - it won't ACK for love nor money. Apparently
this problem does not occur with the Philips or Atmel
micros - only with PICs.
My questions
1) Has anyone else on this list experienced this?
2) Does anyone know of a fix (except a power cycle)?
My code is definitely correct.
--
Friendly Regards /"\
\ /
Tjaart van der Walt X ASCII RIBBON CAMPAIGN
spam_OUTtjaartTakeThisOuT
wasp.co.za / \ AGAINST HTML MAIL
|--------------------------------------------------|
| WASP International |
|R&D Engineer : GSM peripheral services development|
|--------------------------------------------------|
| Mobile : .....tjaartKILLspam
@spam@sms.wasp.co.za (160 text chars) |
| http://www.wasp.co.za/~tjaart/index.html |
|Voice: +27-(0)11-622-8686 Fax: +27-(0)11-622-8973|
| WGS-84 : 26¡10.52'S 28¡06.19'E |
|--------------------------------------------------|
1999\01\19@080418
by
Quentin
|
Don't know if this going to be related but it might help others: By
using the PCF i/o I have found that the PCF needs time to rise and fall
for Ack/not Ack. I always put a small delay between the SCL pulse for
LSB and SCL pulse for Ack. As a test put a temporarily long delay
between the two.
I picked this up on my 'scope. Create a synch pulse (BSF then BCF or
whatever) on a spare o/p pin just before your Start code and connect
this on your Y input and trigger the 'scope on Y. Use X1 and X2 for SDA
and SCL. If your scope got a delay line or Timebase magnifier the use
that to scroll over your whole train of I2C pulses.
Then you will see where your slave stops working. You will recognize
slave control of the SDA when the rise time is longer than the PIC's or
when it's already high you will see a small indent for every SCL pulse
on the SDA. You will also see the same indent on a low. (well, at least
on my projects :)).
I have not studied the Philips RTC properly but doesn't it need time to
do internal stuff? Or the I2C buffer gets full and it needs time to
write to the RAM? Then it might just pull the SDA low. Are you using the
Interrupt pin?
Hope this help. I have never read of any difference of I2C on PIC,
Philips or Atmel.
Quentin
1999\01\19@085707
by
Andy Stephenson
|
I have had a situation where the PCF8583 RTC would hang the bus.
It was due TOTALLY to me not following the correct IIC timings / waveforms.
Once fixed, the deviced worked as expected.
This may or may not be your problem, but it's work a second look.
Rgds...
...Andy
At 11:02 19/01/99 +0200, you wrote:
{Quote hidden}>Hi
>
>I have stumbled on a problem with compatability between
>PICs and the Philips' PCF range I2C real time clocks.
>
>Sometimes the Philips chip just stops responding to
>the bus - it won't ACK for love nor money. Apparently
>this problem does not occur with the Philips or Atmel
>micros - only with PICs.
>
>My questions
>
>1) Has anyone else on this list experienced this?
>2) Does anyone know of a fix (except a power cycle)?
>
>My code is definitely correct.
>
>--
>Friendly Regards /"\
> \ /
>Tjaart van der Walt X ASCII RIBBON CAMPAIGN
>
tjaart
KILLspamwasp.co.za / \ AGAINST HTML MAIL
>|--------------------------------------------------|
>| WASP International |
>|R&D Engineer : GSM peripheral services development|
>|--------------------------------------------------|
>| Mobile :
.....tjaartKILLspam
.....sms.wasp.co.za (160 text chars) |
>|
http://www.wasp.co.za/~tjaart/index.html |
>|Voice: +27-(0)11-622-8686 Fax: +27-(0)11-622-8973|
>| WGS-84 : 26¡10.52'S 28¡06.19'E |
>|--------------------------------------------------|
>
1999\01\19@091340
by
Tjaart van der Walt
|
Quentin wrote:
{Quote hidden}>
> Don't know if this going to be related but it might help others: By
> using the PCF i/o I have found that the PCF needs time to rise and fall
> for Ack/not Ack. I always put a small delay between the SCL pulse for
> LSB and SCL pulse for Ack. As a test put a temporarily long delay
> between the two.
>
> I picked this up on my 'scope. Create a synch pulse (BSF then BCF or
> whatever) on a spare o/p pin just before your Start code and connect
> this on your Y input and trigger the 'scope on Y. Use X1 and X2 for SDA
> and SCL. If your scope got a delay line or Timebase magnifier the use
> that to scroll over your whole train of I2C pulses.
> Then you will see where your slave stops working. You will recognize
> slave control of the SDA when the rise time is longer than the PIC's or
> when it's already high you will see a small indent for every SCL pulse
> on the SDA. You will also see the same indent on a low. (well, at least
> on my projects :)).
>
> I have not studied the Philips RTC properly but doesn't it need time to
> do internal stuff? Or the I2C buffer gets full and it needs time to
> write to the RAM? Then it might just pull the SDA low. Are you using the
> Interrupt pin?
>
> Hope this help. I have never read of any difference of I2C on PIC,
> Philips or Atmel.
>
> Quentin
I've traced the problem. It seems that it can't recover from the
internal test mode. I have (had) a routine that checks the RTC
with a pattern on startup. If you write xx11xxxx into location
00, the chip will NEVER, EVER recover without a power cycle.
I don't like this one bit, because you only need one silly
glitch to get the damn thing back. I'll have to add a reset
then...
--
Friendly Regards /"\
\ /
Tjaart van der Walt X ASCII RIBBON CAMPAIGN
EraseMEtjaartspam_OUT
TakeThisOuTwasp.co.za / \ AGAINST HTML MAIL
|--------------------------------------------------|
| WASP International |
|R&D Engineer : GSM peripheral services development|
|--------------------------------------------------|
| Mobile : tjaart
spam_OUTsms.wasp.co.za (160 text chars) |
| http://www.wasp.co.za/~tjaart/index.html |
|Voice: +27-(0)11-622-8686 Fax: +27-(0)11-622-8973|
| WGS-84 : 26¡10.52'S 28¡06.19'E |
|--------------------------------------------------|
1999\01\19@093009
by
Quentin
Tjaart van der Walt wrote:
>
> I've traced the problem. It seems that it can't recover from the
> internal test mode. I have (had) a routine that checks the RTC
> with a pattern on startup. If you write xx11xxxx into location
> 00, the chip will NEVER, EVER recover without a power cycle.
>
> I don't like this one bit, because you only need one silly
> glitch to get the damn thing back. I'll have to add a reset
> then...
>
> --
Interesting point, thanks, as I am going to use the Philips RTC in a
future project. But what does the chip do in this mode? Keep the SDA
low?
Also, can you use the rest of the RAM as extra registers (with maybe a
battery backup)?
Quentin
1999\01\19@095746
by
Tjaart van der Walt
|
Quentin wrote:
>
> Tjaart van der Walt wrote:
> >
>
> > I've traced the problem. It seems that it can't recover from the
> > internal test mode. I have (had) a routine that checks the RTC
> > with a pattern on startup. If you write xx11xxxx into location
> > 00, the chip will NEVER, EVER recover without a power cycle.
> >
> > I don't like this one bit, because you only need one silly
> > glitch to get the damn thing back. I'll have to add a reset
> > then...
> >
> > --
> Interesting point, thanks, as I am going to use the Philips RTC in a
> future project. But what does the chip do in this mode? Keep the SDA
> low?
It won't ACK anyting - the SDA goes high impedance. The oscillator
still runs, but the chip goes dumb.
> Also, can you use the rest of the RAM as extra registers (with maybe a
> battery backup)?
I use the RAM as cache when I parse long data strings. It works
very well for that purpose.
--
Friendly Regards /"\
\ /
Tjaart van der Walt X ASCII RIBBON CAMPAIGN
@spam@tjaartKILLspam
wasp.co.za / \ AGAINST HTML MAIL
|--------------------------------------------------|
| WASP International |
|R&D Engineer : GSM peripheral services development|
|--------------------------------------------------|
| Mobile : KILLspamtjaartKILLspam
sms.wasp.co.za (160 text chars) |
| http://www.wasp.co.za/~tjaart/index.html |
|Voice: +27-(0)11-622-8686 Fax: +27-(0)11-622-8973|
| WGS-84 : 26¡10.52'S 28¡06.19'E |
|--------------------------------------------------|
1999\01\19@104137
by
Gianni
>
> I have stumbled on a problem with compatability between
> PICs and the Philips' PCF range I2C real time clocks.
>
> Sometimes the Philips chip just stops responding to
> the bus - it won't ACK for love nor money. Apparently
> this problem does not occur with the Philips or Atmel
> micros - only with PICs.
>
> My questions
>
> 1) Has anyone else on this list experienced this?
> 2) Does anyone know of a fix (except a power cycle)?
>
> My code is definitely correct.
>
Hi !
I use PCF8593 and PIC16F84 in my daily timer. (SDA to Ra4 and SCL to Ra3) . I read all 16
registers of PCF every minute , but never the program report me IIC errors.
Try to insert some NOP in your IIC routines.
BTW thanks to all those which replied to my previous questions .
Regards
Gianni
1999\01\19@130044
by
Michail Evstafiev
>Sometimes the Philips chip just stops responding to
>the bus - it won't ACK for love nor money. Apparently
>this problem does not occur with the Philips or Atmel
>micros - only with PICs.
May be you having glitches on rising or failing edge of SCL pulse. I am using 10
0-Ohm resistors between PIC pins and SDA SCL lines.
______________________
Evstafiev Michael
LUMEX, Russia
http://www.lumex.ru
1999\01\19@232842
by
Tjaart van der Walt
Gianni wrote:
>
> Hi !
> I use PCF8593 and PIC16F84 in my daily timer. (SDA to Ra4 and SCL to Ra3) . I read all 16
> registers of PCF every minute , but never the program report me IIC errors.
> Try to insert some NOP in your IIC routines.
It was a test routine that wrote a pattern to the chip.
If you write xx11xxxxxx in location 0, it crashes (try it).
Watch out for this one...
--
Friendly Regards /"\
\ /
Tjaart van der Walt X ASCII RIBBON CAMPAIGN
RemoveMEtjaartTakeThisOuT
wasp.co.za / \ AGAINST HTML MAIL
|--------------------------------------------------|
| WASP International |
|R&D Engineer : GSM peripheral services development|
|--------------------------------------------------|
| Mobile : spamBeGonetjaartspamBeGone
sms.wasp.co.za (160 text chars) |
| http://www.wasp.co.za/~tjaart/index.html |
|Voice: +27-(0)11-622-8686 Fax: +27-(0)11-622-8973|
| WGS-84 : 26¡10.52'S 28¡06.19'E |
|--------------------------------------------------|
More... (looser matching)
- Last day of these posts
- In 1999
, 2000 only
- Today
- New search...