[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [oc] I2C polling question





Ujjal Bose wrote:
> 1) Initialise PRER to proper value (0x00A5).
...
> Thats all. After the read of 8 bits from the slave, the I2C core will be
> giving ACK with proper timing.

I was referring specifically to this: When I want to write several 
bytes to the slave, do I need to set the STOP bit explicitly when 
transmitting the last char or do I first transmit it and _then_
issue a STOP? If of any interest I will post code so I can pinpoint 
the problem.

That is pretty unclear in the docs and does _not_ scale for 
multiple byte transfer! 

Also, I found out by simulation
that the TIP and ACK flags are not set properly, ACK being 0 at
startup whereas it should be 1 (NACK!), and TIP being strobed
long _before_ the actual bits get set. This makes the detecion
of actual moment when the byte has been output/input from the bus
undetermined. Of course I might have misinterpreted the docs but
I found no explanation about that.

At read, do I need to issue NACK/ACK commands explicitly or implicitly,
at the time the last byte being read or _after_ it is read. No mention
of this in the docs. The example, once again does not scale to multiple
byte transfer because there is no example as to what to do with the
bytes that are _not_ last, i.e. those that an ack is necessary. Do I
have to order the core to issue an ACK or does it do it automatically?

f.
--
To unsubscribe from cores mailing list please visit http://www.opencores.org/mailinglists.shtml