How to program a Microcontroller?

George Sephton

Senior Member
Hi,
Ive decided finally to take the leap from simple PICAXE to see how Microcontrollers work. Ive done some research into the 8051 architecture but I was looking for any tips and how to program it. Ive got a book on PICs which is slightly different but how would I program a DS83C530? There seems to be a serial in and out port so I assume I use these to program it but whats the circuit. PICAXE has a simple download circuit which allowed me to etch my own but what is the equivalent for the DS83C530?

Also what is the programming language and what software can I use for the 8051 microcontrollers? Ive been looking for compilers but can't seem to find much useful.

All of your help will be greatly appreciated,
Thanks,
George S.
 

BeanieBots

Moderator
George, with all due respect, this is a PICAXE forum.
For support with other micros, you will need to go to their forum. (If they have one).

The architechture of the PIC and the 8051 are VERY different.
Programming in assembler is unique to whichever micro you choose.
Programming without a bootloader pre-installed (as with PICAXE) will require a special programmer. You can't just hook it up to a PC and download a program.

Get some books, use google and save up for a programmer and if you want to program in a high level language like BASIC, then also save up for a compiler.
 

hippy

Ex-Staff (retired)
This is primarily a PICAXE and Rev-Ed product related forum so the best help will likley come from the DS83C530 manufacturer, other 8051 related forums and what there is by way of Google..

Programming those chips ( and most other microcontrollers ) will unlikely be as easy as with the PICAXE. They may have serial ports, but not usually for programming. There is usually no equivalent to a simple PICAXE download interface, you often have to buy or build a dedicated programmer and find the software which will work with that.

Even micros which have a in-built or pre-programmed bootloader will rarely have a download interface as simple or as cheap as a PICAXE.
 

kevrus

New Member
Best of luck George.

I once tried some pic programming using assembler and a 'picstart' kit. Took me about 2 weeks of spare time to strobe some LEDs as per Knight Rider. I decided then that as I had zero programming experience of any kind that it wasn't for me, or more to the case, I wasn't for it...(picstart now resides in the loft!).

After discovering picaxe, I can do all sorts of wonderful things. Although my coding is awfully haphazard and probably would make an experienced coder squirm, I do seem to be able to accomplish the tasks that I want, so here i'm staying.
 

MORA99

Senior Member
For a fast start get a development board for the pic range you want and a pickit2 (maybe clone).
Then you have a working base
Some devel boards are sold with bootloader and can be programmed over a serial interface.

But things that are so simple on picaxe takes a lot of effort on the empty pics(readtemp, i2c, serial on all standard pins, etc.), so unless you need the speed it should be for the challenge to use pics...

Compiler can be found in different kinds, I use a C compiler for the PIC18 range (MPLab C18)
 

manuka

Senior Member
George-do you really need the pure speed (& punishment!)? I'd suggest you take this in stages, as PICAXE-8051 in one step is akin to moving from a smart car to a F1 racer. How about the increasingly popular ARD**** as a "family runabout" intermediate stage? Then again the X2 release may tempt you back!
 

Dippy

Moderator
Can we assume George has seen something interesting controlled by the DS micro?

George, have a search, buy all the gear, and have a go.
We'll see you again in a few weeks..;)

An F1? Really? If George had decided on a quad-core super-fandango I may have agreed.
Maybe more like moving from a Smart Car up to a Skoda ;)
 

BeanieBots

Moderator
Smart Car to Skoda implies you can even drive.
I'd say it's more like going from a push-bike to a car (Skoda). (sorry PICAXE!).
Not only will you need to fork out a lot more money, you'll need to learn how to drive as well.
 

Dippy

Moderator
Ooh, very good !!

Come on hippy, your go. I bet you've got an even more profound analogy :)

Mind you, moving to a Skoda is quite a good comparison as you'll have to buy some extra bits to get it working. (Sorry to all Skoda owners).
 

manuka

Senior Member
Dippy: Agreed. I'd said F1 as this involved fewer keystrokes- keeping up with your razor sharp wit has begun to wear out my keyboard! Make that a Stirling Moss era F1.

