On Tue, Jun 22, 2004 at 10:19:21PM +0200, Kyrre Aalerud wrote: > Hi people! Long time since I've posted... Well welcome back. > > I wanted to ask if someone had good/bad experiences on making the 16F88 > chips program themselves via a small bootloader subroutine and rs232... I haven't gotten there yet. It's on my growing list of things to do. > I > was going to use rs232 anyway in my circuit for configuration and offloading > of statistical sensor-data, but then I found the chip can self-program! One of the multitude of goodies that it offers. Truly the 16F84 of the new millenium. > By > telling chip to reprogram memory, upgrading software would be possible after > I mold the circuit into epoxy too! Absolutely. > (This circuit has to be waterproof and > very sturdy so molding it is a good and fast way to achieve that.) Care to tell us about a watertight connector? Just out of curiousity... > > Pipedream or possible ? Definitely doable. > Share your experiences please? > Any dogs burried in this approach ? The usual. You lose a bit of program memory. Also there will be some startup delay because you have to have some interaction between the bootloader and the PC. One idle thought was if the box isn't always connected to RS232 one could possibly have RxD pulled up to a break condition, with then a connected TxD automagically pulling it down to idle when connected. The bootloader could then have an extremely brief delay followed by a check of RxD before configuring serial port. If it's pulled high, then presume that nothing is connected to the serial port and proceed normally, otherwise activate the bootloader protocol. If the bootlloader responds, then proceed to load new program, otherwise presume you're connected to the application's target serial and interact with it. A bit complicated, but if startup time is critical then it could save a second or two in terms of timing out. > Anything I need to consider? I'm current playing with the Tiny bootloader: http://www.ac.ugal.ro/staff/ckiku/software/picbootloader.htm The web server is refusing requests but it's cached in Google. Check the archives for the thread "Need 16F819 bootloader" or somesuch. Extensive discussions of the issue there. Bottom line is that ordinary 16F87X bootloaders won't work because 4 word writes are required and 16F87XA bootloaders won't work because the 16F8X and 16F81X require row level erases to happen before you can reprogram. Also in the thread another loader (name forgotten) points out that when you erase the first row that you erase the jump to the bootloader on reset so you have to restore it. Again check the threads for more info on the subject. My plan is to update Tiny to load for the 16F88 and 16F819. But it may be a minute or two (or a month or two) before I get to it. BAJ -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.