Reply by Chris Hills June 19, 20052005-06-19
In article <42b5bb5b.7875147@news.voyager.net>, Chris Giese
<NoEmailAds@execpc.com> writes
>Chris Hills <chris@phaedsys.org> wrote: > >>I don't know about multi threading. If that is the case it sounds like >>you would need something more powerful than a 51. > >That was my point: C for the 8051 is not like C for other CPUs; >although the differences may not be apparent until you try to >write more sophisticated programs. Switching from assembly >language to C may tempt you to do just that.
what bollox. C is used on most 8 bit processors. Also 16, 32, 64 and 128 bit systems. Just because you write in c does not mean you are going to try and put Linux on to a 51, HC05, PIC18, AVR etc etc Unless you are VERY naive and new to embedded. That is usually a trait exhibited by new computer science students not experienced embedded engineers. You can do extremely sophisticated programs in C on a 51. Sophisticated does not mean large.
>>As this was a asm Vc for 51 discussion how would you do a multi-threaded >>TCP/IP stack in assembler? > >On an 8051? I wouldn't :)
so your point is? The OP was asking about moving from asm to C on a 51 and all you have done is go off at a tangent about irrelevant things. C does work VERY well on a 51. The OP was asking which compiler to use. -- \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\ \/\/\/\/\ Chris Hills Staffs England /\/\/\/\/ /\/\/ chris@phaedsys.org www.phaedsys.org \/\/\ \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
Reply by Chris Giese June 19, 20052005-06-19
Chris Hills <chris@phaedsys.org> wrote:

>I don't know about multi threading. If that is the case it sounds like >you would need something more powerful than a 51.
That was my point: C for the 8051 is not like C for other CPUs; although the differences may not be apparent until you try to write more sophisticated programs. Switching from assembly language to C may tempt you to do just that.
>As this was a asm Vc for 51 discussion how would you do a multi-threaded >TCP/IP stack in assembler?
On an 8051? I wouldn't :)
Reply by Ian Bell June 17, 20052005-06-17
Nobody Here wrote:

> On Wed, 15 Jun 2005 19:33:41 +0000, Ian Bell wrote: >> ssc@remove_me.copelandelectronics.com wrote: >> >> I hope your software is better than your English grammar. >> >>> Take a look here....I use they're compilers >> >> 'their' compilers - possessive > > That is a sentence fragment, and is incorrectly punctuated. If it > were C it would not compile, would it.
Check out irony in the dictionary.
> >>> for 8051 and pic almost >>> daily....I also sell them, so I'm only a little biased :->. They do >>> have demo's >> >> 'demos - plural of demo not possesive as implied by the apostrophe > > That is also a sentence fragment, and seems to have a hanging apostrophe > as well as no correct punctuation. It wouldn't compile either, would > it?
Check oit irony again.
> >>> on their site. >> >>> You can try them out and see how it works for you. >>> see how it works for you. >>> >> >> 'try them' plural - and 'see how it works' - singular > > "Them" is indeed plural, but there is potentially only one trial, > so if you take the meaning from the structure of the sentence, > rather than your expectation of the meaning of the sentence, it's > gramatically pretty well correct, albeit clumsy.
No it is clearly grammatically incorrect. It should be 'try them and see how they work'.
> > If you're going to throw stones it's really not a good idea to > do it from a glass house, is it? >
Sound advice, so why did you do it? All such trivia aside, I am not impressed by someone selling software who makes several basic grammatical mistakes in a short piece of plain English. Ian Ian
Reply by Rich Walker June 17, 20052005-06-17
"Steve at fivetrees" <steve@NOSPAMTAfivetrees.com> writes:

> "Steve at fivetrees" <steve@NOSPAMTAfivetrees.com> wrote in message > news:EMWdnWLRzKeasS_fRVnyhA@pipex.net... >>> www.shadow.org.uk/products/newhand.shtml >> >> I have to say: that hand is funky! > > Been watching the videos - very nicely done, sir. <tips hat>
I'll pass that on to the engineers. (Gentlemen: take a bow!)
> > Just curious - how fast is it? Would it be able to cope with: > http://www.fivetrees.com/images/lategroove2.wmv
Now my engineers will spend the entire day on this one :-<
> I can foresee a problem - guitar hammer-ons and pull-offs are not simply > mechanical motions, but effectively string-plucking/striking motions... > which require tactile and audio feedback to get right.... Please impress me > further ;).
The tactile sensing isn't bad: the primary limitations are the PIC16 scanning the tactile array, and the characteristics of the surface material. Movement speed: well, the limitation there (as ever with muscles) is getting the air in and out: we're using some Lee LHDA-24xxxx valves, which are pretty d'd small, (see Lee's press stuff with our Hand holding one of their valves for the obvious quotes) and do slightly limit the rate of movement. The kind of movement we're aiming for is "quality normal human" rather than "Rachmaninoff". I've seen robot hands that can move very very fast, and they tend to have two major problems: they break things, and they wear out. cheers, Rich. -- rich walker | Shadow Robot Company | rw@shadow.org.uk technical director 251 Liverpool Road | need a Hand? London N1 1LX | +UK 20 7700 2487 www.shadow.org.uk/products/newhand.shtml
Reply by Chris Hills June 17, 20052005-06-17
In article <42b22c93.1391725@news.voyager.net>, Chris Giese
<NoEmailAds@execpc.com> writes
>Chris Hills <chris@phaedsys.org> wrote: > >>In article <1118843009.132766.10710@f14g2000cwb.googlegroups.com>, >>cbarn24050@aol.com writes >>> >>>Arthur Richards wrote: >>>> I'm finally moving up from assembler. Which compiler do you vote for? I can >>>> probably get away with the Raisonance Lite version but should I shell out >>>> the $'s & go for Keil or something else? >>> >>>As you must know the 8051 is a great processor for assembly programs >>>but it's not so good for C. You can expect a tripleing, or even more, >>>size of rom space, at least doubleng of ram space and a reduction in >>>speed of 3to 10 times. >> >>This is completely incorrect. Due to the aggressive data overlaying etc >>RAM space is often a lit less using the C compiler than using assembler. > >Overlaid variables are static, so the code is not re-entrant. > >What kind of code would you get from an 8051 C compiler if you >tried to compile a multi-threaded TCP/IP stack? > >(My guess: huge, slow, and ugly code; full of errors caused by compiler bugs.) >
Your guess? Look at the several TCP IP stacks that work very well on the 8051 family I don't know about multi threading. If that is the case it sounds like you would need something more powerful than a 51. As this was a asm Vc for 51 discussion how would you do a multi-threaded TCP/IP stack in assembler? -- \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\ \/\/\/\/\ Chris Hills Staffs England /\/\/\/\/ /\/\/ chris@phaedsys.org www.phaedsys.org \/\/\ \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
Reply by Anton Erasmus June 17, 20052005-06-17
On Fri, 17 Jun 2005 04:48:53 GMT, Neil Kurzman <nsk@mail.asb.com>
wrote:

> > >Anton Erasmus wrote: > >> On Thu, 16 Jun 2005 05:16:05 GMT, Neil Kurzman <nsk@mail.asb.com> >> wrote: >> >> > >> > >> >cbarn24050@aol.com wrote: >> > >> >> Arthur Richards wrote: >> >> > I'm finally moving up from assembler. Which compiler do you vote for? I can >> >> > probably get away with the Raisonance Lite version but should I shell out >> >> > the $'s & go for Keil or something else? >> >> >> >> As you must know the 8051 is a great processor for assembly programs >> >> but it's not so good for C. You can expect a tripleing, or even more, >> >> size of rom space, at least doubleng of ram space and a reduction in >> >> speed of 3to 10 times. You havent indicated what kind of things you are >> >> writing so that may not be a problem for you. It's time to upgrade your >> >> processor as well as moving to C, AVR and PIC18 series spring to mind, >> >> I recently saw the new Zilog Z8 development system (hardware plus >> >> compiler) on offer for $15 so I would look there first. If your >> >> applications need high speed number crunching you should consider a 16 >> >> bit processor there are good deals on those as well. >> > >> >I had not Noticed! >> >Where did you get those numbers. >> >The worse I Ever heard for Keil is 10% to 20% ROM >> >For a 10X hit on speed I would blame the programmer. >> >Look at the List output to see if you inadvertently ask the compiler to do >> >something you never would do in asm. >> > >> >> It has been a while since I have used an 8051 with C. (Old IAR >> Compiler V4.x). This compiler generated more than a page (50 lines per >> page) of assembler to implement a call through a function pointer. >> How much code does a modern Keil compiler generate for a simple >> void, void function pointer call ? i.e. >> >> void foo(void) >> { >> } >> >> void bar(void) >> { >> void (*f)(void) =foo; >> f(); >> } >> >> Regards >> Anton Erasmus > >About as much as it would in asm. a function point on the 8052 in Keil can be >tricky. >Unless you do it right the compiler can not overlay it. So it will use more RAM. >Function parameters are not pushed on to the "stack" >again 8051 != PC. > >If you write for a PC, then complain it is too big, then goto ASM. >well do not complain your foot hurts after you shot you self in it. >
Often the reason for using C on a '51 is so that one can use the code on other projects and MCUs as well. The '51 is not a PC, but neither is something like an AVR. I have used avr-gcc to write code for a 2K FLASH, 128 bytes RAM AVR which runs fine and uses about 60% of the available RAM. The same code compiled to about 3K on the '51 and I needed a '52 to get it to run. (i.e. 128 bytes was not enough, I needed the 256 bytes of the '52) The code on the '51 was sub-optimal (Reasonably standard C used), but was quite optimal on an AVR as well as on a PC. Most PC coders run into problems because their code style assumes lots of RAM. 64K of RAM is considered insignificant. As long as one considers the small amount of RAM and program space one often have when writing for a MCU, one should be able to write reasonably normal C, and expect the compiler to generate reasonable code. The same code should be reasonably optimal on a big system such as a PC as well. Regards Anton Erasmus
Reply by Neil Kurzman June 17, 20052005-06-17

Chris Giese wrote:

> Chris Hills <chris@phaedsys.org> wrote: > > >In article <1118843009.132766.10710@f14g2000cwb.googlegroups.com>, > >cbarn24050@aol.com writes > >> > >>Arthur Richards wrote: > >>> I'm finally moving up from assembler. Which compiler do you vote for? I can > >>> probably get away with the Raisonance Lite version but should I shell out > >>> the $'s & go for Keil or something else? > >> > >>As you must know the 8051 is a great processor for assembly programs > >>but it's not so good for C. You can expect a tripleing, or even more, > >>size of rom space, at least doubleng of ram space and a reduction in > >>speed of 3to 10 times. > > > >This is completely incorrect. Due to the aggressive data overlaying etc > >RAM space is often a lit less using the C compiler than using assembler. > > Overlaid variables are static, so the code is not re-entrant. > > What kind of code would you get from an 8051 C compiler if you > tried to compile a multi-threaded TCP/IP stack? > > (My guess: huge, slow, and ugly code; full of errors caused by compiler bugs.)
Like towing a boat with a moped. "8 bit" "low end" "No multi-threaded NO" But you can squeeze in a small TCP/IP stack (someone felt the need). It will not run linux. It will not run a relational data base. for that you would need a PIC :)
Reply by Neil Kurzman June 17, 20052005-06-17

