Yes, the 16F8xx devices can write to their own memory. What you end up doing is initially programming the device with a bootloader that understands your particular network protocol, and also can check to see if the current code in the device is valid. On bootup, the bootloader verifies the code (valid checksum, for instance) then boots into the code. A special network command is needed that, when received by your working code, transfers control back to the bootloader. At that point you can send commands to your bootloader to rewrite the program memory. The only problem you may hit and will need special consideration as you design your bootloader is the possibility of neededing to change the protocol that the network runs on in the future. Given that there will be several devices on one line, during an upgrade one or more devices will be running an older protocol and one or more will be running the newer protocol. You have to do a few things: 1) Leave room in the protocol for upgrades, or an ignore bit or something so the old devices ignore the upgraded protocol OR 2) When you upgrade a device to the new protocol, make it is it ignores the old protocol, or is backwards compatible, and don't start using the new protocol until all devices are upgraded 3) Develop an interim protocol which is compatible with both the new and the old and upgrade to this, then upgrade to the new one (use this when you find that the new protocol cannot be backward compatible) The last little bit to worry about is if you do upgrade the protocol you will likely need to upgrade to bootloader code. This would require that your main program be able to update the bootloader, as it is not wise to attempt to update the bootloader while it is running. Of course, if your protocol of choice has several layers, and you will only ever change or add upper layers, then make the bootloader use a very low level protocol layer for upgrades. -Adam Roger Morella wrote: > > I am developing a networked product that will use an > RS485 network for communications. I would like to > know if there is any way I can do field firmware > updates over the RS485 network. In other words, can > the device program itself and what would be the best > way to do this? > > Roger > > __________________________________________________ > Do You Yahoo!? > Send instant messages & get email alerts with Yahoo! Messenger. > http://im.yahoo.com/ > > -- > 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