The original 8051 is an ancient beast- I recall wrestling with it ~20-25 years back- and it has long been sidelined to the pits, although the 8051 approach is still at work in more recent micros, such as this very Maxim/Dallas Semi DS83C530.

Given the PICAXE family are based upon Microchip PICs, my power user recommendation has been to move to PIC programming in "C". You could pretty much just wipe a few PICAXEs and get started, & of course (thanks to the PICAXE background) you'd know a lot about PIC pinouts, power supplies & quirks already.

Consider the 08Ms PIC12F683 engine initially, but if you've a now obsolete 28X 16F873 then check the likes of => www.swarthmore.edu/NatSci/echeeve1/Ref/C for PIC/C_Intro.html
 
Last edited:

KIGX

Member
Out of curiousity, suppose I knew what I was doing, could program in C or assembler, or whatever, and had lots of cash to throw around. (I don't). What advantages would there be to looking across the PICaxe fence at other microcontrollers? Faster? More memory? By how much? Orders of magnitude or just a bit? Do PICaxes wind up in mass commercial products like cars, fridges... If not, why not? Is it simply because in mass production the non-PICaxed chips are cheaper once you have the programming nailed? I imagine PICaxes do wind up in smaller products generated from within the PICaxe community since there do seem to be commercial aspirations showing in some threads...but not many... I suspect its pretty tough to make a living from PICaxe circuits.
 

George Sephton

Senior Member
Reading this has made me laugh a lot but thanks for all your help. So I take it, it's just easier to a development board but the links given are certainly useful. I am still a student (ie going to take my GCSEs soon) but I have become really hooked on this. I am happy with the PICAXE but it's just that someone's made the "boot strap" program thing and the programming is very easy, I have loads of experience in programming so I just want to see what it's like to have to program from scratch, even if it is in C :D.

On another topic and this is quite irrelevant but Ive got to find work experience at the minute, Im looking for a semi-conuductor manufacturing HQ, R&D Center,Designing Center (Not Sales) to work in for a week. Does anyone know of one because googling stuff like that isn't helpful. It has to be around Oxfordshire so I'm not too far, London also but like Manchester and Cornwall's a bit too far.

George S.
 

George Sephton

Senior Member
Actually Ive been looking around and these companies charge an extortionate amount of money for these things and I really can't afford stuff like that so it really will be wait for uni! I'll look into Arduino, Spark Fun talk about that loads. Thanks everyone. But still asking about the work experience question above.
George.
 
Last edited:

manuka

Senior Member
As you apparently know their product range well,I'd give Rev.Ed themselves a ring if I were you. In colonial terms Oxford-Bath is just down the road, & even if you have to camp in their tea room for a week you'll hence be very valuable helping with X2/18M rollouts -if only to keep those cups of tea coming!

If you do manage this, then perhaps let us know if Hippy is now working more regular hours than his traditional 24/7 schedule.
 
Last edited:

MORA99

Senior Member
What advantages would there be to looking across the PICaxe fence at other microcontrollers? Faster? More memory? By how much? Orders of magnitude or just a bit?
A lot faster, even arduino which is still bootloaded is a lot faster.
More structured code is one of my main reasons for using PICs on some projects, just being able to do functions helps alot.
Theres also a lot more ram avaliable...
-The 18F4550 I use at the moment has 2KB ram, 256KB eeprom, 32KB program space and runs at 12mips (48MHz).

Most of the stuff it will run could be done by a picaxe, picaxe lost the selection because of ram and true usb connectivity (no virtual serial ports).
 

jglenn

Senior Member
The 8051 design is the grand daddy of microcontrollers. It has influenced dozens of major chips being used today. Being old, I remember the 4004, and when the Z80 came out. I was using the Fairchild F8 and RCA cosmac at that time. This pertains, because the PIC chip (Peripheral Interface Controller, it was designed to reduce glue logic in computers, not BE a computer) in reality is a stripped down 8051.

Assembly is not hard once you learn it, but not as powerful as basic. There are a lot of limitations, most eng avoid it except for speed in some cases. Microchip keeps moving registers around, when they migrate your favorite chip to a better one, your programs may not work anymore. The picaxe is a safe choice, the world of embedded code is full of pitfalls. Sometimes I use a compiler and prog from tech-tools, has a few macro inst that MPLAB does not have. :D
 

BeanieBots

Moderator
On another topic and this is quite irrelevant but Ive got to find work experience at the minute, Im looking for a semi-conuductor manufacturing HQ, R&D Center,Designing Center (Not Sales) to work in for a week.
Oh dear!
I've been in that industry for some 30 years and finally left it last May.
The semiconductor industry is pulling out of Europe faster than rats leaving a sinking ship. The very last equipment manufacturer pulled out of the UK over a year ago. The last (sales only) HQ is in Crawley.
The next closest would probably be Dresden in Germany.

There are a few joint ventures involving a few Universities but these are so secret that they are not generally advertised and use head-hunting for recruitment. Short of that, I'm afraid it's move to China, Taiwan or possibly Japan.
 

George Sephton

Senior Member
@BeanieBots: Well that sucks a lot.
I'll look into Rev-Ed, you never know. But otherwise I'll look around the arduino website, see where I can start.

Thanks for all your feedback,
George S.
 

BeanieBots

Moderator
Do you really mean "Semiconductor Manufacture"? (maybe you meant electronic?)
Rev-Ed don't make semiconductors.

Have you ever been in a class 10 clean-room?
Have you ever worn a space-suite for more than a few hours?
Have you ever put on a space suite and then decided you want the loo?
Have you ever got as far as the clean-room and then realised you forgot something?

There are still a few "straglers" in Scotland and Wales. Find one, then visit the local pub. You can very quickly identify those who work in the clean-room. Their ears are pulled forward from the hours of pulling by the face mask and they will have a red band across their forhead from the tension on the elastic head gear.

If you are offered a vist, try to make it a Tuesday.
Why? Let me explain.
As a visitor, you will not have your own assigned suite.
That means you must borrow somebody elses:eek:
Rules of the clean-room. NO DEODERANT, NO perfume, NO talc, NO makeup.
In fact, nothing that could possible have or cause any particles.

Weekends are busy. Suites are typically washed Monday. By Friday.. well, I'm sure you can imagine. I've actually been able to poor the sweat out of my boots by Friday. Would you like to borrow my suite at the weekend?

Don't want to put you off but the semiconductor industry is not a job. It's a way of life. It's an EXTREMELY well paid profession, but with that comes ownership. They OWN you. The pressure is INTENSE to say the least.
 

Dippy

Moderator
Well, as George spelt the word Center as he did then he should surely have to go to the US?

How about Zetex? The HQ is at Oldham and still seem to make in the UK (well, according to their site and the fact that I still get get Zetex stuff made in UK which is very rare).

No makeup? George won't like that! :)

But as Zetex spell Centre as Center in their Corporate brochure then that will suit George too.
(However, as they were taken over by Diodes Inc fairly recently , which probably explains US spelling, maybe all their manufacture will be moved to China soon?)

Good luck with Work Experience. I did mine at the Army Tank Simulator at Bovington, Dorset and learnt to drive a Challenger and knocked over a bus.

PS. George, If you learnt PIC as your 'next step' then you could configure the PIC to have PICAXE i/o and still use many of the standard PICAXE projects....
 
Last edited:

BeanieBots

Moderator
...and despite all that grumpy-old-man stuff above, why it would be fantastic work experience :)

