Archived

This topic is now archived and is closed to further replies.

CProgrammer

8051 microcontroller series or microcontrollers in general

Recommended Posts

I am looking for a starter kit for robotics programming. I have been doing some research and have found SDCC to be a descent c compiler for the 8051 series. Any ideas were i can order a good starter kit for a hobbiist robotics programmer(i prefer c programmable microcontroller or if absolutely necessary assembler). Until now the 8051 seemed nice to me but i couldnt find a good well described and easy to order kit yet. Any help is much apreciated. -CProgrammer

Share this post


Link to post
Share on other sites
Hobby kits usually consists of so-called 'BASIC Stamps' which are a uController and a PROM burned with a BASIC interpreter - like an old Commodore 64.

To program a PIC or uC using assembly or C you need to be able to either burn a PROM and build a small circuit board, or most such devices today have from 4k to 512k of integrated permanent storage.
You have to have the right burner for the chips you're working with - all burners will work with a large number of chips, but not any possible chip you get your hands on. The burners cost from $100 to $300 or so.

Programming in C means you need a compiler, and these are generally not free either - they cost alot more than the burners do ($1000's). You can't use any ol' C/C++ compiler, you need one made for the chip you are writing code for, and one made to produce file that can be burned on to it (Windows compilers produce PE files, Linux compilers produce ELF files, you need just the raw code).

Now, I'm seen plans out there for building a burner yourself out of stuff you can buy at Radio Shack (don't buy crap there*) for Microchip PIC's (because PS2 hackers use them to defeat the boot protection). I've never seen one work with my own eyes though.

gcc is a free compiler (if you didn't know), odds are fair it's been retargetted at a given uC (I'm almost certain there's a port for the 8051).

*It's rudely expensive. For the cost of the stuff you have to buy to make a burner, you could fill a chest full of misc. eletronic bits - you can however get it today and not wait a week.

[edited by - Magmai Kai Holmlor on August 13, 2003 11:40:32 PM]

Share this post


Link to post
Share on other sites

SDCC is quite nice compiler for c51 -series, however it doesn''t produce as fast code as keil''s (commercial, expensive but good) and does have some bugs that can be quite troublesome to find.

(E(E))PROM Programmer may not be necessary; I''d recommend using Atmel''s c51-compatible ISP (in-system-programmable) chips. Programming cable is *very* easy to make (granted, your schematic must support it, mainly the resistor between vcc and rst must be large enough); cable itself has only two resistors (email me for details).

Starter kits vary however, I don''t know much of them since I haven''t really ever used one (being EE major and hobbyist for ages helps, so haven''t had any need.) Cheap ones aren''t very expensive though, I think you can get quite basic kit for some $100-$200. I''d look at atmel''s selection again, they have at least one demo board (quite simple, but helps to get basics right - I couldn''t find list price though). Those don''t help with robotics, though.

Share this post


Link to post
Share on other sites
My opinions only

8051 too expensive.
I have the Stamp from parallax, great fun, code in basic.
I have seen on ebay a "Microchip" pic setup with c compiler for £39, i have been very tempted.

My plan is to use pic chips for physically small projects and old motherboards for larger projects, such as building an r2d2.

The advantage of using, say a p133 is the compatability with modern software and compilers and storage.
Of course the power supply becomes an issue. my plan is to use a bike battery and an 12v to 240v inverter.

...so far i have only flashed a few leds from the parallel port, my motor control circuits have not being too succesful.


Share this post


Link to post
Share on other sites
I've used several varieties of basic stamp and PIC chip, and I must say I favor the PIC chip. Microengineering Labs sells a very affordable PIC programmer and BASIC compiler. Or you could just use assemble (I've only dabbled in it, I prefer the 99% basic-stamp compatible PicBasic). PIC chips support in-circuit serial programming. Many PIC chips come in a flash variant, so there's no need to play with ultraviolet EPROM erasers or one-time-programmable chips. A pic chip will cost from $4 to $12 depending on the model you choose (PIC16F84A is my fav... $6). Of course prices drop in quantity. My startup system was a little over $200, if memory serves. I got the programmer for $50, I think the compiler was $100 and I spent about $85 on PIC chips (it's cheaper to buy 25 at digikey than it is to buy 15).

EDIT: fixed link

--------------------


You are not a real programmer until you end all your sentences with semicolons; (c) 2000 ROAD Programming

You are unique. Just like everybody else.

"Mechanical engineers design weapons; civil engineers design targets."
"Sensitivity is adjustable, so you can set it to detect elephants and other small creatures." -- Product Description for a vibration sensor

Yanroy@usa.com

[edited by - Yanroy on August 14, 2003 11:49:38 AM]

Share this post


Link to post
Share on other sites
For the microchip pic option the best idea is to build a simple programmer yourself, I use the JDM84 one + icprog for the software to program it initially then use one of the many bootloaders to program it afterwards. It saves a lot of time to do it that way. The 18F series is the best bet for development these days, the higher maximum clock rate, flat memory space, extra instructions, etc all make it much nicer to use that the older ones.



Share this post


Link to post
Share on other sites
Thanks for all your help guys really apreciate it.
I think ill search in atmels c51''s selection first.
They seem to be widely compatible, reprogrammable and dont only support BASIC, cause i just dont want to learn a new language for it.

Thanks again.

-CProgrammer

Share this post


Link to post
Share on other sites
quote:
Original post by DefCom
The Microchip starterkit that looks good, $36 (US) or £39 in UK, so how many dollars to the pound then????

Microchip




Wow this offer really does look good and all that for just 36$.
Thanks DefCom

-CProgrammer

Share this post


Link to post
Share on other sites
I always knew about microcontrollers like basic stamp and then a few of the c ones because i was trying to make a computer interface to my train.

I never really thought about actualy trying to interface a modern processor. Is it possible? Does anyone have any link?

Share this post


Link to post
Share on other sites
I have created a ''simple'' webpage to host this weeks projects

robodev

I have just ordered the picchip programmer, so the project is on hold until it get here.

I''ll let you know how it goes.

On a final note, i have seen many questions about projects about pics, robots, parallel port stuff. I would like to see a specific forum for this subject, what''s your opinions?

Share this post


Link to post
Share on other sites
quote:
Original post by honayboyz
I always knew about microcontrollers like basic stamp and then a few of the c ones because i was trying to make a computer interface to my train.

I never really thought about actualy trying to interface a modern processor. Is it possible? Does anyone have any link?


Of course it''s possible - the easiest way to talk to a modern processor is RS-232 (serial). The parallel port seems to be a favorite for this type of application, because it lets you toggle lines - a poor man''s digital IO.

If you want a seriously integrated device to talk to a PC class processor, you talk via the ISA or PCI bus. With simpler chips use can use I2C.

Share this post


Link to post
Share on other sites
quote:
Original post by DefCom
The Microchip starterkit that looks good, $36 (US) or £39 in UK, so how many dollars to the pound then????

Microchip




That is dirt-cheap! MC makes good stuff too.

The value of a pound is about 1.5 times that of a USD. But everything cost the about the same in pounds that it does in dollars - xsp high-tech.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
What about something like the 68HC11. Its got most of the ports built in (serial, parallel), rom/ram on the one chip like most others but there''s heaps of docs available. There''s even C++ cross compilers for windows if your that way inclined. Plus if you''ve done any C64 programming then the assembly is nearly identical.

Don''t mind me if all the other chips mentioned here are better, I''ve only ever had to use the HC11 for embedded apps and basic motion control. So I''m definately no expert.

Share this post


Link to post
Share on other sites