Rio Posted August 12 Report Share Posted August 12 (edited) Simple questions for the core v3 /PIC18F board using MIOS8: 1. How fast is the SC line for both modes (MIOS_IIC_CtrlSet [0 default / 1 clock stretching]) ? and is it <400KHz? Because one of my external boards as an IIC slave only accepts a clock up to 400KHz and it does not react as it should ATM. It seems that I get an ACK back to the PIC18F master in clock stretching mode, but the external device itself remains without any functionality. If I try it without clock stretching, the watchdog restarts the PIC18F master app because it does not receive an ACK in the loop and the loop probably runs too long for that. BTW: the external board can be well controlled by an Arduino using the standard frequency of 100Khz defined in the wire/twi classes of the Arduino core library:https://github.com/arduino/ArduinoCore-avr/blob/master/libraries/Wire/src/utility/twi.h#L30 But of course I don't want to control it with an Arduino, but with my PIC18F with MIOS8! 2. I would also be interested to know how fast the SPI clock is - because for a special application it has to be <1Mhz. Edited October 9 by Rio some more details Quote Link to comment Share on other sites More sharing options...
Rio Posted September 22 Author Report Share Posted September 22 (edited) Short feedback to 1): Regardless of the IIC clock rate (must be below 400khz), my solution now works with clock stretching. if anyone knows more about the SPI clock, please let me know. Edited October 9 by Rio Quote Link to comment Share on other sites More sharing options...
youpli Posted October 15 Report Share Posted October 15 Hi, Can you explain my what did you do with the clock stretching ? Quote Link to comment Share on other sites More sharing options...
Rio Posted October 15 Author Report Share Posted October 15 Yes, clock stretching slows down the clock line for I2C communication. Some of the boards I use with I2C do not work because the clock rate is too high. With clock stretching it works but I don't know how high the clock rate is. But it must be below 400 kHz (this is the limit that is noted in the specifications of one of my external hardware). For SPI communication, one of my boards is limited to 1Mhz. So it would be good to know some specifications about the core8 board. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.