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.

can any one explain program counter in pic 16f877a??explain the below code

Status
Not open for further replies.

rangerskm

Full Member level 4
Full Member level 4
Joined
Jan 23, 2013
Messages
199
Helped
0
Reputation
2
Reaction score
0
Trophy points
1,296
Visit site
Activity points
2,663
Code:
goto K
Go to label 'k' instruction

Operand: 0 ≤ K ≤ 2047 (11-bit address is specified)
Operation: K PC <10:0>
PCLATH <4:3> PC <12:11>

whats pclath <4:3> PC <12:11>
 

Read section 2.3 & 2.4 page 30 of the datasheet. K is not big enough to address the whole memory space so the upper bits come from PCLATH. The program counter is 13 bits but K is only 11 bits.

Keith
 

what means pclath<4:3>PC<12:11>??

You are misquoting the datasheet. What it says is:


Which means k is copied to the first 11 bits of the program counter (PC) and bits PCLATH bits 4 and 3 are copied to bits 12 and 11 of PC respectively.

Keith
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top