About as much as it would in asm. a function point on the 8052 in Keil can be tricky. Unless you do it right the compiler can not overlay it. So it will use more RAM. Function parameters are not pushed on to the "stack" again 8051 != PC.
If you write for a PC, then complain it is too big, then goto ASM. well do not complain your foot hurts after you shot you self in it.
Often the reason for using C on a '51 is so that one can use the code on other projects and MCUs as well. The '51 is not a PC, but neither is something like an AVR. I have used avr-gcc to write code for a 2K FLASH, 128 bytes RAM AVR which runs fine and uses about 60% of the available RAM. The same code compiled to about 3K on the '51 and I needed a '52 to get it to run. (i.e. 128 bytes was not enough, I needed the 256 bytes of the '52) The code on the '51 was sub-optimal (Reasonably standard C used), but was quite optimal on an AVR as well as on a PC. Most PC coders run into problems because their code style assumes lots of RAM. 64K of RAM is considered insignificant. As long as one considers the small amount of RAM and program space one often have when writing for a MCU, one should be able to write reasonably normal C, and expect the compiler to generate reasonable code. The same code should be reasonably optimal on a big system such as a PC as well.
I'll pass that on to the engineers. (Gentlemen: take a bow!)
Now my engineers will spend the entire day on this one :-<
The tactile sensing isn't bad: the primary limitations are the PIC16 scanning the tactile array, and the characteristics of the surface material.
Movement speed: well, the limitation there (as ever with muscles) is getting the air in and out: we're using some Lee LHDA-24xxxx valves, which are pretty d'd small, (see Lee's press stuff with our Hand holding one of their valves for the obvious quotes) and do slightly limit the rate of movement.
The kind of movement we're aiming for is "quality normal human" rather than "Rachmaninoff". I've seen robot hands that can move very very fast, and they tend to have two major problems: they break things, and they wear out.
cheers, Rich.
--
rich walker | Shadow Robot Company | rw@shadow.org.uk
technical director 251 Liverpool Road |
need a Hand? London N1 1LX | +UK 20 7700 2487
www.shadow.org.uk/products/newhand.shtml
That was my point: C for the 8051 is not like C for other CPUs; although the differences may not be apparent until you try to write more sophisticated programs. Switching from assembly language to C may tempt you to do just that.
C is used on most 8 bit processors. Also 16, 32, 64 and 128 bit systems. Just because you write in c does not mean you are going to try and put Linux on to a 51, HC05, PIC18, AVR etc etc Unless you are VERY naive and new to embedded.
That is usually a trait exhibited by new computer science students not experienced embedded engineers.
You can do extremely sophisticated programs in C on a 51. Sophisticated does not mean large.
so your point is?
The OP was asking about moving from asm to C on a 51 and all you have done is go off at a tangent about irrelevant things.
C does work VERY well on a 51.
The OP was asking which compiler to use.
--
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
\/\/\/\/\ Chris Hills Staffs England /\/\/\/\/
/\/\/ chris@phaedsys.org www.phaedsys.org \/\/\
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here.
All logos and trade names are the property of their respective owners.