EmbeddedRelated.com
Forums
The 2024 Embedded Online Conference

Newbie assistance for Atmel at89c2051 project

Started by Davon Shire December 30, 2003
On Wed, 31 Dec 2003 16:03:43 +0000, Chris Hills wrote:
> In article <UoBIb.114$T21.22782@news.uswest.net>, Davon Shire ><davon_x@shires.org> writes >>Tilmann Reh wrote: >>> >>I ordered a 932 development board for $59.00+ tax/shipping It seems to >>handle pretty much what I'll need and since it's already assymbled I >>won't have to worry too much about getting all the parts. > >>I've got SDCC running on one of my servers, though I haven't quite >>figured out how S51 works it is definitely going to take me some time to >> get comfortable with all this. > > DO NOT use the SDCC compiler. the LPC kit should come with a Keil > compiler. Although this has a 4K limit on it you will probably be able > to compiler far more code than with the SDC compiler. > > The Keil is extremely good at optimising ad data overlaying. The SDC > isn't
Is there anything else wrong with the SDCC compiler? I intend on using SDCC for some Open Source stuff and just want to be careful. -- Linux Home Automation Neil Cherry ncherry@comcast.net http://home.comcast.net/~ncherry/ (Text only) http://linuxha.sourceforge.net/ (SourceForge) http://hcs.sourceforge.net/ (HCS II)
In article <slrnbv5v94.lmf.njc@wolfgang.uucp>, Neil Cherry
<njc@wolfgang.uucp> writes
>On Wed, 31 Dec 2003 16:03:43 +0000, Chris Hills wrote: >> In article <UoBIb.114$T21.22782@news.uswest.net>, Davon Shire >><davon_x@shires.org> writes >>>Tilmann Reh wrote: >>>> >>>I ordered a 932 development board for $59.00+ tax/shipping It seems to >>>handle pretty much what I'll need and since it's already assymbled I >>>won't have to worry too much about getting all the parts. >> >>>I've got SDCC running on one of my servers, though I haven't quite >>>figured out how S51 works it is definitely going to take me some time to >>> get comfortable with all this. >> >> DO NOT use the SDCC compiler. the LPC kit should come with a Keil >> compiler. Although this has a 4K limit on it you will probably be able >> to compiler far more code than with the SDC compiler. >> >> The Keil is extremely good at optimising ad data overlaying. The SDC >> isn't > >Is there anything else wrong with the SDCC compiler? I intend on using >SDCC for some Open Source stuff and just want to be careful.
Just try both the SDCC and the Keil and compare them. Keil C51 is used in aerospace, medical and other safety critical applications. It is probably the best 8051 compiler on the planet. I would not suggest using the SDCC on anything other than hobby use. The 4K limit on the Keil in the LPC932 kit is very efficient and as the LPC932 part has only 8K of flash you will probably get more code into the part with the 4K limited Keil compiler than the unrestricted SDCC. There is a free 2K Keil and for about 60USD the 4K limited one with the LPC932 kit. After that it does get expensive. Regards Chris /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\ \/\/\/\/\ Chris Hills Staffs England /\/\/\/\/\ /\/\/ chris@phaedsys.org www.phaedsys.org \/\/ \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
Chris Hills wrote:

> In article <slrnbv5v94.lmf.njc@wolfgang.uucp>, Neil Cherry > <njc@wolfgang.uucp> writes >>On Wed, 31 Dec 2003 16:03:43 +0000, Chris Hills wrote: >>> In article <UoBIb.114$T21.22782@news.uswest.net>, Davon Shire >>><davon_x@shires.org> writes >>>>Tilmann Reh wrote: >>>>> >>>>I ordered a 932 development board for $59.00+ tax/shipping It seems to >>>>handle pretty much what I'll need and since it's already assymbled I >>>>won't have to worry too much about getting all the parts. >>> >>>>I've got SDCC running on one of my servers, though I haven't quite >>>>figured out how S51 works it is definitely going to take me some time to >>>> get comfortable with all this. >>> >>> DO NOT use the SDCC compiler. the LPC kit should come with a Keil >>> compiler. Although this has a 4K limit on it you will probably be able >>> to compiler far more code than with the SDC compiler. >>> >>> The Keil is extremely good at optimising ad data overlaying. The SDC >>> isn't >> >>Is there anything else wrong with the SDCC compiler? I intend on using >>SDCC for some Open Source stuff and just want to be careful. > > Just try both the SDCC and the Keil and compare them. > > Keil C51 is used in aerospace, medical and other safety critical > applications. It is probably the best 8051 compiler on the planet. I > would not suggest using the SDCC on anything other than hobby use. > > The 4K limit on the Keil in the LPC932 kit is very efficient and as the > LPC932 part has only 8K of flash you will probably get more code into > the part with the 4K limited Keil compiler than the unrestricted SDCC. >
Whilst I respect your views Cris I think you may be a little unfiar on the SDCC compiler. It is free and unrestricted but in the relatively early stages of development. As it is open source, if you have problems you can contact the developer directly and often get a fix or workaround very quickly. Ian
Ian Bell <ian@ruffrecordsDOTworldonline.co.uk> wrote in
news:3ff31990_2@mk-nntp-1.news.uk.worldonline.com: 


