Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Architecture Help

  1. Dec 2, 2004 #1
    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.
     
  2. jcsd
  3. Dec 2, 2004 #2

    NoTime

    User Avatar
    Science Advisor
    Homework Helper

    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.
     
  4. Dec 3, 2004 #3
    These should help you,
    ww1.microchip.com/downloads/en/DeviceDoc/35007b.pdf
    web.mit.edu/rec/datasheets/PIC16F84.pdf

    -- AI
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?



Similar Discussions: Architecture Help
Loading...