beginner and 8051

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.

Reply to
noemail12000
Loading thread data ...

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
Reply to
Tim Wescott

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:

Reply to
noemail12000

If you stick to the architectural features that are part of the common set then yes, your code should be portable. Recommend that you download a few of the device manuals from the major vendors to see what is the same and what is different among them.

--
Rich Webb   Norfolk, VA
Reply to
Rich Webb

an alternative is start with an at89s52 or similar atmel parts is available a almost-0 component programmer ( trough the PC parallel port ) so you can start with a home built proptotype board.

there are lot of hardware/software project on 8051 available on the net.

with an at98s5x an old static ram an a 74hc373 o 74hc573 a 74hc00 and a max232 you can build a system that is able to receive code trough the serial port write in the ram and execute from there.

BTW the controller must be preprogrammed with one of the monitor available on the net

Reply to
mmm

yes.

No. Portable code is rarely needed.

Good book.

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

It will be good 8051 C very fast and efficient.

usually irrelevant.

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@phaedsys.org      www.phaedsys.org \/\/\
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
Reply to
Chris Hills

OK.

not exactly.

No. Some have additional instructions for extended memory and some odd peripherals but 95% are the same.

Most 8051 code is completely portable. The basic ports and peripherals are the same on al of them as are the first 5 interrupts.

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

actually, I was thinking about at89s. the only reason I asked about silab is their development board with jtag for about 70$. but, how usefull jtag is? can I get the same result with software simulator?

mmm wrote:

Reply to
noemail12000

OK. that's what I thought.

Reply to
noemail12000

In article , snipped-for-privacy@yahoo.com writes

There are various simple serial programers you can make for the Atmel

51's

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

No they all have the same 'core' with variations in additional bits. The other posters misunderstood, they did not realise the AT89S... is just another 8051 MCU.

You keep going with assembler. It will give you an excellent grounding in the nuts and bolts of embedded systems. IMHO it is essential to understand this first before using any HLL.

Ian

Reply to
Ian Bell

Just another thought. Pop along to 8052.com and sign up for the message board. There are a whole bunch of 8051 users on there happy to give you a helping hand. Also lots of good tutorial material.

See you there.

Ian

Reply to
Ian Bell

jtag is usefull, because you test using the real silicon, in the real world. In any interaction with peripherals/pins, that can be vitally important :)

Simulators are good with the opcodes/core, but struggle with the peripherals.

You can certainly learn a lot with a simulator.

I'd suggest starting with the SiLabs ToolStick, ~$10, which has a small uC inside, and a USB Debug/Pgm link. Gives the best of both worlds : Cheap, but uses real silicon :)

If you move up in their families, the C8051F41x is the newest. This has 12bit ADC/DAC, and an on chip from-5V regulator, so can drive power mosfets directly.

Atmel's newest AT89LP series members, have on-chip-debug, and Atmel's debug solution is comming.

-jg

Reply to
Jim Granville

If you want to start very cheap and have the possebility to make your own pcb, here is one:

formatting link

Reply to
Fidolinux.dk

by the way , I still can't get it . will I be able to program mcu using this Development Kits? or, they are for evaluation only?

is it difficult to use(solder) this 32-pin9x9 LQFP package for a "hobbyist"?

Reply to
noemail12000

Whoops -- I saw the 'ats', thought "Atmel" and jumped straight to "AVR", forgetting their fine line of 8051 compatible systems.

Yes, if it's an 8051 core the assembly should port just fine, within the limitations of the peripherals.

--

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
Reply to
Tim Wescott

yea -- see the part about assuming AVR when I saw Atmel...

There is a gain to writing portable code -- if it's going to be ported, that is. 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.

--

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
Reply to
Tim Wescott

You can pgm the MCU in the stick, but they did not pin-out the ISP wires. A bit of an oversight...

You can, of course, identify them easily, and bring them out yourself :)

SiLabs have one part that is DIP20, so I'd target that to start with. The TQFP are easy enough to solder, solder wick == safety net.

-jg

Reply to
Jim Granville

Pointless..

Atmel and Phillips have parts with a built in serial boot loader. Connect them to +5 and a MAX232 chip and you are done. The PC software is available from their web sites.

Reply to
Neil

Yes I know about these parts but they aren't 'cheap' as basic parts, Maxim/Dallas make similar parts too

Reply to
mmm

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.