Michael Rigby-Jones wrote: >I've been trying to simulate the CCP under MPLAB 7.21 recently, and I'm >almost certain the simulator is somewhat buggy in this area. I think you may be right. I tried to simulate my PIC16F628 code which uses special trigger mode along with digital output on the pin associated with the CCP module. It fails on the simulator in exactly the same way that I described for the PIC16F818, but runs fine on a real PIC16F628. >In special trigger mode, the CCP pin should be just a normal I/O pin, >and certainly this is the case on the devices I've been using (18F >parts). I can't see why it would be useful to present the CCP output to the pin in this mode, so I assumed that it was either a silicon bug on this part that is replicated in MPSIM or a general problem with the simulator. I think my test above strongly suggests that it is the latter. >Unfortunately I don't have an PIC16F818 to test. I should be able to try some code on a PIC16F818 early next week. I'll report back if the problem is visible on the real part -- otherwise, I think we can assume that this behaviour is an artifact of the simulator. John Snider wrote: >I tried using a 12F683 CCP in special event mode (as a frequency out), >and also wanted to use the GP2 int (same pin as CCP on 12F683) - >couldn't get it to work. The simulator (7.22) crashes (and MPLAB exits) >when it hits the CCP init code. I gave up and used the TMR1 counter. I >assumed the 2F683 was trying to do to much on too few pins? I think this reinforces the belief that the CCP simulation is buggy in recent versions of MPLAB. I don't think a crash of the MPLAB application on a PC is likely to reflect any resource limitations on a real device. I see that there's a thread on the Microchip Forum which lists a similar MPSIM problem with the same device: http://forum.microchip.com/tm.asp?m=118026 Maybe this report is just one symptom of many problems with simulation of the CCP module in MPLAB 7.2x. Many thanks and all the best. -- Ian Chapman Chapmip Technology, UK -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist