Re: beginner and 8051



In article <AZGdnXIXlckbM-DZnZ2dnUVZ_umdnZ2d@xxxxxxxxxxxx>, Tim Wescott
<tim@xxxxxxxxxxxxxxxx> writes
noemail12000@xxxxxxxxx wrote:
Hi All,
I'm a beginner and I'd like to start from 8051 . as I can see-the only
cheap boards with jtag are from silabs, right? there are a few of them
for about 70$ , which one should I buy?
will I be able easily move my code to other 8051 mcu like ats89s?

thanks.

Should you write your application in assembly language you will find
that you have to rewrite every line to port to another processor.

Should you choose a higher level language like C
yes.

and are careful to
write portable code then

No. Portable code is rarely needed.

yes. I highly recommend Harbison and Steel's
"C: A Reference Manual" for pointers on portable code.

Good book.

Unfortunately,
well-structured portable C code is a terrible fit for the 8051
instruction set.

Yes to the portable bit. You can write very structured C that is 8051
specific.

Your code will be bigger and slower than it would be
if you fit your C code to match the processor -- but if you fit your C
code to the 8051 then it'll be nasty stuff,

It will be good 8051 C very fast and efficient.

and not terribly portable.

usually irrelevant.

If you can afford the extra memory and slow operation that comes with
good C on an 8051 it's the way to go, however.

It will increase the unit cost of your product for no appreciable gain.
If I found someone writing portable code in that situation I would
probably fire them.




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



.



Relevant Pages

  • Re: beginner and 8051
    ... Should you choose a higher level language like C and are careful to write portable code then yes. ... well-structured portable C code is a terrible fit for the 8051 instruction set. ... Your code will be bigger and slower than it would be if you fit your C code to match the processor -- but if you fit your C code to the 8051 then it'll be nasty stuff, ... Wescott Design Services ...
    (comp.arch.embedded)
  • Re: beginner and 8051
    ... No. Portable code is rarely needed. ... well-structured portable C code is a terrible fit for the 8051 instruction set. ... There is a gain to writing portable code -- if it's going to be ported, ... And if you're writing code for a low production rate the economies of engineering cost vs. per-piece cost will lean heavily in favor of bigger faster processors if it eases the software engineering time. ...
    (comp.arch.embedded)