In SX Microcontrollers, SX/B Compiler and SX-Key Tool, Tony Leyland wrote: Hi Gunther, Thanks for pointing me in the right direction concerning having the Slave I2C routine in the ISR and the Master in the main loop. I read in your book that your I2C example has a Slave component that can listen for Master signals at 100Khz. I noticed that the ISR tick is actually at 400Khz. Is it possible to reduce the ISR tick to 200Khz or even 100Khz but still be able to listen and process 100Khz signals from the Master ? as I'm trying to 'slow' down the how often the ISR occures (see below). I agree with you about how cool & clever this protocol is. That's why I'm spending so much time to understand the inner workings ! - so I can achieve multiple SX communications over a shared bus. Each SX being a 'black box' where I don't need to concern myself with the code running within it once created, I just concentrate on the various I/O of the 'black box' - I bit like creating a .DLL in ASM on the PC and then including it in a VB APP. Hi Peter (pjv), Thanks for the offer about "simple VP UART together with an I2C routine running in the simple RTOS posted", I'll let you know if that is what is going to be best for me. Just to explain, for this test project (so I can learn about I2C & RS232), I'm listening for 100Khz I2C traffic and converting it to RS232 at 57600 or hopefully 115200. I'm using the USB2SER module to get it on to the PC through the USB port so I can see the characters coming in to a Terminal program. Once I've learned from this I intend to create a 'TermOut' command for use within SX/B that operates in a similar fashion to the 'Debug' command in a STAMP. In that way I can then add STAMP like Debug lines to my future SX/B projects (things like showing variable status and arrays or strings in realtime on a Terminal on the PC). Concerning the 'Jitter' I mentioned earlier - I've now got an ISR with zero jitter on the 2 VPs, so that's better. It gives me a tick for the I2C Slave at 403.2Khz and a tick for RS232 TX at 57600Khz. The only thing is the RTCC value is 62 which gives an ISR interval of 1.2us - ouch ! The 'main loop' will have very little processing so I reckon such a frequently occuring ISR should be ok, but I would like to increase the interval if i can. BTW, the values I've come up with for the VP timing have come from a simple VB program that does the calculations. I'm going to develop this VB program further and post it here, in case anybody else is interested (along with the an example VP Kernel). Thanks Tony ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=95480#m96353 Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2005 (http://www.dotNetBB.com)