Hi All, I'm trying to do some development with an 18F45K22 which is a device i've not used before. Using MPLAB 8.76 and microchip c18. I want to generate an interrupt every 1ms. So, I plan to use a CCP module i= n compare mode. To that end, I started by configuring Timer 5 with Fosc/4. Here, I discovered that whatever I do, MPLAB SIM does not increment the timer registers, and therefore my timer interrupt does not fire - but it does wor= k on hardware. Since there are a choice of timers, I changed to Timer 1 - and it does seem to work in the simulator - registers increment and the timer1 interrupt fires. However, when I reconfigure the code to use Timer 1 with CCP1, in MPLAB SIM, the compare event never happens - the timer just sails through the stored compare value and CCP1IF is never set. However, again, my code works on actual hardware. I've had a google around and not found anything that suggests why this simulation doesn't work. Does anyone know anything about it? thanks Jon To configure the CCP I use:- // configure ccp CCPTMRS0bits.C1TSEL =3D 0b00; // CCP1 to use Timer 1 CCPR1H =3D 0x3E; CCPR1L =3D 0x80; // 0x3e80 =3D=3D 16000 CCP1CONbits.CCP1M =3D 0b1010; // compare -> software interrupt only T1CON =3D 0b00000011; // timer on, no prescaler, Fosc/4 clock T1GCON =3D 0b00000000; TMRH =3D 0x0000; PIE1bits.CCP1IE =3D 1; For now, all i do in the ISR is clear the CCP1IF and toggle a pin on Port B so I can see some action on my scope. So, clearly on hardware my ISR is called, but in the sim, it is not. --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .