Connect with us

how to program 8051

Discussion in 'General Electronics' started by Ankur, Jun 30, 2004.

Scroll to continue with content
  1. Ankur

    Ankur Guest

    I m a budding electronic hobbyist and i m learning about
    microcontrollers these days . I've done enough of theory and now wish
    to gain some hands on experience.
    I wish to try some programs on 8051 but i have no idea abt UPLOADING
    my assembly program to the chip . I've faint idea about existence of
    8051 programmers .
    Could some1 please give me an idea of how to go about this ?
    I wud b very thankful to the one who cud tellme how to proceed once
    i've my program ready n i wish to upload it 2 the uC

  2. dont know

    dont know Guest

    any idea what type of 8051 you want to use?
    plain 8051/2 needs an eprom. no upload.
    flash 8051's can be erased and uploaded.
    or you use a version with a bootblock starting at 0000h
    and upload and run a program from maybe 1000H
  3. Ben Moss

    Ben Moss Guest

    If you don't know what kind of 8051 you want to use, I recommend
    buying an Atmel 89C4051 (available from any major parts distributor,
    such as or The 89C4051 has most of the
    features you are likely to use if you are just playing around with
    programming the chips. This chip typically costs around $5 or so and
    programmers are readily available. When you order the chip make sure
    to get the other parts you need (crystals, resistors, capacitors,
    etc). After you decide on a chip to use, you will have to find some
    way to program the chip (or the EPROM that goes with the chip). There
    is a design for an Atmel programmer that supports the 89C4051 here:

    Personally I have a similar programmer that I bought from, and I like it a lot.

    Next, you will need an assembler. What operating system do you use?
    There is an open source assembler/C compiler package called SDCC at that runs on Windows and Linux. You will
    need to assemble your program into a hex file and then program it onto
    the chip. If you want to get something simple working for starters,
    check out the projects at They have simple
    projects showing you how to implement some of the most common uses of
    the chip (LED blinkie, serial port communication, ADC's, LCD displays,
    etc). They have working source code and hex files to download.

    It's also worth checking out There are some message
    boards and good tutorials on getting started.

    Good luck,
  4. What type of "8051" do you have? There are mnay variations, and it may
    make a difference.
    Are you sure you want to start with the 8051 though?
    The PIC and AVR devices are more popular these days with beginners,
    and there is probably more beginner info available on the web etc. You
    can program these chips for almost zero cost as far as a programmer
    Or perhaps a BASIC Stamp or PIC-AXE chip would make an easier start?

    Dave :)
  5. cs

    cs Guest

    you should write an assembly program(eg. xxxx.asm) with a text editor
    and then compile it to a hex file(eg.xxxx.hex) with a compiler(eg.
    tasm, dasm .... etc), connect your eprom writer to a pc and start the
    eprom programming software and burn the xxxx.hex file into 8051, now a
    days ATMEL89c51 is more popular than INTEL8051, which has the same
    function and same programming, but could be erased by electrical
  6. Ardent

    Ardent Guest

    X-No-Archive: yes

    It may be too much to make a programmer by yourself - you may not have
    the resources. But simple programmers which enable download your code
    through the serial port of your PC are available for prices as low as
    USD 30 or so.
  7. Ankur

    Ankur Guest

    Thnx a lot guys .. ur replies cleared lot many doubts but raised a few
    as well . I wish 2 get them cleared as well ..
    I've managed 2 get one 8051 chip - AT89C51 but cud not manage 2 get
    it's programmer . I found 1 but it was way over my budget .
    Some of u mentioned( cs ..i suppose) tht an EPROM programmer can also
    b used in ATMEL chips . I can get ROM programmer .. so i wud lik 2
    know whether the chip i've described is programmable thru a ROM
    programmer ?
    Secondly , I also wish to learn how 2 use ROMs instead of 8051 flash
    memory 2 store ur programs ... can ne1 show me the way 2 a tut on web

    hope 2 get a few more replies ..
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day