Dear forum,
I bought a board like this one to experiment IIC : http://www.futurlec.com/Mini_DS1307.shtml
http://www.rev-ed.co.uk/docs/DS1307.pdf
so i connected the board to the core without problem,
and initialised the IIC like this :
void Init(void) __wparam
{
MIOS_IIC_Stop(); // init IIC interface
}
then, looking at the speakjet code i did this :
unsigned char IIC_TransmitStart(unsigned char _slave) __wparam
{
unsigned char retry_ctr;
// start IIC access
MIOS_IIC_Start();
// send address
retry_ctr = 0;
while( !MIOS_IIC_ByteSend( _slave ) ) {
// slave has sent a NAK - retry 255 times
MIOS_IIC_Stop();
if( ++retry_ctr == 255 )
return 0;
MIOS_IIC_Start();
}
return 1;
}
and this : (slave value is 0xD0)
void DISPLAY_Init(void) __wparam
{
MIOS_LCD_Clear();
if(!IIC_TransmitStart(slave) ){
MIOS_LCD_CursorSet(0x00);
MIOS_LCD_PrintCString("IIC Transmit error !");
}else{
MIOS_LCD_CursorSet(0x00);
MIOS_LCD_PrintCString("IIC Transmit OK");
}
}
at this point, everything seems ok, i have “IIC Transmit OK”
then, i try to read some values so i did :
void GET_TIME(void){
MIOS_IIC_Start(); // start IIC
MIOS_IIC_ByteSend(slave); // send device address -
// set bit #0 to notify a read!!!
// don't continue if IIC device not available
if( MIOS_BOX_STAT.BS_AVAILABLE){
b0 = MIOS_IIC_ByteReceive();
MIOS_IIC_AckSend(); // send acknowledge
b1 = MIOS_IIC_ByteReceive();
}
MIOS_IIC_NakSend(); // send disacknowledge!!!
MIOS_IIC_Stop(); // stop IIC
MIOS_LCD_CursorSet(0x40);
MIOS_LCD_PrintHex2(b0);
MIOS_LCD_PrintCString(":");
MIOS_LCD_PrintHex2(b1);
}
but all i read, whenever i call this function is just some random values, instead of seconds :-\
maybe this project is a little too complicated for me,
to be honest, i dont know exactly how it’s supposed to work,
but i guess i’m must not be that far from the goal, so i hope some people here can explain me what i did wrong, or did not 
thanks for reading !