Re: Newbie assistance for Atmel at89c2051 project

From: Terry (tjporter_at_gronk.porter.net)
Date: 01/03/04


Date: Sat, 3 Jan 2004 18:00:06 +1100

Davon Shire threw some tea leaves on the floor
 and this is what they wrote:

> Davon Shire wrote:
>> 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
>>
>
> It's a new year let's put this one to rest and get some work done.
>
> Dear Terry and Chris.
>
> Thank you both for your time and diligence in this discussion. I have
> used the content of my first post to help point out a few things and
> maybe bring to focus what's really important.
>
> Chris you are an Engineer type. You have all your credentials and
> your whatever and that's great.
>
> Terry you have the heart of pit bull

Bwahahahah, but I'm not nearly as vicious as one :)

> (meant in a good way)

I took it that way, after all to advocate Free Software in a Windows
world, one must develop thick skin in the first few years. :)
I've been running only GNU/Linux, on the desktop since August 1997, by
way of background.

> and the
> brains of dedicated developer for OSS. Both are greatly appreciated. You
> did some fine foot work asking back questions and giving answers but
> really. In the end it's not going to matter if Chris paid attention to
> my first post or not, here's why.
>
> I want to make this work in the worst/best way. I haven't got the
> board yet. But I'm dreaming code and taking stomach tablets waiting to
> get into the project and get it done.
>
> Chris your major failing was you said. 'Don't use SDCC' which is kind
> of like saying, "nevermind using the sidewalk. Get from point A - B
> using the bus." Your reasoning being really that the bus had more bells,
> whistles and a better map of the city. Even though I mentioned I have a
> nice pair of tennis shoes. (FreeBSD box) and wanted to use them.
>
> Terry, clearly you know more about the SDCC than I do, and you have
> made some excellent points as to why I could/would want to use it. I
> still haven't much of a clue how to make use of the simulator but I need
> to read more I'm sure.

Well said, and it's a fair learning curve as with any new tool.

>
> Facts that are now current in this project.
> 1. I bought for about $65.00 US a prebuilt LPC932 proto board from
> the www.8052.com site. It seems to cover pretty much everything I need.
>
> 2. this means I'm going to have the crippled Keil software, which I
> can use and will use if it's easier/quicker.

Absolutely, use whatever tool suits you best, that's my motto.

>
> 3. I'm going to need to learn to write code so I can take the pieces
> that's been pointed out to me and try and put them together. Hopefully
> in a dependable and functional way.
>
> 4. Optimization was really never a factor in this design. Because I
> Just want it to WORK.
>
> 5. I only picked the at89c2051 because I had found a schematic and
> pcb design I could use to put it together. I didn't see how I could
> program it though. So that was how I got this whole thing started to
> begin with.

In that case why not use an Avr Mega ? :)
That's what I use these days with Avr-Gcc and I love it, it's much more
mature than SDCC. I've got one clocking at 24Mhz on my bench at the
moment, (damn that's fast) but don't tell the people here or Atmel will
just raise the prices for the 8 Mhz Mega8l ;-)

>
> 6. I have no dedication to any platform save the ones I can cheaply
> aquire. I'd have used a basic stamp if it looked like a good cheap idea.

Hey that's a bit sensible, where is your brand and product zealotry ?

>
> 7. A Simulator is a must I feel if I'm going to have a chance to make
> this work. And a simulator that works in a way I can figure out is even
> better. The S51 simulator seems good but alot like gdb when it comes to
> using it. It took me about 2 weeks to really get a decent grasp on gdb.

Gdb is complex, but most debuggers are I think ? You can see DDD (the
GUI debugger running as a front end to Gdb) on my site debugging some
8051 code.

It's a little rough around the edges in many areas, and I'd like to
point out that I'm not comparing it to Keil or claiming that it's
"better", in fact in many areas I bet Keil is *vastly* easier and more
straightforward to use.

Chris wouldn't be so outspoken about Keil unless it was a great
product!

However SDCC is GPL'd, Free and under slow development at the moment.
It will do code for the 8051 family, some PIC variants and a few other
micros in C. It has a simulator that can be used with GUI front ends
such as DDD.

>
> 8. I need to program this in C, simply because I know C the best and
> bit fiddling with ASM would melt my brain and increase the development time.

I think C is perfect for your project, as your project is small and
there aren't any timing constraints, correct me if I'm wrong ?

>
> 9. If/when this job is finished. I may well become interested in
> designing more with these chips. they seem incredibly well priced for
> hobbiests. I have day dreamed a dozen more uses for these chips to help
> friends and have fun with.
>
> 10. I very much appreciate the views and opinions of eveyone here and
> I hope in the future I may have a chance to contribute.
>
>
> Best wishes for a good new year for one and all.

A really concise post Davron, I think you have it all under control :)

Thanks for your debate as well Chris, you dealt with my points like a
true gentleman:)

-- 
              Kind Regards from Terry 
    My Desktop is powered by GNU/LinuX, Gentoo-1.4_rc2   
         New Homepage: http://milkstone.d2.net.au/          
 ** Linux Registration Number: 103931,  http://counter.li.org **


Relevant Pages