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

8051 C complier

Hello all,

I have been programming the 8051 chip using assembly for small programs and applications such as A to D converter, alarm clock, etc. In which I have learned that it is a great pain to do more complicated projects with assembly, as the number of lines of codes get larger and harder to track.

I have downloaded the uVision 4 C complier to try to replace assembly, but I'm having difficulties learning how to use it. I have had C/C++ programming before, but I must admit it has been a while since I used it.

Are there any tutorials on programming the 8051 using C?

Also, I have been trying to duplicate my counter project (counting from 0 to 99 using assembly code) with C. I have it count from 0 to 9, but I could not figure out how to do decimal adjust using C. Any idea? In assembly the code is simply DA

Thanks all,
Woozie

Parents
  • "I would be much more appreciated if anyone could give me a hand and guide me to the right direction while pointing out my problems"

    But your fundamental problem is precisely that you need to spend time learning the 'C' language!

    That is absolutely fundamental. We cannot build anything further until you have laid that foundation.

    You've just shown that yourself: Jon gave you some 'C' code, but you couldn't uderstand it - because you haven't got that basic foundation to enable you to understand 'C' code!

Reply
  • "I would be much more appreciated if anyone could give me a hand and guide me to the right direction while pointing out my problems"

    But your fundamental problem is precisely that you need to spend time learning the 'C' language!

    That is absolutely fundamental. We cannot build anything further until you have laid that foundation.

    You've just shown that yourself: Jon gave you some 'C' code, but you couldn't uderstand it - because you haven't got that basic foundation to enable you to understand 'C' code!

Children
No data