<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.6000.16788" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Zdravim. </FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Prave som sa stretol s nasledovnym problemom.
Pouzivam I2C na ARMe STR7 ako slave. </FONT></DIV>
<DIV><FONT face=Arial size=2>Inicializacia I2C je nasledovna:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2> I2C_Init (I2C0);<BR> I2C_FCLKConfig
(I2C0);<BR> I2C_OnOffConfig (I2C0, ENABLE);<BR> I2C_ITConfig (I2C0,
ENABLE);<BR> I2C_GeneralCallConfig(I2C0, ENABLE);<BR>
I2C_SpeedConfig (I2C0, 100000);<BR> I2C_AddressConfig (I2C0,0x40,
I2C_Mode7);<BR> I2C_AcknowledgeConfig (I2C0,
ENABLE);<BR> <BR>
EIC_IRQChannelPriorityConfig(I2C0_IRQChannel,1); <BR>
EIC_IRQChannelConfig( I2C0_IRQChannel, ENABLE );<BR>
EIC_IRQConfig(ENABLE); </FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Problem je v tom, ze prerusenie nastane az po
prijati druheho baytu. Prijme sa adresa, prvy bayt, a az pri druhom skoci do
prerusenia. Podla datasheetu </FONT></DIV>
<DIV><FONT face=Arial size=2>ma skocit do prerusenia hned po prijati prveho
baytu. Po prijati prveho baytu sa flag prerusenia nastavi, ale do prerusenia
neskoci, udeje sa tak az po prijati druheho baytu. </FONT></DIV>
<DIV><FONT face=Arial size=2>Stretol sa s tym niekto? </FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Michal. </FONT></DIV></BODY></HTML>