Go for it....
Don't forget, I stuck it out for 30 years. Admittedly, only about 10 of that was "at the coal face".
Did I forget to mention about peeing into a bottle every week to see how much of those lovely chemicals you've absorbed?

It also has its rewards. For me, it was the dexterity challenge;)
When you have a spare moment, try this.
Put on a painting mask, then some safety goggles and if you have one with clear glass, a welding mask. Then slip on a very thick coat and a pair of rubber gloves. Then try to solder a 0.1mm pitch smd chip:p

I once had to strip down a wafer manipulator. I forget the actual size of the screws, but the allen key was 0.9mm diameter. When I challenged the guy who designed it, he said it was easy and then showed me how do it. I then made him dress as described above and asked him to demonstrate again. From then on, it was mandatory that all D/O staff spent a day in a clean-room environment:p

Don't forget health & safety. In Europe, US & Japan, you will be well be well protected from the million volts on the implanter, the X-Rays from the etcher and the toxic chemicals in the furnace. In many of the third world countries, it is cheaper for them to get a new employee than it is to fully shut down a line for maintenance. Be warned!

Possible the most ideal "work experience" you could possibly get.
It would cover every single discepline you could imagine and to a depth you could not imagine. I feel very privileged and honered to have been in that industry for so many years. Not many stay more than a few years for assorted reasons.
 
