Byron A Jeff wrote: > > On Mon, Jul 30, 2001 at 08:48:25AM +1000, David Huisman wrote: > > I require a bootloader that utilizes BIT BASHED com to PC instead of using > > on-board UART. (Note: the IO MUST be bit-bashed as the UART is already being > > used by the project). > > > > The files that will be uploaded to the micro with the bootloader are written > > in C. > > The compiler is HI-TECH C. The bootloader is programmed into micro using > > MPLAB and the PICSTART PLUS programmer. > > > > Would someone advise if they have done this exact thing or comment on > > whether the code below placed in my C source and used in conjunction with > > ROMZAP would do the trick. > > > > #asm > > psect powerup, class=CODE, delta=2 > > global powerup, start > > powerup: > > org 0x3 > > goto start > > #endasm > > > > void main() > > { > > /* C code to go here */ > > } > > Take a look at wloader. > > http://www.xs4all.nl/~wf/wouter/pic/wloader/ > > Bit bashed and doesn't require any change in your code. It'll automagically > move the code out of the reset vector area. ROMzap also has the option of not using a jump vector at the start of ROM space which means the user code can start at 0000h. In this mode, the only code that ROMzap creates is the bootloader located in high memory and as there is no need for it to create port initialization, it is up to the code writer to do it. Just do a "goto $0FFF" for 4K devices, or a "goto $1FFF" for 8K devices and the boot code will execute, either bit bashed on any IO pins or via the UART. ROMzap also creates ASM code files for the bootloader so it can be #included with the user code and modified if need be. -- Best regards Tony mICros http://www.bubblesoftonline.com mailto:sales@bubblesoftonline.com -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu