Newbie assistance for Atmel at89c2051 project

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
Greetings everyone,
   I have a specific application I want to put a atmel processor to. The
processor would be along the lines of a AT89C2051-24, ideally something
I can program easily say using their ISP system.
   I have a proto board design I found on the net for said mcu and it
pretty well fits what I need for this. However. Since I have NO
experience in programming one of these things. I was curious if there is
a simulator that you'd recommend I could use to learn how to use this
beast before I launch into building the real thing and realize I can't
make it work.
   I do have windows machines, but I prefer using my Freebsd boxes. Any
answer right now will be helpful on this. I'm doing this project for a
non-profit organization and I have zero budget save what I'm throwing in
which isn't much.
   A general idea of what I'm going to do with this. Is use it to
translate a 3x4 matrix keypad output into a serial ascii equiv. So a
computer can check the info in a database and respond with a command to
start a motor to open a garage door. The mcu will also determin if the
door is open or closed.
   That's the general idea of what I'm doing with this. Any and all
assistance is greatly appreciated.

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.)


Re: Newbie assistance for Atmel at89c2051 project
Davon Shire schrieb:

Quoted text here. Click to load it

The 2051 does not support ISP.

If you need a small ISP capable 8051 compatibe controller, look at
the Philips LPC9xx series (especially LPC921/922 in your case).
They also have the needed software for ISP download.

For tutorials about programming etc, look at http://www.8052.com.

--
Dipl.-Ing. Tilmann Reh
Autometer GmbH Siegen - Elektronik nach Maß.
We've slightly trimmed the long signature. Click to see the full one.
Re: Newbie assistance for Atmel at89c2051 project
Quoted text here. Click to load it
I know the 2051 doesn't have ISP. But thank you for the suggestion and
link. I'll start digging into it. I'm not fixed on any particular mcu or
such. I just want to spend a few dollars as I must to get this thing up
and working.

I'm stunned and amazed at the quick reply. Keep them coming and thank
you all in advance.

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.)


Re: Newbie assistance for Atmel at89c2051 project

Quoted text here. Click to load it

If you are in such a hurry, you might want to look at CYGNAL parts.

NEWS FLASH <http://www.silabs.com/products/microcontroller/

Their development kit has hardware and software from $99 to $149.

Check out the phriphals you need and select a kit.

hamilton



Re: Newbie assistance for Atmel at89c2051 project
hamilton schrieb:

Quoted text here. Click to load it

No, forget them - absolutely oversized and far too expensive
for this application.

--
Dipl.-Ing. Tilmann Reh
Autometer GmbH Siegen - Elektronik nach Maß.
We've slightly trimmed the long signature. Click to see the full one.
Re: Newbie assistance for Atmel at89c2051 project

Quoted text here. Click to load it
Tilmann Reh,
   Wow this LPC922 looks great so far. I've been looking at the data
sheet and it has something I had in the corner of my mind as a good
thing but not totally necessary. A RTC.
   The 8052 site is a bit cluttered but I'm starting to get around about
it. Thank you again for the information. Is there a good protoboard
design out there for this chip?

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.)


Re: Newbie assistance for Atmel at89c2051 project
Davon Shire schrieb:

Quoted text here. Click to load it

It *is* a really great chip. :-) And d*mn fast.

Quoted text here. Click to load it

I don't know of one, but you could do the development using the
LPC932 (the great brother) and later use the 922 instead (they
are almost completely compatible).
For the 932, there are some boards available.

Look at http://www.lpc900.com .

--
Dipl.-Ing. Tilmann Reh
Autometer GmbH Siegen - Elektronik nach Maß.
We've slightly trimmed the long signature. Click to see the full one.
Re: Newbie assistance for Atmel at89c2051 project
Quoted text here. Click to load it
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'm excited, this is the first time I've done anything like this. I'm
use to working mostly with servers and fixing TV's and stereos and stuff.

Thanks very much for the points and suggestions. With luck by sometime
next week I may be starting to talk to my first MCU. I've been looking
at the simulators availible so I can test my code and all before I start
talking to the board. Any suggestions?

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.

Many thanks and happy new year.

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.)


Re: Newbie assistance for Atmel at89c2051 project
Quoted text here. Click to load it


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

Regards
   Chris

/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
\/\/\/\/\ Chris Hills  Staffs  England    /\/\/\/\/\
/\/\/ snipped-for-privacy@phaedsys.org       www.phaedsys.org \/\/
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/

Re: Newbie assistance for Atmel at89c2051 project
Quoted text here. Click to load it

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         snipped-for-privacy@comcast.net
http://home.comcast.net/~ncherry/ (Text only)
We've slightly trimmed the long signature. Click to see the full one.
Re: Newbie assistance for Atmel at89c2051 project
Quoted text here. Click to load it

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    /\/\/\/\/\
/\/\/ snipped-for-privacy@phaedsys.org       www.phaedsys.org \/\/
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/

Re: Newbie assistance for Atmel at89c2051 project

Quoted text here. Click to load it

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

Re: Newbie assistance for Atmel at89c2051 project


Quoted text here. Click to load it

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 ->
--

Re: Newbie assistance for Atmel at89c2051 project
Quoted text here. Click to load 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.)


Re: Newbie assistance for Atmel at89c2051 project
On Wed, 31 Dec 2003 13:56:12 -0600, the renowned Davon Shire

Quoted text here. Click to load it

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"
snipped-for-privacy@interlog.com             Info for manufacturers: http://www.trexon.com
We've slightly trimmed the long signature. Click to see the full one.
Re: Newbie assistance for Atmel at89c2051 project
Quoted text here. Click to load it

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?

Quoted text here. Click to load it

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)

Quoted text here. Click to load it

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.


Quoted text here. Click to load it

I think the LPC932 kit with the Keil compiler is about 70 USD It's
cheaper than making your own board.

Quoted text here. Click to load 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.

Quoted text here. Click to load it

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    /\/\/\/\/\
/\/\/ snipped-for-privacy@phaedsys.org       www.phaedsys.org \/\/
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/

Re: Newbie assistance for Atmel at89c2051 project

Quoted text here. Click to load it
Thank you, I've been told I sound like a 10 year old. So I must be
improving. :)

Quoted text here. Click to load it



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.


Quoted text here. Click to load it

Chris the line about if someone can right a 300 byte OS was a small Geek
oriented attempt at humor. My appologies.

Quoted text here. Click to load it

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.

Quoted text here. Click to load it

    ^^^^^^^^^^  Humor ^^^^^^^^^^^


Quoted text here. Click to load it

    ^^^^^^^ Not Humor ^^^^^^^ Grats on the project Chris Really.

Quoted text here. Click to load it

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?



Quoted text here. Click to load it

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 )


Re: Newbie assistance for Atmel at89c2051 project
Quoted text here. Click to load it

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.



Quoted text here. Click to load it

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

Quoted text here. Click to load it

I know I looked up your domain on whois.

Quoted text here. Click to load it

No problem... we are usually friendly.

Regards
        Chris


/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
\/\/\/\/\ Chris Hills  Staffs  England    /\/\/\/\/\
/\/\/ snipped-for-privacy@phaedsys.org       www.phaedsys.org \/\/
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/

Re: Newbie assistance for Atmel at89c2051 project
First let me say thanks to Chris, I appreciate the comments. I like
'to the point' answers with facts to back up opinions. I can then
decide for myself which is best. I appreciate everyone else's comments
too. I'm sorry for my wording of the question which seems to have
started off a little flame war, I'm not trolling.

I have found that SDCC still meets my needs for my project. I also now
have an idea where the Keil compiler could fit into future projects. I
use both commercial and open source software. I sometimes find the
open source tools to be very difficult for 'newbies' to use as if they
have any background it usually Microsoft and it's spoon fed
background.  But I can create howto's to get them started. This
sometimes leads to article in magazines which is not a bad thing :-)

My needs:

My impression of SDCC is that it's a slow moving project (I have a few
that I manage so I know the frustrations, see HCS below for an
idea). My needs are more cost and 'it works' rather than the highest
quality code. I want to attract DIY users who are interested in my
project with low cost (I've got lots of howtos to help with their lack
of experience). SDCC fits that bill nicely. My bigger worry was that
it produced bad code, like one of the older C2C pic compilers for
Linux.  I know it was free and I figured out ways around the problem
but I have very little extra time to fix major compiler bugs when I
need to design hardware, write software, maintain web pages and try to
manage projects (BTW, I do have help but could use more :-).

Thanks for everyone's help and Happy New Year.

--
Linux Home Automation         Neil Cherry         snipped-for-privacy@comcast.net
http://home.comcast.net/~ncherry/ (Text only)
We've slightly trimmed the long signature. Click to see the full one.
Re: Newbie assistance for Atmel at89c2051 project
Hi, if thats all you want to do just go look in the microchip site. All the
code is there for keypad scanner and serial drivers. All the development
software is free and you can build your own programmer for about $10.

Site Timeline