0
\$\begingroup\$

Hi my problem is that I cant understand this code when I test it on my microcontroller Si Lab [ C8051F340 ]and let it run step by step enter image description here My problem is basically is when I test the program on my microcontroller ( I dont feel confortable to post the whole program ) the program counter arrives to the instruction "jnb TF0, Innere_Schleife" and stops there . I can still see my microcontroller 7segment display changing . But I dont undertand why and how the program counter just stops there and doesnt jump to the next instruction although I can still see changes on my board .

\$\endgroup\$
2
\$\begingroup\$

JNB,Jump if Bit Not Set, will jump to the label Innere_Schleife as long as the bit TF0 is not set.

Since Innere_Schleife is right above JNB, this is a jump to itself. It will appear as if the cpu does not step becuase it doesn't update the program counter.

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ @PeterJ I can't answer that without either hardware or more software. \$\endgroup\$ – Jeroen3 Oct 2 '17 at 13:09

Not the answer you're looking for? Browse other questions tagged or ask your own question.