PDA

View Full Version : Programing on a network



MOUNTAIN747
- 6th July 2014, 14:30
I have an application using a master and slave arrangement. Both controllers are 16F886. The slave is very difficult to get to and thirty feet away from the master. I am using a half-duplex RS485 on each board. I need to reprogram the application occasionally.

Question; If both master and slave have bootloader on board, is there any way to address the hex file to target one of the two controllers without having to hack the bootloader itself? OR, how do I reprogram a single controller on a network?

Thanks
Wayne

Jumper
- 7th July 2014, 01:22
Hi,

I dont think there is a normal bootloader that can do that. But you can write your own and if you can add a ee2 to the board it would help. Then you load the hex into the ee2 and check that it is written correctly, reset the PIC and start the bootloader which will write the HEX from the ee2 to the flash.

MOUNTAIN747
- 7th July 2014, 23:18
Jumper, thanks for responding.

Well I’ve never written a bootloader before but I’m game. If I write my own bootloader I might as well write it to check the controller ID address, if it is the correct address continue bootloading as normal. I think that would be less complex than having the controller check ID address of incoming message then send a huge file to a ee afterwhich you pass to the bootloader.

Don’t you think the bootloader could be written to check ID then a function byte, then either load program or handle as a standard incoming message/data?

Wayne