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

C

I was hoping to find on-line manuals that I could print and read on the john. So far no luck. But what I really need is how to declare variables in C.

For example, I have a sample code that has the statement:

unsigned char

and

unsigned long

What do these mean and do they limit the declaration to integers. What do i declare if I want a floating point?

Also, someone told me I cant do floating point with a Keil Compiler because of licensing issues (I got my copy from Silicon Labs and have just registered it). I will eventually need to do trig functions. What do i have to get (buy) to complete my project?

Parents
  • I've been doing micro-controllers for 30+ years in assembly language. Sure, my experience is probably limited compared to you guys but give me a break. I admitted ignorance about C and ask for guidance and I create an argument?

    That wasn't really an argument, more a lively discussion. The advice you got (get a copy of K&R and H&S) was spot on - it won't take long to get familiar with the basics of 'C' with K&R, H&S will answer any remaining questions you have.

    I'd like to think I have the brains to figure out advantages vs disadvantages. Seems to me C was invented to get the job done fast and not efficient. My plans are, if needed, to optimize the code after the feasibility study.

    I'd have said "C was invented to get the job done faster than assembly language and as efficiently as possible for a high level language".

    Furthermore, from what I can tell, there must be better solutions than that offered by Keil, anyhow.

    I'm not going to offer an opinion, but my impression from what I read is that Keil is probably the tool of choice if you wish to program the 8051 using 'C'.

    I just bought the development package thru Silicon Labs and Keil doesn't want to support it and I am having difficulty ascertaining what I must spend to lift it's 4K limits.

    From the sound of things you really bought a development board from Silicon Labs and it came with the trial version of the toolchain, or possibly a slightly enhanced trial version. You can't really expect to get a few thousand dollars worth of software for a hundred bucks.

Reply
  • I've been doing micro-controllers for 30+ years in assembly language. Sure, my experience is probably limited compared to you guys but give me a break. I admitted ignorance about C and ask for guidance and I create an argument?

    That wasn't really an argument, more a lively discussion. The advice you got (get a copy of K&R and H&S) was spot on - it won't take long to get familiar with the basics of 'C' with K&R, H&S will answer any remaining questions you have.

    I'd like to think I have the brains to figure out advantages vs disadvantages. Seems to me C was invented to get the job done fast and not efficient. My plans are, if needed, to optimize the code after the feasibility study.

    I'd have said "C was invented to get the job done faster than assembly language and as efficiently as possible for a high level language".

    Furthermore, from what I can tell, there must be better solutions than that offered by Keil, anyhow.

    I'm not going to offer an opinion, but my impression from what I read is that Keil is probably the tool of choice if you wish to program the 8051 using 'C'.

    I just bought the development package thru Silicon Labs and Keil doesn't want to support it and I am having difficulty ascertaining what I must spend to lift it's 4K limits.

    From the sound of things you really bought a development board from Silicon Labs and it came with the trial version of the toolchain, or possibly a slightly enhanced trial version. You can't really expect to get a few thousand dollars worth of software for a hundred bucks.

Children
  • Furthermore, from what I can tell, there must be better solutions than that offered by Keil, anyhow.

    In another forum there was a "which '51 compiler is bast" thread and several SDCC users stated "Keil is best" an IAR user stated "I think Keil is better". NONE stated that another product was better than Keil '51.

    Erik