Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Equivalent registers for the PIC16F877A.

Status
Not open for further replies.

Dragnovith

Junior Member level 1
Joined
Apr 17, 2021
Messages
17
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
104
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.

Brian.
 

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.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top