On Fri, Feb 20, 2004 at 02:37:39PM -0000, Peter Moreton wrote: > Wouter, > > Yes, bootloaders are neat and quite 'kewl', but I worry that someone > might manage to overwrite the bootloader code, and end up with a > non-working board. Since the PCB design uses a TQFP PIC, it's a bit > tricky to replace! I'd much rather put some hardware on the board to > program the PIC from any state. Understood. However with some very slight bit twiddling this can be virtually eliminated: 1) 18F parts have sectioned write protect bits. So you can simply write protect the section where the bootloader resides. Truthfully MChip kind of screwed it up because they have a boot block precisely for this purpose, but they stuck it at the front of the chip's memory instead of the very end. It make transparancy a bit difficult because applications generally expect to occupy the lowest memory locations. 2) The only issue that arises from 1) above is that blocks are 2K long, which may be overkill if your application is large. But it isn't a real big deal because 18F config space is writable by ordinary applications including the bootloader. So the bootloader can unwrite protect while loading then write protect again before releasing to the application. So while the application obviously could still overwrite the bootloader it would have to be a deliberate act because you'd have to go through the process of unsetting the write protect and then overwriting the bootloader. > > I'll do some more Googling.... The real question is do you have access to a high voltage source? If so then on simple possibility is adding a Wisp628 to the board. A SSOP 628 and MAX232 won't occupy that much board space. BAJ > > Thanks, Peter Moreton > > > -----Original Message----- > From: pic microcontroller discussion list > [mailto:PICLIST@MITVMA.MIT.EDU] On Behalf Of Wouter van Ooijen > Sent: 20 February 2004 14:13 > To: PICLIST@MITVMA.MIT.EDU > Subject: Re: [PIC:] PIC 18F programmer circuit/software? > > > I'm working on a design for a PIC18F452 based board that can be > > programmed in the field, by folk who do not have the standard > > Microchip > > tools, such as a Picstart+ or an ICD-2. I don't wish to use a > > bootloader, since this would require the user to have access to a > > pre-loaded PIC, so I'm looking around for a simple circuit to > > build into > > my PCB to enable a blank PIC to be loaded with a .HEX file or similar. > > So you want a programmer build into your circuit. Depending on the > interface (serial, parallel, USB) and the programming type (HVP, LVP) > there are various options. Just look around for DIY programmers. > > Maybe you should reconsider your aversion to bootloaders. Bootloader > hardware can be very simple (see my ZPL) and the users have to buy their > PICs somewhere, so why not from you (or me :)) pre-loaded with a > bootloader? > > Wouter van Ooijen > > -- ------------------------------------------- > Van Ooijen Technische Informatica: www.voti.nl > consultancy, development, PICmicro products > > -- > 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 -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu