Re: beginner and 8051



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

I'm going to study assembler.
I thought that's what " having same 8051 core" is all about. so, do
they all have different assembler instructions? and even if I create
small app which uses only 1 I/O port and timer - I'll not be able to
move it to another mcu without a lot of changes?

thanks.




Tim Wescott wrote:
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 and are careful to
write portable code then yes. I highly recommend Harbison and Steel's
"C: A Reference Manual" for pointers on portable code. Unfortunately,
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, and not terribly portable.

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.

--

Tim Wescott
Wescott Design Services
http://www.wescottdesign.com

Posting from Google? See http://cfaj.freeshell.org/google/

"Applied Control Theory for Embedded Systems" came out in April.
See details at http://www.wescottdesign.com/actfes/actfes.html

.



Relevant Pages

  • Re: To embed or not to embed?
    ... Robert Latest wrote: ... Tim Wescott wrote ... I did some Z80 and 6502 assembler 20 years ago and I figured since my app doesn't really so much complicated stuff I could do it all in a single loop done in assembly. ...
    (comp.arch.embedded)
  • Re: MPLAB IDE 6.53
    ... Tim Wescott wrote: ... the MPLAB 6.6 includes a linker. ... > You need to tell the assembler what you're planning with assembler ...
    (sci.electronics.design)