Using the Stopwatch Feature in MPLABX

Поділитися
Вставка
  • Опубліковано 21 жов 2024

КОМЕНТАРІ • 8

  • @jonstewart9655
    @jonstewart9655 7 років тому

    Nicely done video. It helped me figure out I had to go into Properties->Conf:->Simulator->Oscillator Options and change the Instruction Frequency from the default 1 MHz to my actual clock to get an accurate time (cycles are accurate regardless).
    One clarification: Around 4:15 the instructor states "...it ["decfsz count2" when count2 is zeroed] takes 2 clock cycles [instead of the normal 1 cycle] because it's going to increment the program counter by 2 rather than 1..." While this may be technically accurate since the correct instruction is at PC+2 n relation to "decfsz count2", the underlying reason is that the branch instruction "bra del_in" was already fetched into the pipeline as the next instruction before decfsz was evaluated. Since the branch is not exectuted in the case where count2 is zeroed, the fetched instruction is discarded and a cycle is "wasted" to fetch the correct instruction "decfsz count1".

  • @ollyk22
    @ollyk22 5 років тому

    For some reason, despite changing Fosc to 8Mhz on an 16f688, there is no change on 'instruction frequency' on the stopwatch! I wonder if this is a compatability issue with the f688?

  • @africanabbey
    @africanabbey 7 років тому

    Great tutorial! Thanks!

  • @nickpelov
    @nickpelov 8 років тому

    Things were quite more simple in old MPLAB and I was using it until now. The 12F1571/2 mcus are not supported by MPLAB 8. Why would you need a log of timer values. You don't know what previous values mean because there is no relation to the code. Also you can't easily have a floating compact timer with all the log text and scroll bar. In MPLAB you had 2 values - stopwatch and a count/timer since last reset - that's not a big deal, I can live without it... And why would you put the mcu instruction frequency instead of the oscillator frequency. I have to divide by 4. What if I switch to 16 bit mcu and I forget that I have to divide by 2?

  • @zokonjazokonja
    @zokonjazokonja 8 років тому

    I can't run stopwatch on my project, it says in stopwatch properties (not supported for this device/tool). I'm using 12F1572 processor and trying to simulate my assembler code but this stopwatch makes me crazy.

    • @nickpelov
      @nickpelov 8 років тому

      I'm using stopwatch on 12F1571. Stopwatch is supported, but start/stop condition (not sure what it does) is not supported. And you are not the only one going crazy .

  • @sahin8780
    @sahin8780 5 років тому

    Could you please talk louder, cant hear you, but thanks