Using C to program the 8051 family - Page 2

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
Re: Using C to program the 8051 family

Quoted text here. Click to load it

He is beginning to sound like a troll to me.

Ian


Re: Using C to program the 8051 family
Quoted text here. Click to load it

I guess you belong to the "Real Programmers use COPY CON PROGRAM.EXE"
school of programming?

The choice between C and assembly isn't anything like as simple as you
make out, and "performance" is measured in different ways. For almost
any nontrivial piece of code where you're not actually down to the
cycle-counting level of time criticality, the [potential] portability
and [potential] productivity gains of using C are a strong argument
against assembler - even in 8-bit platforms.

Re: Using C to program the 8051 family

Quoted text here. Click to load it
choice
pentium.
anything

It seems to me you have never developed any projects using the 8051 and C
language, or just aren't very good at it.



Re: Using C to program the 8051 family
Hi, I did once try with the 2500 compiler but it was hopeless, once I went back
to assembler it all worked out fine.

Re: Using C to program the 8051 family
snipped-for-privacy@aol.com (CBarn24050) wrote in

Quoted text here. Click to load it

There's your problem. Keil or Amrai in the last 5 years are wonderful to
use. I use assy. only when instruction level determinancy is required
(rare).

--
- Mark ->
--

Re: Using C to program the 8051 family

Quoted text here. Click to load it

And, since all of the decent compilers support inline assembly ...

Re: Using C to program the 8051 family

Quoted text here. Click to load it

Well actually, Keil C51 is a bit unfriendly in this regard do to the fact
that it is difficult to keep the optimizer in the loop when you go off on
your own (into assy).

--
- Mark ->
--

Re: Using C to program the 8051 family

Quoted text here. Click to load it

Uh Oh. I wish you hadn't told me that. I just bought the Keil tool suite.
Can you elaborate a bit on the problem?

Thanks,

Bob

Re: Using C to program the 8051 family


Quoted text here. Click to load it

See this:

http://www.keil.com/support/docs/146.htm

--
- Mark ->
--

Re: Using C to program the 8051 family
Well Mark when I got it it was supposed to be state of the art I imagine in
another 5 years you'll be saying the same thing about the current Kiel package.
For the sort of things I do I can't see me going back to the 8051.

Re: Using C to program the 8051 family

Quoted text here. Click to load it

What sort of things would those be then?

Ian


Re: Using C to program the 8051 family
Hi Ian, at the moment I am doing a controller for single phase induction
motors. The unit controls the startup and optimises the power factor to save
energy under light load.

Re: Using C to program the 8051 family

Quoted text here. Click to load it

What microcontroller are you using and why would you not consider an 8051
for this job?

Ian


Re: Using C to program the 8051 family
Too slow, too expensive, unless you can suggest 1.  It currently runs on a
PIC16f870 but it will end up on a PIC16f676.

Re: Using C to program the 8051 family
snipped-for-privacy@aol.com (CBarn24050) wrote in

Quoted text here. Click to load it

No, I wouldn't be saying that about the current Keil package because like
modern PCs it's gotten good enough that further improvementts don't really
matter much to me. The 2500 never had a good rep. as I seem to recall.

--
- Mark ->
--

Re: Using C to program the 8051 family

Quoted text here. Click to load it
back

I haven't used the 2500AD C compiler for the 8051, but if it's anything like
their 68hc11 C compiler, it's not worth using.   The difference in generated
code going from the 2500AD 68hc11 compiler to the Introl one was surprising.

Try the Keil compiler, I don't see how you wouldn't like it.   I used it in
a product where an 8051 core was in an ASIC, and I wrote an interpeter in C
for it which controlled the OSD.  Commands were received from an external
MCU.
Here's a bit of info on it:
http://www.genesis-microchip.com/products/gm5020.phtml

Mark







Re: Using C to program the 8051 family

Quoted text here. Click to load it

    Please don't turn this newsgroup into another flaming IRC session.
Implying negative attributes to someone you disagree with is poor debating
practice and precludes a respectful response.

    While I think CBarn24050 may have been too terse I agree with his
fundamental position, C is inappropriate for 8-bit micros in general.  Be
aware that C and assembler are not the only two choices.  In some
applications Basic is even appropriate while we use Forth for it's
inherent debuggability.  If that's a word.
 
-- Regards, Albert
----------------------------------------------------------------------
AM Research, Inc.                  The Embedded Systems Experts
http://www.amresearch.com 916.780.7623
----------------------------------------------------------------------


Re: Using C to program the 8051 family
Quoted text here. Click to load it
best
C

While I am not a embedded guy by far, but I have done my share of 8051
projects.

Could you elaborate on why you don't think C is appropriate for this family?

I have used Assembler, but that was happily only a short time before I came
to know the Keil compiler. I would anytime pay a price in a little faster
microcontroller with more memory in order to get the project done instead of
using my time on Assembler programming

Mind you my projects have predominately included control systems that needed
textoutput (nice and easy with sprintf) and floating point calculus...

Cheers

Klaus

Cheers

Klaus



Re: Using C to program the 8051 family
Hi Klaus, you could pay less money on say Hitachi H8 or Fujutsu 16lx
processors, still write in C and have your program run an order of magnitude
quicker, maybe several orders quicker if you want to do fp calculus.

Re: Using C to program the 8051 family
Quoted text here. Click to load it
magnitude

Ok - just did a search on the H8. Seems like prices in order of 6-7 $ for a
5MIPS one (sloooooooooooooooooooow)

I using Cygnal (www.cygnal.com) these days:

25MIPS 80C51Fxx with onchip mixed signal design, ADCs, comparators and so
on. Cost about from 1$ up ;-)

100MIPS types are there too - but haven't had the need yet....

Cheers

Klaus



Site Timeline