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

NOP Vs _nop_()?

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

Parents
  • My guess is that you suffer from some fallacy that e.g. a for loop always is the same as a djnz loop and nothing could be farther from the truth.

    The crazy thing about all of this is that it was a dumb-cluck thing to say in the first place - Not necessary, not helpful, of no real relevance and demeaning.

    Why not just politely re-emphasize to the OP that assembler for such a task would be the better/best option.

Reply
  • My guess is that you suffer from some fallacy that e.g. a for loop always is the same as a djnz loop and nothing could be farther from the truth.

    The crazy thing about all of this is that it was a dumb-cluck thing to say in the first place - Not necessary, not helpful, of no real relevance and demeaning.

    Why not just politely re-emphasize to the OP that assembler for such a task would be the better/best option.

Children
  • Why not just politely re-emphasize to the OP that assembler for such a task would be the better/best option.

    And who says that the OP will not feel demeaned if their decision to use C is questioned in any way ?

    Some past discussions went exactly this way.

  • And who says that the OP will not feel demeaned if their decision to use C is questioned in any way ?

    That is probably true - But to go in at such an early stage with a statement such as "...you suffer from some fallacy..." is a sure fire way of belittling most people. And has been seen, causes a lot of negative reaction!

    Gentle persuasion generally works better; not the "I've got experience, I know best, any other way is stupid" attitude that seems so prevalent in most responses by the poster in question.

    But also, if the OP wants to use C and/or has good reason to do it that way, then surely this forum should be capable of understanding the need and provide advice to help him achieve his goal.

  • 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!

  • And has been seen, causes a lot of negative reaction!

    If you come to a technical forum to get technical advice and the criticize the semantics (instead of ignoring them and using the actual information to solve your problem), then you weren't really interested in a solution in the first place.

    Gentle persuasion generally works better;

    If you want gentle persuasion, call tech support. Most likely, you'll get more and more persuasion the less knowledgable the person you're talking to is.

    If you want gentle persuasion and actual information, how about paying for a support contract or hiring a consultant.

    Don't forget that you'll find professionals giving advice for free (as in: they're not paid to do so) here. If you demand that they put additional effort into making it "work", you're expecting quite a lot for something that's free.

    Free, useful, "gentle". Pick two.

  • Free, useful, "gentle". Pick two.

    And there is the problem from the post in question - In my opinion, only one was picked!

    Free - Yes.

    Useful - No.

    Gentle - HaHa!

    It is not a prerequisite of a professional to be rude and demeaning - Well, certainly not one that I would look for.

  • Free - Yes.

    Useful - No.

    If you can deduct anything that is more useful from the extremely scant (bordering on nonexistent) information given by the OP, then please enlighten us.

    Otherwise, Erik's guesses were as useful as the could be, given the (lack of) information he had to base them on.

    But that seems to be the common problem - not being able to recognize a posting as useful and then complaining about formal issues.

  • If you can deduct anything that is more useful from the extremely scant (bordering on nonexistent) information given by the OP, then please enlighten us.

    Is there something wrong or difficult about maybe asking the OP for further information?

    Since 'the professionals' do this in their own time and for free, then surely it would be more sensible to not waste time on providing answers to the wrong questions!?

    Otherwise, Erik's guesses were as useful as the could be, given the (lack of) information he had to base them on.

    His guesses were as useful as a chocolate teapot!

    But that seems to be the common problem - not being able to recognize a posting as useful and then complaining about formal issues.

    What about recognising a post as unuseful (and rude and demeaning) ?

  • Is there something wrong or difficult about maybe asking the OP for further information?

    Eriks first line. Oh, I know. Not gentle enough for you.

    His guesses were as useful as a chocolate teapot!

    And you know that because ... ?

    Oh right, you don't. You're just guessing, like Erik. Unless you're the OP posting under another name and have since then figured out where the bug in your code was. I'd assume this to be fairly unlikely, though.

    Or you're "Jack Sprat" posting under yet another pseudonym (or even your real name), and don't really care about the contents of this thread as long as you're getting attention and can flame Erik.

    What about recognising a post as unuseful (and rude and demeaning) ?

    If you think Eriks post was not useful, then, I'm sorry to say this, you're suffering from a fallacy.

    What do you demeaning about this ? "Fallacy" is a perfectly normal term for something that is easily assumed to be right, while it is, in fact, wrong.

  • you're suffering from a fallacy.

    Hmmm ... It's sounding like you're a member of the Erik luv-fest brigade!

    I'm not going to bother responding to your individual points because - Well, what's the point!?

    But, by the way, I am not the original poster, I am not "Jack Sprat" and I am not even the alter ego of "Christoph Franck".

    I would expect professionals to be a bit more professional. Experience is not directly proportional to superiority!