1. ect_09

    Thread Starter Member

    May 6, 2012
    180
    1
    what is the boot loader,
    why we need it??
    what is its purpose ???
     
  2. Papabravo

    Expert

    Feb 24, 2006
    10,163
    1,797
    It is a small program that is used to load larger programs. We need it because it would require removing the device an putting it in a programmer. The purpose is to get a program into a processor.
     
    ect_09 likes this.
  3. ect_09

    Thread Starter Member

    May 6, 2012
    180
    1
    am using ICSP,
    i didnt load it. but i can program my chip 18f452 with different HEX file.
     
  4. Papabravo

    Expert

    Feb 24, 2006
    10,163
    1,797
    A bootloader allows you to do the same thing without any hardware assist like ICSP, usually through a standard serial port. Maybe most PICs do not support such a thing, but the Atmel chips certainly do.
     
  5. adam555

    Active Member

    Aug 17, 2013
    858
    39
    Through the ICSP you are loading the HEX file with a programmer; for which you don't need a bootloader.

    But what if you didn't have a programmer, and need to load a HEX file directly with a USB cable connected to the PIC?... that would require a bootloader; which is a program that loads and executes your programs instead of doing it directly.

    For example: you don't need a programer to load a sketch into an arduino; that's because its bootloader does it through the serial coms by the USB cable.
     
  6. adam555

    Active Member

    Aug 17, 2013
    858
    39
    You can do it with a PIC that has a USB peripheral. both the MCHPFSUSB and MLA come with bootloaders.
     
  7. Papabravo

    Expert

    Feb 24, 2006
    10,163
    1,797
    At the dawn of computer time we had to key in a boot loader with toggle switches, and then execute it, to read the OS off of paper tape or other input devices. We sure do have it lucky these days.
     
    djsfantasi likes this.
  8. MrChips

    Moderator

    Oct 2, 2009
    12,449
    3,365
    Also it helps to understand the origin of the term boot loader. It is the shorten form of bootstrap loader.

    Hence check the origin of the term bootstrap and booting.

    http://en.wikipedia.org/wiki/Bootstrapping

    http://en.wikipedia.org/wiki/Booting

    The first computers came with a blank memory, i.e. there was no coherent program in the program memory.
    You had to manually enter the shortest possible program into the computer memory via front panel toggle switches.

    After doing this a few dozen times one would memorize the code.

    Here is the bootstap loader (Read-In-Mode) for the DEC PDP-8 minicomputer:

    Code (Text):
    1.  
    2. 07756  6014  RCC
    3. 07757  6011  RSF
    4. 07760  5357  JMP .-1
    5. 07761  6016  RRB
    6. 07762  7106  CLL RTL
    7. 07763  7006  RTL
    8. 07764  7510  SPA
    9. 07765  5357  JMP 7757
    10. 07766  7006  RTL
    11. 07767  6011  RSF
    12. 07770  5367  JMP .-1
    13. 07771  6016  RRS
    14. 07772  7420  SNL
    15. 07773  3776  DCA I 7776
    16. 07774  3376  DCA 7776
    17. 07775  5356  JMP 7756
    18. 07776  0000  AND 0
    19. 07777  5301  JMP 7701
    20.  
    And here is the bootstrap loader for the Data General Nova 2 minicomputer:

    Code (Text):
    1.  
    2. 17757 126440 GET: SUBO 1,1
    3. 17760 063610     SKPDN TTI
    4. 17761 000777     JMP .-1
    5. 17762 060510     DIAS 0,TTI
    6. 17763 127100     ADDL 1,1
    7. 17764 127100     ADDL 1,1
    8. 17765 107003     ADD 0,1,SNC
    9. 17766 000772    JMP GET+1
    10. 17767 001400    JMP 0,3
    11. 17770 060110 BSTRP:   NIOS TTI
    12. 17771 004766     JSR GET
    13. 17772 044402    STA 1,.+2
    14. 17773 004764    JSR GET
    15.  
    You only had to memorize the middle column of numbers.
     
    Papabravo and b1u3sf4n09 like this.
  9. adam555

    Active Member

    Aug 17, 2013
    858
    39
    It can't be any other way, when a simple 1 dollar MCU has 10 times more memory and is 20 times faster than my first computer.
     
    Last edited: Oct 20, 2014
  10. Papabravo

    Expert

    Feb 24, 2006
    10,163
    1,797
    Remember this piece of doggerel?

    ACHTUNG!
    ALLES TURISTEN UND NONTEKNISCHEN LOOKENPEEPERS!
    DAS KOMPUTERMASCHINE IST NICHT FÜR DER GEFINGERPOKEN UND MITTENGRABEN! ODERWISE IST EASY TO SCHNAPPEN DER SPRINGENWERK, BLOWENFUSEN UND POPPENCORKEN MIT SPITZENSPARKEN.
    IST NICHT FÜR GEWERKEN BEI DUMMKOPFEN. DER RUBBERNECKEN SIGHTSEEREN KEEPEN DAS COTTONPICKEN HÄNDER IN DAS POCKETS MUSS.
    ZO RELAXEN UND WATSCHEN DER BLINKENLICHTEN.
     
    djsfantasi likes this.
  11. MrChips

    Moderator

    Oct 2, 2009
    12,449
    3,365
    If I recall correctly, that was manditory posting on every minicomputer with flashing lights.
     
  12. Papabravo

    Expert

    Feb 24, 2006
    10,163
    1,797
    I first saw it on the console of the Princeton University IBM 7090 in 1962
     
  13. Brownout

    Well-Known Member

    Jan 10, 2012
    2,375
    998
    Never saw that before. Still laughing :)
     
  14. djsfantasi

    AAC Fanatic!

    Apr 11, 2010
    2,812
    834
    I saw it at MIT on an IBM 1130! Ca 1968
     
    Papabravo likes this.
Loading...