Just had an other look at your slave code. If it runs properly and only has the speed problem, try to remove the serial calls or put them at the end of the procedures, not at the start. Iirc, it is time-critical to respond to some of the interrupts.
Please let me know how you intend to proceed with your i2c slave. I could port my code to jallib when I put the user code in a call-back procedure. The only downside of my lib is that it can't handle a write string (not followed by a read), since there seems no interrupt on stop or restart.. Joep 2008/12/22, Joep Suijs <[email protected]>: > 2008/12/22, Sebastien LELONG <[email protected]>: > > > > > It is. But intosc is not fed into the cpu (see figure 4-6) > > > > Reading this diagram (I'm not an expert, this kind of diagram burns my > > brain...), I understand IRCF = 0 with INTOSC is not possible, which is > > confirmed reading the datasheet: postscaler allows values from 115KHz to > > 8MHz, not 31.25KHz. > > > > Maybe (?) when I set clock to 31.25KHz, it switches to INRC instead of > > INTOSC... There's no INTRC config in device files. Actually I don't event > > know the difference between the two. This is out what I can understand :) > I just look at the number in the mux - 000 selects the 31khz which > comes from the internal osc block. I don't mind that the simplified > block diagram does not tell me everything ;) > > > > > > I also need to check, but 115Kbds serial perfectly works with int...@8mhz > > and I wouldn't expect it to work @31KHz, so for me by default it really runs > > @8MHz. > It does not for me... > Just added checking of 5% error in serial_hw lib and now compilation > fails at 115k2, 8MHz. 56k2 works fine. > > I could not get your code to work at all, so I build the > simple_i2c_slave with my lib (enclosed). It runs okay now and I can't > even break it when I delete the content of the delay function - just > calling it seems enough. > > I enclosed the code (add a board file for the i2c_master) > > 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 -~----------~----~----~----~------~----~------~--~---
