firmware in microcontroller

Discussion in 'Embedded Systems and Microcontrollers' started by Salman Anjum, Nov 25, 2014.

  1. Salman Anjum

    Thread Starter New Member

    Oct 13, 2014
    14
    0
    Hi...i'm new to engineering so pls tell me thatI have a PIC Micro-controller. I was told that I need to install a firmware in it before I could burn a program in it. . so my question is what is firmware? i've heard a term boot loader related to this ..... pls explain what is boot loader?? .. I want to burn a burn a program using a programmer , do I need a boot loader ????
     
  2. MrChips

    Moderator

    Oct 2, 2009
    12,449
    3,363
    Firmware is any program that resides in a microcontroller based system, usually stored in flash memory.

    Bootloader is a small program that facilitates the programming of the flash memory.

    What is bootloader

    bootloader

    All embedded single chip microcontrollers have a bootloader or equivalent built-in otherwise there would be no way to program the internal flash memory.

    Additionally, some platforms such as Arduino add a separate program to accept programming instructions using their own special programming protocol.

    No, you do not need a bootloader. The PIC programmer will program the PIC MCU for you.
     
    Last edited: Nov 26, 2014
  3. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,392
    1,606
    Firmware is one of those words that means just what you want it to mean, no more, no less.
    It is generally synonymous with software or program code. The “firm” in "firmware" intends to show it rarely if ever needs to change.

    OK, so that said… if you have a programmer you can program any and all code into your device (with some possible rare exception).

    Lacking a programmer you may want to use a bootloader, which is a small program (firmware) that is just smart enough to load a larger program into your device. This is useful in applications such as field programming a device by the end user, someone without special equipment, so something existing on the unit (serial port, USB port, and the like) can be used to gather the new code to be programmed into the device.

    So if you have the programmer for your micro controller you have all that you need.
     
  4. Papabravo

    Expert

    Feb 24, 2006
    10,148
    1,791
    It is difficult to answer your question without more detailed information. PIC is a generic term that covers literally thousands of devices spanning 3 decades or more of semiconductor production.

    Firmware, n., A program written to run from a Read Only Memory (ROM). The program cannot modify itself once it has been placed into the part, and is unaffected by power cycles.
    Bootloader, or Bootstap Loader, n., A small compact program, that is introduced by some method into a computer system, that loads a larger program from some peripheral device and then executes it. It literally pulls the computer up by it's bootstraps.
     
  5. mcgyvr

    AAC Fanatic!

    Oct 15, 2009
    4,771
    971
    My definitions..
    Firmware = the written code that tells the microprocessor what to do.
    The firmware is loaded into the processor using a dedicated programming device.

    Bootloader = An extra bit of code that is loaded into the micro before the firmware to allow the firmware to be loaded into the micro without the use of a dedicated programming device. A bootloader may allow the firmware to be updated using just a USB connection or even wirelessly via wifi.

    You do not need a bootloader but you always need firmware to make a microprocessor function.

    A bootloader is only loaded once.. and firmware can be loaded over and over again as the needs change.

    Devices like an Arduino have a bootloader so you can easily program them via the USB cable instead of having to buy a dedicated programming device.
     
  6. Salman Anjum

    Thread Starter New Member

    Oct 13, 2014
    14
    0
    thanks all. very simple explanation . .
     
  7. Papabravo

    Expert

    Feb 24, 2006
    10,148
    1,791
    In most cases you can also change or update a bootloader as well, unless it is located in masked ROM. I agree that this operation is much less frequent that changing the firmware which is kept in Read Only Memory (ROM).
     
  8. Salman Anjum

    Thread Starter New Member

    Oct 13, 2014
    14
    0
    if I lost my boot loader in arduino. . how do I install it back...
     
  9. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,392
    1,606
    First you need to aquire the code. Then you install it with a programmer (something an Arduino normally does not need).
     
  10. MrChips

    Moderator

    Oct 2, 2009
    12,449
    3,363
  11. ISB123

    Well-Known Member

    May 21, 2014
    1,239
    527
    Get cheap usbasp for 3$ on ebay.
     
Loading...