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.
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?
Some of what you said went over my head (ie PLM51).
Just an update. I have pretty much completed the project in assembly with maybe 1000 bytes of code (about 1/4 that required by C in my estimation) and it does it's conversion in 100us. This includes 32bit divide and is before I have implemented any optimizing - the code is *** code though that I strung together with my limited knowledge of the limited instruction set of the 8051. That's just my opinion, mind you. Evidently, there are many instructions not available on the 8051 that I found with other MCUs. Oh well.
I aint a pro but when I got a hold of a pdf version of the keil assembly manual via the black market (keil does not know one exists) I felt right at home.
I love assy. But, to be fair, doing the feasibility analysis (first attempt) in C was easy and worthwhile.
If you have 1000 bytes of ASM and 4000 bytes with C Either you are a master ASM programmer, or a Poor Embedded C programmer. That or are using a poor compiler.
Do not take it Personal. Coding for an a limited memory Embedded System is not the same as for the desk top. Embedded C programs get large because statements that produce a large amount of code look the same as those that do not. Like using int as a loop counter (less than 255). You would not use a 16 bit signed value in ASM, but many pepper their C code with it. Printing with printf() that is over a 1K right there. Large Memory model? Click And on and on.
Yes, it is a shame that Keil has stopped doing the '51 manuals as PDF documents.
:-(
Either you are a master ASM programmer, or a Poor Embedded C programmer. That or are using a poor compiler.
Or he forgot to turn on the compiler optimizations, used the wrong memory model, etc. But I guess that would fall under "inexperienced embedded C programmer".