DEFINE RESET_ORG and DT Instant Interrupt


Results 1 to 11 of 11

Threaded View

  1. #6
    Join Date
    Sep 2009
    Posts
    755


    Did you find this post helpful? Yes | No

    Default Re: DEFINE RESET_ORG and DT Instant Interrupt

    Now I got it.
    I have done bootloaders on top of main program. At address 64000. So in main program i call bootloader with @ GOTO 64000. No need to remap anything.


    When you use reset org 3000h, PBP expect int vectors on 3008h, but CPU will jump at 08h.

    So in your bootloader you need to have
    Code:
    @ ORG 8
    	@ GOTO 3008h
    @ ORG 4
    	@ GOTO 3004h
    Then CPU will jump to 08h, then jump to 3008h, then jump to ISR. Lot of jumping...
    Also, when you power PIC it will enter to bootloader first, so you need exit from bootloader
    eg
    Code:
     @ GOTO 03000h
    But this
    Code:
    @ ORG 8
    	@ GOTO 3008h
    @ ORG 4
    	@ GOTO 3004h
    will generate warning in ASM, overwriting prev address, or something like that. Then it depends, what was last, so it may assemble correctly, maybe not.
    EDIT:
    You could try something like this in bootloader:
    Code:
    Reset org 10h
    @ ORG 0
    	@ GOTO 10h
    @ ORG 8
    	@ GOTO 3008h
    @ ORG 4
    	@ GOTO 3004h
    Last edited by pedja089; - 3rd February 2021 at 13:19.

Similar Threads

  1. DEFINE RESET_ORG and DEC modifier issue
    By Marcick in forum mel PIC BASIC Pro
    Replies: 25
    Last Post: - 5th February 2021, 07:21
  2. DT Instant Interrupt and Bootloader
    By mikebar in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 23rd September 2014, 08:26
  3. Define Interrupt Label Problem
    By Junkman55 in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 14th June 2011, 17:41
  4. Instant Interrupt and USART
    By sirvo in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 23rd July 2008, 03:08
  5. DT Instant Interrupt counting
    By jderson in forum mel PIC BASIC Pro
    Replies: 12
    Last Post: - 9th March 2008, 22:47

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