Help with PIC Architecture: Timing Diagram & PC Values

In summary, the conversation is about needing help with the PIC (PIC16F84) architecture and writing a timing diagram for a specific instruction sequence. The conversation also mentions the importance of cycle counting in real-time programming and suggests looking in the processor handbook for clock cycle counts. It also provides links to resources that may be helpful for understanding the architecture.
  • #1
mathrocks
106
0
I need some help with the PIC (PIC16F84) architecture. I am suppose to write timing diagram, including values of the PC (program counter), for the following instruction sequence when (a) the BTFSC (bit test register f, skip if set) instruction results in a skip and (b) when it does not.

Address Instruction
50 BTFSC
51 ADDLW
52 SUBLW


Does anyone know what this means? All I know is that I'm suppose to show when instructions are Fetched and Executed.
 
Computer science news on Phys.org
  • #2
Cycle counting is important if you are doing real time programing.
You need to know it the task can complete in the time allotted for it.

I'm not familiar with the PIC specifically, but you need to look in the processor handbook. It should give the clock cycle counts for the instruction + address mode data fetch clocks + branch clocks.

For example the BTFSC might take 5 clocks to fall thru or 10 clocks to branch.
The ADDLW might take 4 clocks for immediate data or 10 for pointer data.

You seem to have the right idea.
 
  • #3
These should help you,
ww1.microchip.com/downloads/en/DeviceDoc/35007b.pdf
web.mit.edu/rec/datasheets/PIC16F84.pdf

-- AI
 

What is a PIC Architecture?

PIC (Peripheral Interface Controller) Architecture is a type of microcontroller architecture developed by Microchip Technology. It is widely used in embedded systems and electronic devices due to its low cost, low power consumption, and high performance capabilities.

What is a Timing Diagram?

A Timing Diagram is a graphical representation of the timing characteristics of a digital system. It illustrates the timing relationships between the inputs and outputs of a system, and is commonly used to debug and analyze the operation of digital circuits.

How do I create a Timing Diagram for a PIC Architecture?

To create a Timing Diagram for a PIC Architecture, you will need to first identify the timing parameters of the specific microcontroller you are using. This includes the clock speed, instruction execution time, and any delay cycles. Then, using a software tool or by hand, you can plot the timing relationships between the inputs and outputs of the system.

What are the PC Values in PIC Architecture?

The Program Counter (PC) is a register in the PIC Architecture that holds the address of the next instruction to be executed. The PC Values refer to the specific memory addresses that are being accessed by the microcontroller during its program execution.

Why is understanding Timing Diagrams and PC Values important in PIC Architecture?

Understanding Timing Diagrams and PC Values is crucial in PIC Architecture because it allows for accurate debugging and analysis of the system's operation. It also helps in optimizing the code and improving the overall performance of the microcontroller. Additionally, it is important for troubleshooting and identifying any errors or issues in the code or hardware design.

Similar threads

  • Programming and Computer Science
Replies
6
Views
3K
Replies
3
Views
2K
  • Computing and Technology
Replies
10
Views
2K
  • Programming and Computer Science
Replies
3
Views
1K
  • Computing and Technology
Replies
12
Views
6K
  • Engineering and Comp Sci Homework Help
Replies
4
Views
3K
  • Computing and Technology
Replies
4
Views
4K
  • Engineering and Comp Sci Homework Help
Replies
5
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
25
Views
8K
Back
Top