I've been looking at the initialization routines for Timer1 and Timer2 in the PICmicro Mid-Range MCU Family Reference Manual - the manual can be found at
https://www.electro-tech-online.com/custompdfs/2006/12/33023a.pdf.
I think its an excellent reference for the newby I am.
The PIR1 and PIE1 registers control operation of interrupts for the timers. They are located at 0Ch and 8Ch respectively according to Figure 2 of the 12F683 data sheet and in detail in Registers 2-4 and 2-5. They are extremely similar, one being flag bits and the other enable bits.
However, when I go into Project and do a Quickbuild, and VIEW the Program Memory I see the same machine code is produced for both PIR1 and PIE1 registers. It is 018C hex for both, and both show PIR1 in the machine code.
Assuming 01 is the CLRF op code and 8C is the address (for CLRF PIE1), I tried entering 010C (CLRF PIR1) in the program memory display and clicked on it. It compiles to a CLRW mnemonic not CLRF PIR1.
So, WHAT am I missing here? I assume the routines work but I don't understand this. Anyone have an explanation? I'm using MPLAB v7.40.
Thanks
jess
https://www.electro-tech-online.com/custompdfs/2006/12/33023a.pdf.
I think its an excellent reference for the newby I am.
The PIR1 and PIE1 registers control operation of interrupts for the timers. They are located at 0Ch and 8Ch respectively according to Figure 2 of the 12F683 data sheet and in detail in Registers 2-4 and 2-5. They are extremely similar, one being flag bits and the other enable bits.
However, when I go into Project and do a Quickbuild, and VIEW the Program Memory I see the same machine code is produced for both PIR1 and PIE1 registers. It is 018C hex for both, and both show PIR1 in the machine code.
Assuming 01 is the CLRF op code and 8C is the address (for CLRF PIE1), I tried entering 010C (CLRF PIR1) in the program memory display and clicked on it. It compiles to a CLRW mnemonic not CLRF PIR1.
So, WHAT am I missing here? I assume the routines work but I don't understand this. Anyone have an explanation? I'm using MPLAB v7.40.
Thanks
jess