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.

PIC16F887A code question

Status
Not open for further replies.

Jeff Rivers

Newbie level 2
Joined
Sep 26, 2013
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
12
Hello
Newbie here to this coding and all that stuff. I am learning this PIC now and working with it in school. I have a question wondering if you can help
What is the result of the following instructions?
MOVLW 0x05
ADDLW 0x04

Thank You
 

I PIC, there is Working Register just like Accumulator in 8085 Micro-processor.

movlw 0x05
will move the literal 0x05 in Working Register,
Hence after execution the W=0x5
After that
addlw 0x04 means add literal 0x04 with the content of working register and store the content back in working register.
 
Hi,

If you are coding with MPLAB then you can use the Debugger, MPLAB SIM to STEP though your code line by line and WATCH the registers changing.
An example using your code below.
 

Attachments

  • 000099.jpg
    000099.jpg
    47.6 KB · Views: 65
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top