On Fri, Feb 20, 2004 at 10:35:30AM -0500, Byron A Jeff wrote: > 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. On the other hand, the bootloader does need to have control of the interrupt vectors, or at least the reset PC address. > 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. By my reading you can only clear (enable write-protect) the write-protect bits, not set (disable protect) them. > > 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. Wisp628 generates its own high voltage source with a charge pump, so you wouldn't even need a high voltage. However, Wouter doesn't allow distributing PCBs with a Wisp628 for money, or having the PCB made by a PCB company. This looks a bit like a grey area, but I'm sure Wouter would confirm his position. Chris -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu