8051 C Compiler Recommendation

8751 = 4K 8752 = 8K

I have done Projects from 2K to 24K. I inherited a 32K project that could be 25 to 50% smaller if it was not written like it was a PC.

I have seen a 1K project.

C has startup overhead, so a tiny project will look bigger.

No all C compilers treat the '52 right. It is not C friendly. That is why Keil has been around so long, and others are gone.

Reply to
Neil Kurzman
Loading thread data ...

can

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.

Reply to
Neil Kurzman

Like towing a boat with a moped. "8 bit" "low end" "No multi-threaded NO" But you can squeeze in a small TCP/IP stack (someone felt the need).

It will not run linux. It will not run a relational data base. for that you would need a PIC :)

Reply to
Neil Kurzman

can

RAM.

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.

Regards Anton Erasmus

Reply to
Anton Erasmus

Your guess? Look at the several TCP IP stacks that work very well on the 8051 family

I don't know about multi threading. If that is the case it sounds like you would need something more powerful than a 51.

As this was a asm Vc for 51 discussion how would you do a multi-threaded TCP/IP stack in assembler?

--
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
\/\/\/\/\ Chris Hills  Staffs  England     /\/\/\/\/
/\/\/ chris@phaedsys.org      www.phaedsys.org \/\/\
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
Reply to
Chris Hills

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
Reply to
Rich Walker

Check out irony in the dictionary.

Check oit irony again.

No it is clearly grammatically incorrect. It should be 'try them and see how they work'.

Sound advice, so why did you do it?

All such trivia aside, I am not impressed by someone selling software who makes several basic grammatical mistakes in a short piece of plain English.

Ian

Ian

Reply to
Ian Bell

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.

On an 8051? I wouldn't :)

Reply to
Chris Giese

what bollox.

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 \/\/\
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
Reply to
Chris Hills

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.