Using the Mecanique Bootloader without the DTR reset signal


Closed Thread
Results 1 to 3 of 3
  1. #1

    Thumbs up Using the Mecanique Bootloader without the DTR reset signal

    Hi,

    I can't believe it took me so long to figure this out.
    Now I can upgrade the firmware in my PICs (using the MCSP bootloader) without having to wire up the DTR.

    The only thing you have to do is make sure that your firmware is constantly looking at the serial port at either 19200 or 115200 baud. When the PIC receives the null character (which has an ASCII value of ZERO) you simply jump to the start of memory and the bootloader code gets run.

    Here's an example:

    Main:
    HSERIN 1, HserinTimedOut, [Char]
    IF Char = $00 THEN 'Bootloader must be trying to communicate
    CLEAR
    @ GOTO 0
    END IF
    GOSUB DoSomethingWithChar 'jump to your regular data handling routine

    HserinTimedOut:
    Goto Main


    Now, if you're not handling serial port communication all of the time, you are going to have to at least check the receive buffer every second or so to see if the "request-to-send" character has been received (the bootloader software will send if many times).

    Also, if you're operating at a different baud rate, you will need to first send the PIC a command to jump to the "Listen for Bootloader" code, which must first change the baud rate to match your bootloader and then listen. This is a bit more complicated.

    Anyway, give it a try and let me know how it works for you.

    Cheers!
    ---> picnaut

  2. #2


    Did you find this post helpful? Yes | No

    Lightbulb

    Quote Originally Posted by picnaut
    Now, if you're not handling serial port communication all of the time, you are going to have to at least check the receive buffer every second or so to see if the "request-to-send" character has been received (the bootloader software will send if many times).
    Actually, I did some more experimenting and found that you can go up to a minute without checking the serial port. The bootloader sends out the request for quite a while. However, to be on the safe side, I would check for that character at least every 30 seconds.

    Regards,
    ---> picnaut

  3. #3
    Join Date
    Apr 2005
    Posts
    96


    Did you find this post helpful? Yes | No

    Talking

    very nice! I just tried it on a project of mine and it works like a champ. Thanks alot for the info

Similar Threads

  1. PIC18F4680 bootloader
    By vinyl_theif in forum General
    Replies: 1
    Last Post: - 29th January 2009, 17:45
  2. 18F4550 Bootloader enter via eeprom setting
    By bradb in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 22nd November 2008, 23:51
  3. PIC16F684 + LCD to use the 256bytes of EEPROM - HELP
    By xnihilo in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 7th March 2008, 14:19
  4. Help with sound command in 2 programs
    By hyperboarder in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 5th July 2007, 20:36
  5. Bootloader Problems
    By rossfree in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 11th February 2005, 17:51

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts