PIC16F876A - Bootloader works only once [solved] - Printable Version +- ds30 Loader free edition forums (https://picbootloader.com/forum) +-- Forum: Support (https://picbootloader.com/forum/forumdisplay.php?fid=3) +--- Forum: 8-bit firmwares (https://picbootloader.com/forum/forumdisplay.php?fid=7) +--- Thread: PIC16F876A - Bootloader works only once [solved] (/showthread.php?tid=537) |
PIC16F876A - Bootloader works only once [solved] - edorul - 2012-12-03 Hello, I've just started to try the latest (November 9th 2012) "ds30Loader free edition" but I can't manage to make it work more than once. I've red some threads in the forum about the same problem, but none gave me a solution. I'll try to be the more precise about what I've done: * I've modified "firmware PIC12F PIC16F" as follow: - in "settings.inc": LIST P=16F876A (it's the PIC I use) - in "settings.inc": #define FOSC 20000000 (as I've a 20MHz quatz) - in "settings.inc", configuration bits are now: __CONFIG _DEBUG_OFF &_HS_OSC & _WDT_OFF & _PWRTE_OFF & _BODEN_OFF & _LVP_OFF * in "ds30LoaderGui.exe": - Device: PIC16F 876A - Baud rate: 9600 - Port: USB Serial Port (the one of my FT232R connected to the PIC board) - Write Flash: checked - Advanced tab: nothing checked - Timing tab: nothing changed - Reset tab: RTS - Activation tab: manual - Security tab: nothing changed - Terminal tab: nothing changed The fist time I use the Bootloader, it is perfectly detected by the GUI and my program is uploaded (see debug log named "1st_prog.txt"). Then, there is no way to connect to bootloader again (see debug log named "after_1st_prog.txt"), but my program works fine (I think it's because my program is smaller than 0x0700, see disassembly "my program uploaded by the bootloader" below). I've desassembled PIC memory with bootloader only: Code: ; Program My program only: Code: ; Program And then my program uploaded by the bootloader: Code: ; Program It seems that in the bootloader firmware, the "bank select" are wrongly modified by the PC software and that lines 1 to 6 should be as follow: Code: ; Reset-Vector If someone has an idea, it will be great. Best regards. RE: PIC16F876A - Bootloader works only once - Mikael Gustavsson - 2012-12-05 Hello, Thank you for the detailed report. Your are absolutely correct. The problem is that the 876A device is incorrectly interpreted as an enhanced mid-range device which supports the movlp instruction. Please try this new version attached to this post. RE: PIC16F876A - Bootloader works only once - edorul - 2012-12-06 (2012-12-05, 23:03:04)Mikael Gustavsson Wrote: Hello, Hello, Thanks a lot for your answer. With your new "ds30LoaderGui.exe" everything works fine ! Best regards. |