>>>Is there anything else wrong with the SDCC compiler? I intend on using >>>SDCC for some Open Source stuff and just want to be careful. >> >> Just try both the SDCC and the Keil and compare them. >> >> Keil C51 is used in aerospace, medical and other safety critical >> applications. It is probably the best 8051 compiler on the planet. I >> would not suggest using the SDCC on anything other than hobby use. >> >> The 4K limit on the Keil in the LPC932 kit is very efficient and as the >> LPC932 part has only 8K of flash you will probably get more code into >> the part with the 4K limited Keil compiler than the unrestricted SDCC. >> > > Whilst I respect your views Cris I think you may be a little unfiar on > the SDCC compiler. It is free and unrestricted but in the relatively > early stages of development. As it is open source, if you have problems > you can contact the developer directly and often get a fix or workaround > very quickly.
I believe the point isn't about bugs in the compiler but the quality, tightness, and sophistication of the Keil compiler. The things that C51 and its optimizing linker (yes linker) can do rival that of extremely expert assy. programmers. I am sure SDCC developers would be happy to fix bugs expediently but I question wheter they have the time or resource to do the same level of research into *very* 8051 specific compiler optimizations that Keil do. After all, SDCC isn't specific to the 8051 so I wouldn't expect (or fault) SDCC for comparing poorly against such a mature compiler such as C51. In the same vein, Diab (now WindRiver) has a PowerPC compiler that cooks gcc for lunch and then eats it. -- - Mark -> --
Mark A. Odell wrote:
> Ian Bell <ian@ruffrecordsDOTworldonline.co.uk> wrote in > news:3ff31990_2@mk-nntp-1.news.uk.worldonline.com: > > > >>>>Is there anything else wrong with the SDCC compiler? I intend on using >>>>SDCC for some Open Source stuff and just want to be careful. >>> >>>Just try both the SDCC and the Keil and compare them. >>> >>>Keil C51 is used in aerospace, medical and other safety critical >>>applications. It is probably the best 8051 compiler on the planet. I >>>would not suggest using the SDCC on anything other than hobby use. >>> >>>The 4K limit on the Keil in the LPC932 kit is very efficient and as the >>>LPC932 part has only 8K of flash you will probably get more code into >>>the part with the 4K limited Keil compiler than the unrestricted SDCC. >>> >> >>Whilst I respect your views Cris I think you may be a little unfiar on >>the SDCC compiler. It is free and unrestricted but in the relatively >>early stages of development. As it is open source, if you have problems >>you can contact the developer directly and often get a fix or workaround >>very quickly. > > > I believe the point isn't about bugs in the compiler but the quality, > tightness, and sophistication of the Keil compiler. The things that C51 > and its optimizing linker (yes linker) can do rival that of extremely > expert assy. programmers. > > I am sure SDCC developers would be happy to fix bugs expediently but I > question wheter they have the time or resource to do the same level of > research into *very* 8051 specific compiler optimizations that Keil do. > After all, SDCC isn't specific to the 8051 so I wouldn't expect (or fault) > SDCC for comparing poorly against such a mature compiler such as C51. In > the same vein, Diab (now WindRiver) has a PowerPC compiler that cooks gcc > for lunch and then eats it. >
oooooook.. I can see that Keil has truly cornered the market for those who know what they are doing and are interested in doing overlays and all that feldorcarb.... Chris you clearly are an expert when it comes to this stuff and though the SDCC is in version 2.33 and does come with a simulator and all, and is free and is functional and is without limitation.. I most likely will end up using the keil development stuff. It's sad that it's got the 4k limit but if someone can write an OS in 300 bytes seems It's likely I'll be able to get what I need done with the Keil stuff. Please remember EVERYONE! I'm a hobbiest at best when it comes to this. I have Zero... Zip.. Naddah.. Zilch.. development dollars. I needed some info to help point me in a direction that will help me finish this job for my friends at the non-profit center. I would love if this thing worked out to build a dozen of them and sell them to NASA so they can launch a Mars probe that will actually report back when it's suppose to. Etc. But really this will probably be my only chance to do something brilliant like this and I wanted/needed a cheap way to do it. If you need more details as to what I'm doing that's easy. The center needs to keep track of who's coming and going out of the store house for canned goods. Someone donated a waterproof security access keypad that is a 3x4 matrix output interface. This of course doesn't work well with a computer running Freebsd and a database. So I offered to try and make something work. The MCU will translate the 3x4 Matrix output to serial ascii and dump it to the computer. The computer will take the entry codes and record them , check that the code is valid and send back a signal to start the door opener and signal the code accepted on the pad's led. Essentially this is a very cheap access control system. had they actually had a serial or dtmf output I would not have needed to go the MCU route. Anywho. Thank you one and all for your help and opinions. Happy New year one and all. Davon -- --- I came.. I saw.. And I wondered. what am I doing here! (To reply via email please remove the _x from my email address.)
On Wed, 31 Dec 2003 13:56:12 -0600, the renowned Davon Shire
<davon_x@shires.org> wrote:

