Hi, A good example of a bootloader is at http://www.workingtex.com/htpic/PIC_bootloader.htm. Cheers, Shane. > -----Original Message----- > From: pic microcontroller discussion list > [mailto:PICLIST@MITVMA.MIT.EDU]On Behalf Of wouter van ooijen & floortje > hanneman > Sent: Thursday, 26 July 2001 1:55 a.m. > To: PICLIST@MITVMA.MIT.EDU > Subject: Re: [PIC]: Bootloaders? > > > > I've been messing with pics for a while. I have heard the term > 'bootloader' > > but am not familiar with what it is or the reason someone would need it in > > the first place? Can anyone suggest any source of info that I may learn a > > little more about these things? > > Below: response by me on the Jallist to roughly the same question. > Wouter > > > What is the difference between a programmer and a bootloader? > > I will give you a (the?) long answer. > > A programmer forces the target chip into programming mode, and can then > write all code, data and configuration info into the chip. The 'forcing' can > be done by applying ~14V to the MCLR pin (this is called HVP: High Voltage > Programming) or by applying a certain loical value to pin RB3 (or 4? check > the datasheets) during reset (this is called LVP: Low Voltage Programming). > A bootloader is a program running in the PIC itself that communicates with > your PC and writes to the code and data locations that are not occupied by > the bootloader. A bootloader can not change the configuration data in the > chip. > > HVP is available on all PICs. Disadvantage: requires ~ 14V to enable > programming. Advantage: does not require dedicated pin(s). > > LVP is available of the F87x and F62x chips. LVP can be enabled/disabled in > the configuration data. This data itself can only be changed using HVP. > Disadvantage: when LVP is enabled the LVP enable pin is dedicated to this > role, it is no longer available for general use. Advantage: does not require > anything power beyond the normal Vcc. > > Using a bootloader is only possible when the chip can write its own > code/data memory, which is only supported on the F87x chips. Advantage: > communication can be intelligent, because the PIC is available to handle the > communication. Disadvantage: the chip must know whether to start in bootload > mode or to run the loaded program. This requires a pin, but this pin can > serve other purposes. > > To further confuse things: Microchip requires that a "production" programmer > can verify (read back and check) the programming result at the extremes of > the power supply range of the intended target. When a 7805 is used in the > target this means reading at for instance 4.5 and 5.5 Volt. All other > programmers should be qualified as "prototype" programmers. > > One more issue: The flash/eeprom PICs (16c84, f84, f62x f87x) require very > little current from the ~14V during HVP. The other PICs require substantial > current. This separates the 'low current' programmers that can only handle > the flash PICs from the 'high current' ones that can handle (nearly) all > PICs. > > Last note: Some programmers require you to take the PIC out of its circuit, > put it in the programmer, program, and put the PIC back in the circuit. This > gets tedious after the 100th time, unless you never reach the 100th time > because one of the pins of the chip broke of at the 50th time. Hint: put the > PIC in a socket with round (stiff) pins and never take it out (that is: not > untill one of the sockets pins breaks) just plug and unplug this combo. > Other programmers connect directly to the PIC while it is in your target > circuit. This is called ICSP: In-Circuit Serial Programming. Never mind the > Serial (which has nothing to do with your serial port). It just means that > you can download and run your application without leaving your keyboard. > Note that some circuits that are not really ICSP-capable can do ICSP when > you remove the Xtal during programming. > > After-last note: the F87x chips have build-in (hardware) support for > breakpoints, single stepping and other debugging goodies. The word is that > this eases development considerabley, but I have never used it (yet). > > So what to choose after all this information? If you just want to start > experimenting with PICs I would suggest to buy a 16F877, build one of the > very simple serial-port HVP programmers that can be found piclist/techref > and load a bootloader in the PIC, and from then on forget the HVP programmer > (you could have build it on a solderless breadboard) and just use the > bootloader. When and F877 is not available I guess the F628 is not available > either, and the F84 is possible the only thing you can buy. Now you can > either buy one, build a HVP programmer and use it (I strongly suggest that > you select a programmer than can do ICSP), or buy two, build a simple HVP > programmer to program one for my WISP design and use the other as target. > > When you want to do serious development work with PICs I suggest you buy a > PicStartPlus or another programmer that can be updated for new PICs. When > you want to do production programming (as opssosed to hobby work) select a > programmer (for your choosen target chip, or maybe for the whole PIC range) > that is advertised as "production" programmer. > > Wouter > > ----- Original Message ----- > From: Alan Manning > To: > Sent: Sunday, July 15, 2001 8:04 PM > Subject: [jallist] Difference between programmer and bootloader? > > > Can someone please explain the difference between a programmer and a > bootloader? I want to buy a cheap programmer like James does, but all the > ones I've looked at are expensive. > > -- > http://www.piclist.com hint: To leave the PICList > mailto:piclist-unsubscribe-request@mitvma.mit.edu > > > -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu