MCLoader & XPort


Results 1 to 40 of 45

Threaded View

  1. #13
    Join Date
    Mar 2006
    Location
    China
    Posts
    266


    Did you find this post helpful? Yes | No

    Default Like this

    1: YES, just like that, put in the address where you want to loader to be in the LIB file.

    2: Rb6 and Rb7 are connected (same for both): RB6 ---> 470 ohm ---> LED ----> GND or any other pin can do the same.

    So when they are high the led is turned on, just for fun. (and to see what is happening)

    3: STOP makes the PIC to STOP dead as I don't want it to jump to an "empty" address and then run thru the entire empty program memory and end up in the loader again. If you want to you can go back to INIT to loop inside wait for the byte.

    4: Because your application software should start 64 bytes into the program memory. This is done by DEFINE RESET_ORG 64 in your application software. This is so we don't have to erase block 0 and therefore can never end up in a position where we can no longer access the loader. DEC 64 = HEX 0040 and the @GOTO must be a hex number.

    If you dont want to do this you can set the LOADER_USED line back to the default in the LIB file and then your code will end up starting from address 8 as it probably do today by DEFINE LOADER_USED 1. But then you need to store the data you want to keep from block 0 before erasing it and then write this data back together with the new data. This will take more than 28 intructions so you will lose less space if we start from adr 64.



    5: ERASECODE address will erase the entire block that the address variable is a part of.
    WRITECODE will write a BYTE or WORD variable to a position in the memory but you have to write 32 WORDS or 64 BYTES for it to be transferred to the memory.

    So get the data from somewhere (an array is usually good) and write it with a for-next loop. I don't think WRITECODE will accept an array as a valid argument so you better load it in a temorary variable and use the temorary variable in the WRITECODE command.

    Check the manual about these commands. There is no need for any assembler at all in this project, just use pbp!

    I am not really sure how assembler commands will work with this setup, you might end up in the wrong RAM bank or something. I have not tried it and I dont' plan to either. As long we stay with PBP commands it should be safe.


    /me
    Last edited by Jumper; - 24th August 2006 at 15:50.

Similar Threads

  1. xport code, have example, confused though
    By kenpo in forum mel PIC BASIC Pro
    Replies: 14
    Last Post: - 30th March 2009, 20:59
  2. Bootloader and Instant Interrupts Atn:_DT_
    By Josuetas in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 16th May 2007, 02:59
  3. McLoader and 18F2580
    By rwskinner in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 12th February 2007, 07:20
  4. xport + connecting 2 networks
    By rf_xport in forum General
    Replies: 0
    Last Post: - 12th July 2006, 07:26
  5. Has anyone used the Lantronics Xport
    By octavio bru in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 14th September 2004, 12: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