Architecture Help

  • Thread starter mathrocks
  • Start date
  • #1
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.
 

Answers and Replies

  • #2
NoTime
Science Advisor
Homework Helper
1,570
0
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
644
1
These should help you,
ww1.microchip.com/downloads/en/DeviceDoc/35007b.pdf
web.mit.edu/rec/datasheets/PIC16F84.pdf

-- AI
 

Related Threads on Architecture Help

  • Last Post
Replies
1
Views
5K
  • Last Post
Replies
4
Views
4K
  • Last Post
Replies
1
Views
2K
M
  • Last Post
Replies
2
Views
3K
  • Last Post
Replies
2
Views
3K
Replies
1
Views
2K
  • Last Post
Replies
3
Views
236
  • Last Post
Replies
6
Views
3K
Top