piclist 1999\10\17\222549a >
Thread: PCL Updates
www.piclist.com/techref/index.htm?key=pcl+updates
flavicon
picon face BY : Thomas Brandon email (remove spam text)



I am looking at doing jumps by modifying PCL, the application is very
deterministic so keeping time is critical. If I have code such as the
following (Yes, I know it doesn't do anything useful):

EQU jump_cond ...

ORG 0x10
   MOVF jump_cond (0x10)
   ADDWF PCL (0x11)
   ADDLW 0x00  (0x12)
   ADDLW 0x01  (0x13)
   ADDLW 0x02  (0x14)

Now what is the timing of the jump. The MChip docs don't mention any
delays\problems whereas in other such places they do. What happens if
jump_cond = 0x00. Would the flow be:
PC        Executing        Fetching
0x10      0x10              0x11
0x11      0x11              0x12 (adds 0 to PC)
0x12      0x12              0x13
0x13      0x13              0x14

Now, what if jump_cond = 0x01, is the flow:
PC        Executing        Fetching
0x10      0x10              0x11
0x11      0x11              0x12 (adds 1 to PC)
0x13      0x12              0x14
0x14      0x14              0x15

Or does it somehow manage to fetch the instruction of the updated PCL in the
same inst. it is updated?

Thanks,
Tom.

<010101bf1910$8e769350$fb255e81@tb> 7bit

See also: www.piclist.com/techref/index.htm?key=pcl+updates
Reply You must be a member of the piclist mailing list (not only a www.piclist.com member) to post to the piclist. This form requires JavaScript and a browser/email client that can handle form mailto: posts.
Subject (change) PCL Updates

month overview.

new search...