Hello, I'm trying to implement a code from PIC18F452 to PIC16F877A. But registers T0CON,TMR0H,TMR0L,TMR0IF,TMR0ON appear as not previously defined. I would like to know which registers can be worked as equivalent to the ones mentioned above, but for the PIC16877A.
I was thinking I could use T1CON, TMR1H and TMR1L ? But how to replace TMR0IF and TMR0ON?
TMR0IF exists in the INTCON register of the '877A and does the same job. TMR0ON doesn't exist because it is always enabled but you might be able to switch clock source if you must stop it running.
Consider that in the 877A, timer 0 is an 8-bit register while in the '452 it has 16 bits so there is no concept of low (L) and high (H) halves. If you need a 16 bit equivalent you will have to implement it in software.
There are various differences in register mapping and functionality of on-chip peripherals. Porting an app from PIC18 to PIC16 (or vice versa) involves more than just finding register equivalents.