View previous topic :: View next topic |
Author |
Message |
Ttelmah
Joined: 11 Mar 2010 Posts: 19587
|
|
Posted: Thu Dec 05, 2013 9:54 am |
|
|
It _isn't_ 'somewhere else'.
All PIC code, normally starts with a jump 'to' a routine somewhere.
When you build the code to locate at 0x500, it does not put the 'main' at 0x500, it puts the jump _to_ the main at 0x500.
Look at the .lst file generated for ex_bootload.c. You will find it has at address 0x500, a jump to 0x610....
Best Wishes |
|
|
manisha
Joined: 03 Feb 2012 Posts: 29
|
|
Posted: Fri Dec 06, 2013 4:51 am |
|
|
Helloo all,
After some time gap,I am here again with my doubts.I need some confirmation if any hardware part of connection needed for pin B5. CAn anyone tell me how the pin B5 is connected in the hardware which is used in the ex_bootloader.c for load_program(); to work?
I see that while executing with pic18f6723, the code is entering into application() if (!input(PIN_B5) )is used and its staying in load program() if (input(PIN_B5)) is used. I think there is some issue with this PIN.
Please respond to my query as soon as possible.... |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19587
|
|
Posted: Fri Dec 06, 2013 6:25 am |
|
|
The pin needs a pull up resistor to +5v (10KR say), and then a jumper/switch to 0v. Close the switch or jumper to enable the bootloader.
Best Wishes |
|
|
manisha
Joined: 03 Feb 2012 Posts: 29
|
|
Posted: Sat Dec 07, 2013 1:21 am |
|
|
Thank you...for the reply..
I have implemented the below as you said:
Quote: | The pin needs a pull up resistor to +5v (10KR say), and then a jumper/switch to 0v. Close the switch or jumper to enable the bootloader.
|
On the switch press I am trying to download the hex from siow.exe tool from the file menu "download software" option and there is a timeout error generated while transferring..then I put timeout=10000 in #use rs232 and still its same. Then I also tried from "open file" option and also with "paste and transmit" option to transfer the application hex file.. but there is a hex data mismatch..Please anyone suggest a solution for dumping hex.
Last edited by manisha on Mon Dec 09, 2013 5:45 am; edited 1 time in total |
|
|
manisha
Joined: 03 Feb 2012 Posts: 29
|
|
Posted: Mon Dec 09, 2013 5:42 am |
|
|
Hello everyone,
I have compiled the bootloader code and opened the SIOW.exe and tried to dump the hex file from download software option but its showing timeout error. Then I dumped the hex with open file option in file menu and there is some data mismatch while sending the total hex file at a time and for few lines instead of 13 06 11 i.e xoff ack xon response its given as 12 06 10 i.e xoff ack xon and due to which my application is not running. After entering in the bootloader mode If I paste and transmit the hex by entering each line along with enter and then wait for 13 06 11 i.e xoff ack xon after completion of all lines, I am getting the response 13 06 11 06 11 i.e xoff ack xon my application is working fine.
But I have the problem that its sometimes giving response as 12 06 10 i.e xoff ack xon or only 13 11 etc. and due to which application is failing to run.
What should be done to avoid data mismatch in complete file transfer at a time which seems to be easy for dumping hex?
Or suggest any other way to solve this problem(to load correct hex file)...or please anyone post the code for load_program() for the flow control of none instead of xon/xoff to check if my code is right.
Waiting for a quick reply. |
|
|
|