Edit timeout...
Address for int are 8 and 24, and GOTO takes 2 program word so, reset org should be 4.
Edit timeout...
Address for int are 8 and 24, and GOTO takes 2 program word so, reset org should be 4.
Is there way to move RESET_ORG to other address, without moving interrupt vector?
DEFINE RESET_ORG 004h also move vectors. In .LST file interrupt vector are defined as RESET_ORG+8h or 18h.
DEFINE LOADER_USED 1 doesn't do anything. I'm looking in disassembled hex file...
This is test code:
Code:DEFINE NO_CLRWDT 1 DEFINE LOADER_USED 1 DEFINE INTHAND myint ' Define interrupt handler DEFINE INTLHAND myint ' Define interrupt handler Start: PORTD.6=1 PORTD.6=0 GOTO Start @myint bcf PORTB,1
Also I noticed that with or without NO_CLRWDT 1, there is no CLRWDT in hex file.
I have VERY limitted knowledge in this area, but can't you set config fuses from the programmer?
(NO_CLRWDT is a config fuse right?)
If input to the programmer is the hex file, wouldn't that mean that fuses are handled separately than the hex file?
Robert
Last edited by Demon; - 10th March 2014 at 22:20.
PBP should put CLRWDT if there is no defined NO_CLRWDT 1. DEFINE NO_CLRWDT 1 isn't config, it is PBP's define.
This is exactly what I'm trying to do.
wayneandlayne.com have a pretty neat solution for a bootloader, it uses two LED's as light detectors to receive the code that is "flashed" or "blinked" to your PC's monitor screen. One LED light sensor is for clocking and one LED light sensor is for the data.
I'm not sure if this is actually a boot loader... or more of just a way of changing the message that this little kit displays...
but I would think it could be modified to act as a boot loader.
It may even work from a smart phones browser (it does play from a phones browser)
Here is their actual programming web page where you can scroll down and click on the "GO" button and see it in action.
http://www.wayneandlayne.com/blinky_programmer/
and a description of their bootloader...
http://www.wayneandlayne.com/project...ign/#questions
Their project is open source but I'm not sure if the programming web page code is available.
Last edited by Heckler; - 22nd March 2014 at 14:40.
Dwight
These PIC's are like intricate puzzles just waiting for one to discover their secrets and MASTER their capabilities.
Nice idea... But that isn't what I need. Devices already have communication with PC or internet, so transferring data to device isn't problem.
I want to create one bootloader that will flash device from I2C EEPROM. Reason for that is that I2c is simple communication, so it won't take lot of space.
Code for communication is already in main app. So there is no need to have 10-20Kof code to get file from server. Download hex in main app, then goto bootloader, and write that data to FLASH.
For now I have working ERASECODE and WRITECODE to erase, and then write new code. And it's working... But still don't understand how to write config.
I need to understand how to parse hex file, and extract FLESH and EEPROM data... There is bootloader application from microchip written in VB6, so that shouldn't be problem.
Bookmarks