This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

how to make loop (1sec) using djnc ,mov and nop only.

hi
i am jimmy and my problem is very simple but complicated. how to make a loop subroutine for 1 sec +500 microsec or -500 microsec by just using djnc, mov and nop.
it is a 8051 problem so kindly help me.

Parents
  • As pointed out, you need a relationship between real time ( say 500us ) and the system clock period. Another hint is that your problem has two time values in it so you may need to use an instruction twice to generate them. It's a nice exercise in instruction set properties but get familiar with the timers and interrupts for real world applications. :)

Reply
  • As pointed out, you need a relationship between real time ( say 500us ) and the system clock period. Another hint is that your problem has two time values in it so you may need to use an instruction twice to generate them. It's a nice exercise in instruction set properties but get familiar with the timers and interrupts for real world applications. :)

Children
No data