programming the 8051 microcontroller

Discussion in 'Homework Help' started by HSMBELE, Apr 8, 2010.

  1. HSMBELE

    Thread Starter New Member

    Apr 7, 2010
    6
    0
    hey i have been working with the 8051 microcontroller at d last 2 months. I find difficulty in programming it, can anyone help me by giving me ways to actually see and write a programme when i write a test? please!
     
  2. Papabravo

    Expert

    Feb 24, 2006
    10,135
    1,786
    There are two aspects to "programming" and I'm not clear which one of them is giving you a problem.

    1. Given a set of requirements, can you write a series of instructions that implements that set of requirements. This is referred to as "writing a program".
    2. Given a program that has been "written" and then assembled or compiled, how do you get that program into a memory that is accessible by the processor. This is referred to as "burning a program"
    The "burning a program" terminology comes from a time when Read Only Memories, Or ROMs, were implemented with "fuse links" that had to be "burned out" in order to turn a "1" into a "0" or vice-versa in the early examples of ROMs.

    Given that long winded explanation, which one of those problems are you having trouble with?
     
  3. HSMBELE

    Thread Starter New Member

    Apr 7, 2010
    6
    0
    i am having a problem with the first type WRITING A PROGRAME please help.
     
  4. HSMBELE

    Thread Starter New Member

    Apr 7, 2010
    6
    0
    im having a prob with the first type which is writing a programe
     
  5. bertus

    Administrator

    Apr 5, 2008
    15,645
    2,344
    HSMBELE likes this.
  6. Papabravo

    Expert

    Feb 24, 2006
    10,135
    1,786
    In order to write a program for the 8051 it helps to know what resources you have at your disposal. There are three resources that you should concentrate on at the beginning

    1. Program memory, where the instructions are held. This memory is addressed by the Program Counter Register. In the MOVC instruction it is also addressed by the Data Pointer.
    2. Data memory, where the data is held. This memory can be directly addressed in an instruction, indirectly addressed through an 8-bit register, and indirectly addressed through the 16-bit data pointer
    3. Special Function Registers. These are directly addressed registers used to control, activate, and monitor the peripheral devices.
    Once you have a handle on these three things it becomes much easier to conceptualize and "write" a program.
     
    HSMBELE likes this.
Loading...