Anton Erasmus wrote:

> On Thu, 16 Jun 2005 05:16:05 GMT, Neil Kurzman <nsk@mail.asb.com> > wrote: > > > > > > >cbarn24050@aol.com wrote: > > > >> Arthur Richards wrote: > >> > I'm finally moving up from assembler. Which compiler do you vote for? I can > >> > probably get away with the Raisonance Lite version but should I shell out > >> > the $'s & go for Keil or something else? > >> > >> As you must know the 8051 is a great processor for assembly programs > >> but it's not so good for C. You can expect a tripleing, or even more, > >> size of rom space, at least doubleng of ram space and a reduction in > >> speed of 3to 10 times. You havent indicated what kind of things you are > >> writing so that may not be a problem for you. It's time to upgrade your > >> processor as well as moving to C, AVR and PIC18 series spring to mind, > >> I recently saw the new Zilog Z8 development system (hardware plus > >> compiler) on offer for $15 so I would look there first. If your > >> applications need high speed number crunching you should consider a 16 > >> bit processor there are good deals on those as well. > > > >I had not Noticed! > >Where did you get those numbers. > >The worse I Ever heard for Keil is 10% to 20% ROM > >For a 10X hit on speed I would blame the programmer. > >Look at the List output to see if you inadvertently ask the compiler to do > >something you never would do in asm. > > > > It has been a while since I have used an 8051 with C. (Old IAR > Compiler V4.x). This compiler generated more than a page (50 lines per > page) of assembler to implement a call through a function pointer. > How much code does a modern Keil compiler generate for a simple > void, void function pointer call ? i.e. > > void foo(void) > { > } > > void bar(void) > { > void (*f)(void) =foo; > f(); > } > > Regards > Anton Erasmus
About as much as it would in asm. a function point on the 8052 in Keil can be tricky. Unless you do it right the compiler can not overlay it. So it will use more RAM. Function parameters are not pushed on to the "stack" again 8051 != PC. If you write for a PC, then complain it is too big, then goto ASM. well do not complain your foot hurts after you shot you self in it.
Reply by Neil Kurzman June 17, 20052005-06-17

cbarn24050@aol.com wrote:

> Hi Richard, when I was using 8051s single chip meant 1k of eprom space. > Huge numbers of applications were written for chips that size back > then. Take a look at the 8052 chip with the basic interpreter in it, I > cant quite remeber if it was a 2 or 4k mask chip but you try writting > one with your C compiler and see what you come up with.
8751 = 4K 8752 = 8K I have done Projects from 2K to 24K. I inherited a 32K project that could be 25 to 50% smaller if it was not written like it was a PC. I have seen a 1K project. C has startup overhead, so a tiny project will look bigger. No all C compilers treat the '52 right. It is not C friendly. That is why Keil has been around so long, and others are gone.
Reply by Steve at fivetrees June 16, 20052005-06-16
"Steve at fivetrees" <steve@NOSPAMTAfivetrees.com> wrote in message 
news:EMWdnWLRzKeasS_fRVnyhA@pipex.net...
>> www.shadow.org.uk/products/newhand.shtml > > I have to say: that hand is funky!
Been watching the videos - very nicely done, sir. <tips hat> Just curious - how fast is it? Would it be able to cope with: http://www.fivetrees.com/images/lategroove2.wmv I can foresee a problem - guitar hammer-ons and pull-offs are not simply mechanical motions, but effectively string-plucking/striking motions... which require tactile and audio feedback to get right.... Please impress me further ;). Steve http://www.fivetrees.com