We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
In one of my project I am talking with MX909 Driver IC with C51 ucontroller. To initialize MX909 if I write module in Assembly language it's working fine. Once I replaced with C same module it's not working.
The only difference I can make for both assembly and C languages is NOP and _nop_() instruction. Is both instructions will take same number of machine cycles?
Thanks, Suresh Kumar Kavula
Sure, it could have been said in a more friendly manner, which could've made it more helpful, but it could certainly have been necessary and relevant.
The OP's details were far too brief to give any concrete conclusions - so guesses were the only option.
As the OP talked about timing, it was a fair guess that timing loops may be involved - and it is both necessary and relevant to understand that a 'for' loop in 'C' is not necessarily equivalent to a DJNZ loop in assembler.
... it could certainly have been necessary and relevant...
The operative word here is could.
The contrary might also be applicable.
The OPs next post shows that the contrary one was the one that was applicable. A delay of four NOPs would not require a loop; neither a for nor a DJNZ!
So, really, the relevance of loops at that point in the discussion is (at most) absolutely minimal.
Guesses as to what the OP requires are not the only option. A response questioning the size of the delay required would have been more appropriate.
The need to demean the OP in that manner was simply not necessary.
As I suggested before; to me, the response in question is one that an obnoxious teacher might give in an attempt to show authority - Yeuch!