>oooooook.. I can see that Keil has truly cornered the market for those >who know what they are doing and are interested in doing overlays and >all that feldorcarb....
It's all transparent- the compiler quietly, and behind the scenes, generates a call graph and from that figures out if it can re-use (overlay) RAM for auto variables where it is safe to do so. Useful when you only have 128 bytes to work with. What you notice is that you don't run out of RAM. Best regards, Spehro Pefhany -- "it's the network..." "The Journey is the reward" speff@interlog.com Info for manufacturers: http://www.trexon.com Embedded software/hardware/analog Info for designers: http://www.speff.com
In article <3ff31990_2@mk-nntp-1.news.uk.worldonline.com>, Ian Bell
<ian@ruffrecordsDOTworldonline.co.uk> writes
>> >> Just try both the SDCC and the Keil and compare them. >> >> Keil C51 is used in aerospace, medical and other safety critical >> applications. It is probably the best 8051 compiler on the planet. I >> would not suggest using the SDCC on anything other than hobby use. >> >> The 4K limit on the Keil in the LPC932 kit is very efficient and as the >> LPC932 part has only 8K of flash you will probably get more code into >> the part with the 4K limited Keil compiler than the unrestricted SDCC. >> > >Whilst I respect your views Cris I think you may be a little unfiar on the >SDCC compiler. It is free and unrestricted but in the relatively early >stages of development. As it is open source, if you have problems you can >contact the developer directly and often get a fix or workaround very >quickly.
I don't disagree with some of your statements. The SDCC is in it's early stages of development. therefore it is really only suitable for hobby use. The part is question is the LPC932 with 8K code space. Given the efficiency of the Keil compiler compared to the SDCC you will probably be able to get a larger program in to the part with the 4K limited Keil than the SDCC. This is because the Keil does some very good optimisation both in the compiler and the linker. The support for the Keil is equally responsive. /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\ \/\/\/\/\ Chris Hills Staffs England /\/\/\/\/\ /\/\/ chris@phaedsys.org www.phaedsys.org \/\/ \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
In article <AQFIb.148$T21.71476@news.uswest.net>, Davon Shire
<davon_x@shires.org> writes
>Mark A. Odell wrote: >> >> I believe the point isn't about bugs in the compiler but the quality, >> tightness, and sophistication of the Keil compiler. The things that C51 >> and its optimizing linker (yes linker) can do rival that of extremely >> expert assy. programmers. >> >> I am sure SDCC developers would be happy to fix bugs expediently but I >> question wheter they have the time or resource to do the same level of >> research into *very* 8051 specific compiler optimizations that Keil do. >> After all, SDCC isn't specific to the 8051 so I wouldn't expect (or fault) >> SDCC for comparing poorly against such a mature compiler such as C51. In >> the same vein, Diab (now WindRiver) has a PowerPC compiler that cooks gcc >> for lunch and then eats it. >> >oooooook.. I can see that Keil has truly cornered the market for those >who know what they are doing and are interested in doing overlays and >all that feldorcarb....
You sound like a 12 year old... The Keil is a professional tool that works. If those who know what they are doing use it why does that stop other people using it?
>Chris you clearly are an expert when it comes to this stuff and though >the SDCC is in version 2.33 and does come with a simulator and all, and >is free and is functional and is without limitation..
And? I said it is good for hobby use. In the case in this thread the part (LPC932) has an 8K limit. Given the optimisation in the Keil it is likely that you will be able to get a larger program into the part with the 4K limited Keil than the unlimited SDCC (assuming it does support the LPC932)
>I most likely will end up using the keil development stuff. It's sad >that it's got the 4k limit but if someone can write an OS in 300 bytes >seems It's likely I'll be able to get what I need done with the Keil stuff.
If it doesn't fit in with the Keil it is not likely to fit with the SDCC. Why to you need an OS? 99% of 8051 family projects don't use one.
>Please remember EVERYONE! I'm a hobbiest at best when it comes to this. >I have Zero... Zip.. Naddah.. Zilch.. development dollars. I needed some >info to help point me in a direction that will help me finish this job >for my friends at the non-profit center.
I think the LPC932 kit with the Keil compiler is about 70 USD It's cheaper than making your own board.
>I would love if this thing worked out to build a dozen of them and sell >them to NASA so they can launch a Mars probe that will actually report >back when it's suppose to. Etc. But really this will probably be my only > chance to do something brilliant like this and I wanted/needed a cheap >way to do it.
Cheap or inexpensive.... NASA won't look at it if you use the SDCC. The might if you use the Keil. I am currently working with a group (allegedly) doing a satellite who are using a Keil compiler and no OS. If you are looking to do something for aerospace the Keil is the ONLY option for 8051.
>If you need more details as to what I'm doing that's easy. > >The center needs to keep track of who's coming and going out of the >store house for canned goods. Someone donated a waterproof security >access keypad that is a 3x4 matrix output interface. This of course >doesn't work well with a computer running Freebsd and a database. So I >offered to try and make something work. > >The MCU will translate the 3x4 Matrix output to serial ascii and dump it >to the computer. The computer will take the entry codes and record them >, check that the code is valid and send back a signal to start the door >opener and signal the code accepted on the pad's led. > >Essentially this is a very cheap access control system. had they >actually had a serial or dtmf output I would not have needed to go the >MCU route.
1 You don't need an OS or RTOS for this. It is single thread and an interrupt for serial input. 2 I would think this will fit into the Keil 4K quite easily. If it doesn't you wont get it to work with the SDCC in 8K (major point is that you will need the data overlaying so it may not work with the SDCC no matter which 51 you use.) 3 As it is just serial you should have no problem using the serial examples in the Keil compiler. These are very small. 4 You don't NOT need an RTOS. Have you used an 8051 before? Which part of the world are you in? Regards /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\ \/\/\/\/\ Chris Hills Staffs England /\/\/\/\/\ /\/\/ chris@phaedsys.org www.phaedsys.org \/\/ \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
Chris Hills wrote:

>>oooooook.. I can see that Keil has truly cornered the market for those >>who know what they are doing and are interested in doing overlays and >>all that feldorcarb.... > > > You sound like a 12 year old...
Thank you, I've been told I sound like a 10 year old. So I must be improving. :)
> > The Keil is a professional tool that works. If those who know what they > are doing use it why does that stop other people using it?
>>Chris you clearly are an expert when it comes to this stuff and though >>the SDCC is in version 2.33 and does come with a simulator and all, and >>is free and is functional and is without limitation.. > > > And?
Using SDCC or Keil is not a mutually exclusive thing. I don't see it how it stops anyone from using anything. I've been to your webpage Chris. I see you are a Professional with Big Credits, deploma's and credentials. You're even published. Grats on all that. I'm sure your help will be invaluable in getting this thing done. Thank you for offering your wisdom and experience. Truly.
>>I most likely will end up using the keil development stuff. It's sad >>that it's got the 4k limit but if someone can write an OS in 300 bytes >>seems It's likely I'll be able to get what I need done with the Keil stuff. > > > If it doesn't fit in with the Keil it is not likely to fit with the > SDCC. > > Why to you need an OS? 99% of 8051 family projects don't use one.
Chris the line about if someone can right a 300 byte OS was a small Geek oriented attempt at humor. My appologies.
>>Please remember EVERYONE! I'm a hobbiest at best when it comes to this. >>I have Zero... Zip.. Naddah.. Zilch.. development dollars. I needed some >>info to help point me in a direction that will help me finish this job >>for my friends at the non-profit center. > > > I think the LPC932 kit with the Keil compiler is about 70 USD It's > cheaper than making your own board. >
Yes that's the kit I bought as I mentioned to Tilmann Reh Above. I'm glad you and I are on the same page.
>>I would love if this thing worked out to build a dozen of them and sell >>them to NASA so they can launch a Mars probe that will actually report >>back when it's suppose to. Etc. But really this will probably be my only >>chance to do something brilliant like this and I wanted/needed a cheap >>way to do it.
^^^^^^^^^^ Humor ^^^^^^^^^^^
> Cheap or inexpensive.... NASA won't look at it if you use the SDCC. The > might if you use the Keil. I am currently working with a group > (allegedly) doing a satellite who are using a Keil compiler and no OS. > > If you are looking to do something for aerospace the Keil is the ONLY > option for 8051. >
^^^^^^^ Not Humor ^^^^^^^ Grats on the project Chris Really.
> >>If you need more details as to what I'm doing that's easy. >> >>The center needs to keep track of who's coming and going out of the >>store house for canned goods. Someone donated a waterproof security >>access keypad that is a 3x4 matrix output interface. This of course >>doesn't work well with a computer running Freebsd and a database. So I >>offered to try and make something work. >> >>The MCU will translate the 3x4 Matrix output to serial ascii and dump it >>to the computer. The computer will take the entry codes and record them >>, check that the code is valid and send back a signal to start the door >>opener and signal the code accepted on the pad's led. >> >>Essentially this is a very cheap access control system. had they >>actually had a serial or dtmf output I would not have needed to go the >>MCU route. > > > 1 You don't need an OS or RTOS for this. It is single thread and an > interrupt for serial input. > > 2 I would think this will fit into the Keil 4K quite easily. If it > doesn't you wont get it to work with the SDCC in 8K (major point is that > you will need the data overlaying so it may not work with the SDCC no > matter which 51 you use.) > > 3 As it is just serial you should have no problem using the serial > examples in the Keil compiler. These are very small. > > 4 You don't NOT need an RTOS. >
Clearly wisdom I can use. No I really hadn't figured on using a RTOS or any OS at all really. But tell me, could I use the WD to make sure the program is running and jumpstart the code again if it hung or failed?
> > Have you used an 8051 before? > > Which part of the world are you in? > > Regards
No I have never worked with a MCU before. As it is this 932 part has like 4 times more power and resources than my first TRS-80 Model 1 computer. So things are really quite exciting. I'm in Memphis Tenessee. Thank you for your time and energy Chris. Davon (To reply by email please remove the _X from my email address )
In article <w4WIb.13$lJ1.10497@news.uswest.net>, Davon Shire
<davon_x@shires.org> writes
>Chris Hills wrote: >> >> 4 You don't NOT need an RTOS. >> > >Clearly wisdom I can use. No I really hadn't figured on using a RTOS or >any OS at all really. But tell me, could I use the WD to make sure the >program is running and jumpstart the code again if it hung or failed?
Definitely. That is the whole point of them. It they are not prodded every now and again they will reset the system. Of course if you are really good you will check a flag/bit to see if it is a watchdog reset of a cold boot.
>> Have you used an 8051 before? >No I have never worked with a MCU before. As it is this 932 part has >like 4 times more power and resources than my first TRS-80 Model 1 >computer. So things are really quite exciting.
OK. Have a look at the C51 Primer on my web site it's on the Quest page. (http://quest.phaedsys.org) Also the "Last Word on the 8051" if you can find it. If not I have an electronic copy of it. There is a LOT of help on the Keil web site the forum and the app notes particularly. BTW it is well worth searching round the Keil CD when you get it with the kit. It holds over 600 MB if information of which only about 20Mb is the compilers. and if you make an attempt at things people on this NG will usually help. One last tip use the simulator to debug the program first. the Sim is VERY good and can be script driven. There are some examples I used on a smart card on my web site. All the unit testing was done this way
>I'm in Memphis Tenessee.
I know I looked up your domain on whois.
>Thank you for your time and energy Chris.
No problem... we are usually friendly. Regards Chris /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\ \/\/\/\/\ Chris Hills Staffs England /\/\/\/\/\ /\/\/ chris@phaedsys.org www.phaedsys.org \/\/ \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/

The 2024 Embedded Online Conference