Last edited:

Dippy

Moderator
Don't do it George.
Look what all those MeV did to BB......

He dresses in his clean-room suit when he goes shopping now.
 

manuka

Senior Member
George: You are no doubt now tempted to look at accounting or law-or anything else!

However, if the previous vitriol has left you only eager for more, then send me a forum Personal Message (PM)- or contact by my email at the end of www.picaxe.orcon.net.nz. I've contact with assorted UK firms, & know of several "projects" that may fill in a week for someone with the right skills & attitude. Please supply details of your age etc too. Stan.
 

BeanieBots

Moderator
Actaully Dippy, that's closer to the truth than you think.
In a semi-clean room, you only wear a shower cap and little "over" booties.
It becomes second nature to wear them all the time. People have been spotted shopping lunch time who have forgotten to remove either one or even both items:eek:

As for the rubber gloves, well, only at weekends now. My nurse always wears them so I like to keep up with the fashion.

Anyway, enough of my life history. Time to go and spend all that money I've earned from you lot buying processed sand.
 

Dippy

Moderator
"In a semi-clean room, you only wear a shower cap and little "over" booties."

- Lordy, thanks BB, that image is going to haunt me :(

Was there much nice totty there? And a security camera?
 

westaust55

Moderator
Reminds me of the time aeons ago when workers on one of the iron ore mines in West Aust were pushing for the company to provide work clothes not just safety attire.

So one worker came to work wearing his company issue attire (hard hat + steel cap boots) and a smile.

He got as thru the mess for breakfast, on the bus to work and got as far as the minesite proper before pandemonium broke out (female cleaners did not like what they saw. ) :eek: :eek: :eek:
 

BeanieBots

Moderator
Only coz you asked Dippy,
One of my early visits to DEC in Scotland was the first time I'd ever entered a clean-room during the normal day shift hours.
Being a "newbie" I always went to the changing rooms early becuase it took me a lot longer to get all the gear on than it did my experienced colleagues.

I was just finishing off when the next shift arrived to get changed.
About 30 women in their mid twenties. Stripped off right in front of me without a care in the world. That was about 30 years ago and I've never forgotten the image:D (I was young and impressionable then;))

Unfortunatley, once togged up, you can hardly tell male from female.
You learn how to identify people by the way they walk and other general mannerisms.
 

George Sephton

Senior Member
Unfortunately BB that's exactly what I want to spend the rest of my life doing.
@Stan, sounds interesting I'll PM you.
I'll look into Zetex but all sounds good.
Im currently looking into Silkscreening, my art dept has a silkscreen, my DT teacher continually tells me there's no need for Silkscreening and I'm eager to make a perfect PCB. I started with etching, kept staining the sink so have looked into milling, seems easier as DT dept has a CAM with a 0.8mm mill bit. I also want to find some non-conductive, heat resistant ink for the legend, any ideas where I can get the ink and the coloured epoxy resin?
George.
 

George Sephton

Senior Member
Just had a very awkward conversation with a security guard at Zetex, apparently they do make semi-conductors there so I'll tell Careers advisor.
 
Top