Reply by Tim Wescott June 1, 20062006-06-01
David Brown wrote:

> noemail12000@yahoo.com 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. >> > > If you are wanting to learn about embedded programming and small micros, > work first in assembly, writing small programs. It will give you a much > clearer idea of what's going on inside the chip, and when you later > progress to bigger programs and C, you will understand what the compiler > is doing, and be able to write much better C. > > When moving code between two devices with the same core, the main > difference is the peripherals. Make sure your program is well > structured, with direct access to the peripherals only in clearly > limited sections of the code. That way you have a minimum amount to > change when you move devices.
If you _really_ want to make the move easy make the peripheral interface code into function calls or macros and put them into a different file, then rewrite just that file when you go to use a different processor. If you have a consistent interface to your peripheral driver code you should be able to develop code for two different processors simultaneously, switching back and forth at will. -- 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 by David Brown June 1, 20062006-06-01
noemail12000@yahoo.com 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. >
If you are wanting to learn about embedded programming and small micros, work first in assembly, writing small programs. It will give you a much clearer idea of what's going on inside the chip, and when you later progress to bigger programs and C, you will understand what the compiler is doing, and be able to write much better C. When moving code between two devices with the same core, the main difference is the peripherals. Make sure your program is well structured, with direct access to the peripherals only in clearly limited sections of the code. That way you have a minimum amount to change when you move devices.
Reply by mmm June 1, 20062006-06-01
Neil wrote:
> mmm wrote: > > > > 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.
Yes I know about these parts but they aren't 'cheap' as basic parts, Maxim/Dallas make similar parts too
Reply by Neil June 1, 20062006-06-01
mmm wrote:
> noemail12000@yahoo.com 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. >> > > 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
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 by Jim Granville May 31, 20062006-05-31
noemail12000@yahoo.com wrote:
> Jim Granville wrote: > >>noemail12000@yahoo.com wrote: >> >> >>>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? >> >>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. >> >> >>>can I get the same result with software simulator? >> >>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. > > > 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?
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 :)
> is it difficult to use(solder) this 32-pin9x9 LQFP package for a > "hobbyist"?
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 by Tim Wescott May 31, 20062006-05-31
Chris Hills wrote:
> In article <AZGdnXIXlckbM-DZnZ2dnUVZ_umdnZ2d@web-ster.com>, Tim Wescott > <tim@seemywebsite.com> writes > >>noemail12000@yahoo.com 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. >
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 by Tim Wescott May 31, 20062006-05-31
noemail12000@yahoo.com wrote:

> 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. >
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 by noem...@yahoo.com May 31, 20062006-05-31
Jim Granville wrote:
> noemail12000@yahoo.com wrote: > > > 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? > > 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. > > > can I get the same result with software simulator? > > 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.
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"?
> Atmel's newest AT89LP series members, have on-chip-debug, and > Atmel's debug solution is comming. > > -jg
Reply by Fidolinux.dk May 31, 20062006-05-31
> 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?
If you want to start very cheap and have the possebility to make your own pcb, here is one: http://fidolinux.dk/elek/rev1/rev1.php
Reply by Jim Granville May 31, 20062006-05-31
noemail12000@yahoo.com wrote:

> 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?
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.
> can I get the same result with software simulator?
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