As always, the answer is both simple and unexpected...
You did not set the OSCCON_IRCF to 7, so it has the default value 0.
This means your pic is not running @ 8Mhz but 31.25 kHz. And you can
imagine that's a bit slow for 100kbps I2C...

Joep


2008/12/22, Joep Suijs <[email protected]>:
> 2008/12/22, Sebastien LELONG <[email protected]>:
> >
> > The minimum value that works for is 10µs.
> Okay, thanks.
>
> > Maybe an hardware slave @ 8MHz is too slow to react ?
> Well... There are few things that are bugging me:
> - If it works at 400kHz with 20 mHz osc, why does it not work at 100
> kHz with an 8 mHz osc?
> - It would be realy crippling if an 16f88 has a high-speed internal
> oscillator, but that would not allow the i2c device to run at the
> basic 100kHz speed and thus be incompatible with all i2c busses.
> - shifting bytes into a register should not be a problem at 100 kHz.
> - each bit takes 4x the delay to send. This means that 10us creates a
> cycle time of 40 us or 25kHz.
>
> So I think I have to retry this - get an 16f88 i2c slave working at
> the internal oscillator, get software i2c master to work with it and
> then see what it does with the hardware master...
>
> Although an 12us delay makes it work, I have the idea there is
> something else wrong and think it is worth to know what...
>
> Joep
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jallib" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/jallib?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to