I'll add that I was getting interrupts before because I also had a=20 timer-0 interrupt running. Cheers, -Neil On 8/19/2015 9:03 PM, Neil wrote: > Got it. Apparently PEIE *is* required when I'm not using interrupt > priorities (compatibility mode). > > Cheers, > -Neil. > > > On 8/19/2015 7:06 PM, Neil wrote: >> According to the datasheet, I don't need PEIE for timer 2. I'm not >> setting it and I am still getting the port bit toggling... it's just not >> changing as I change PR4. >> Page 114 here... http://ww1.microchip.com/downloads/en/DeviceDoc/41412F.= pdf >> >> I need to go investigate the priorities in detail again. >> >> Cheers, >> -Neil. >> >> >> >> On 8/19/2015 5:55 PM, William Bross wrote: >>> And shouldn't the PEIE bit in INTCON be set also? Not sure of that one >>> without the datasheet in front of me. >>> BB >>> >>> William Bross wrote: >>> >>>> Hi Neil, >>>> I gave it a quick scan and it looks pretty straightforward to me. Is >>>> your port bit set to an output? Toggling the LAT reg? >>>> Bill >>>> >>>> >>>> Neil wrote: >>>> >>>> =20 >>>> >>>>> Would appreciate a fresh pair of eye here please, as I must be missin= g >>>>> something very basic. >>>>> >>>>> I'm using Timer4 on a 18F24K22 to generate repeated pulses (C18 v3.46= ), >>>>> but changing the PR4 match value does not seem to have any effect, an= d >>>>> changing the prescale value seems to give odd results. This is a brie= f >>>>> section of what I have... >>>>> >>>>> T4CON =3D 0b00000101; >>>>> PR4 =3D 50; >>>>> PIE5bits.TMR4IE =3D 1; >>>>> RCONbits.IPEN =3D 0; // Disable interrupt priori= ties >>>>> INTCONbits.GIE =3D 1; >>>>> >>>>> The interrupt service routine... >>>>> if (PIR5bits.TMR4IF) >>>>> { >>>>> ... < Toggle PORT bit here for logic analyzer > ... >>>>> ... other code here ... >>>>> PIR5bits.TMR4IF =3D 0; >>>>> } // Timer-1 interrupt >>>>> >>>>> With this, I get regular pulses on the logic analyzer. >>>>> Changing PR4 has no effect on the timing. >>>>> Now, if I change T4CON to 0b00001101, nothing changes. 0b00010101 >>>>> also. 0b00110101 changes the timing though, to double the previous p= eriod. >>>>> I tried Timer-2 similarly and got the same results. >>>>> Currently I've worked around the issue by using timer-1, but would li= ke >>>>> to know what's going on here. >>>>> >>>>> Anyone see what am I missing here? >>>>> >>>>> Cheers, >>>>> -Neil. >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> =20 >>>>> >>>> =20 >>>> --=20 http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .