FrankT wrote: > > For those guys who followed my story on the interrupt problems I had, > here's the next chapter. > After a few mails to the piclist and some great help I came up with the > next piece of code. > > void __INT(void) > { > if(PIR1.SSPIF) > { > PIR1.SSPIF = FALSE; // Clear I2C interrupt flag You must save the context (W, Status, and a wealth of other mysterious MPLABC variables) first. Here you are going to run into trouble. The include files for the various parts in MPLABC do not all contain context saving code. You cannot (probably cannot) do this yourself because you don't know how the compiler uses these variables. I ran into this problem with the '74. The support I received from Microchip stank. I mailed every Mchip guy from my distributor to every FAE I could find, but have still not received ANY constructive feedback after 8 months. What I did receive was a whole lot of rethoric about Mchip policy to not update their software products too often. They claim the customers would rather sit with malfunctioning software than download updates all the time. Geez, don't you just hate PR? I received a working header file from a guy (not connected to Mchip) on this list, but had to promise him I wouldn't mail it to the list or mention his name. I will respect that. What I can suggest, is that you mail a request for a header file with a working version of the context saving for your PIC to this list. I'm sure the Good Samaritan who helped me will also help you. If you still don't get help, I will mail him a request on your behalf. For any prospecting MPLABC buyers out there, I have this piece of advice : ***************************************************************************** *** Don't buy MPLABC until Microchip has the competency to offer support *** ***************************************************************************** This may take until next millenium by the looks of it. :( -- Friendly Regards Tjaart van der Walt mailto:tjaart@wasp.co.za _____________________________________________________________ | Another sun-deprived R&D Engineer slaving away in a dungeon | | WASP International http://wasp.co.za | | GSM and GPS value-added applications | | Voice : +27-(0)11-622-8686 | Fax : +27-(0)11-622-8973 | |_____________________________________________________________|